Linux 3.12.11
Greg KH
maintainerI'm announcing the release of the 3.12.11 kernel.
All users of the 3.12 kernel series must upgrade.
The updated 3.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.12.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/filesystems/proc.txt | 4 Makefile | 2 arch/arm/mach-mvebu/mvebu-soc-id.c | 2 arch/arm/plat-orion/irq.c | 47 +++++ arch/sh/kernel/kgdb.c | 1 arch/tile/include/asm/compat.h | 1 arch/x86/include/asm/pgtable_types.h | 3 arch/x86/xen/platform-pci-unplug.c | 74 ++++++++ arch/xtensa/platforms/xtfpga/setup.c | 12 - drivers/acpi/bus.c | 9 drivers/block/xen-blkfront.c | 4 drivers/char/tpm/xen-tpmfront.c | 4 drivers/eisa/eisa-bus.c | 26 +- drivers/gpu/drm/ast/ast_fb.c | 2 drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 drivers/gpu/drm/cirrus/cirrus_mode.c | 4 drivers/gpu/drm/drm_gem.c | 3 drivers/gpu/drm/gma500/gma_display.c | 12 + drivers/gpu/drm/i915/i915_dma.c | 1 drivers/gpu/drm/i915/i915_drv.h | 1 drivers/gpu/drm/i915/i915_gem_stolen.c | 2 drivers/gpu/drm/i915/i915_gpu_error.c | 22 +- drivers/gpu/drm/i915/i915_reg.h | 10 - drivers/gpu/drm/i915/intel_dp.c | 40 +++- drivers/gpu/drm/i915/intel_ringbuffer.c | 12 - drivers/gpu/drm/mgag200/mgag200_cursor.c | 8 drivers/gpu/drm/mgag200/mgag200_fb.c | 2 drivers/gpu/drm/mgag200/mgag200_mode.c | 4 drivers/gpu/drm/nouveau/core/engine/falcon.c | 20 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 33 --- drivers/gpu/drm/radeon/atombios_crtc.c | 25 ++ drivers/gpu/drm/radeon/evergreen.c | 4 drivers/gpu/drm/radeon/evergreen_cs.c | 5 drivers/gpu/drm/radeon/ni.c | 16 - drivers/gpu/drm/radeon/nid.h | 1 drivers/gpu/drm/radeon/r600.c | 13 - drivers/gpu/drm/radeon/r600_cs.c | 5 drivers/gpu/drm/radeon/r600d.h | 1 drivers/gpu/drm/radeon/radeon_atombios.c | 4 drivers/gpu/drm/radeon/radeon_i2c.c | 3 drivers/gpu/drm/radeon/radeon_pm.c | 6 drivers/gpu/drm/radeon/radeon_uvd.c | 1 drivers/gpu/drm/radeon/rv770_dpm.c | 6 drivers/gpu/drm/radeon/si.c | 2 drivers/gpu/drm/radeon/sid.h | 2 drivers/gpu/drm/radeon/uvd_v2_2.c | 1 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 1 drivers/gpu/drm/rcar-du/rcar_du_plane.c | 21 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 9 drivers/infiniband/hw/qib/qib_ud.c | 9 drivers/input/misc/xen-kbdfront.c | 4 drivers/iommu/intel-iommu.c | 2 drivers/md/Kconfig | 4 drivers/md/Makefile | 1 drivers/md/dm-builtin.c | 48 +++++ drivers/md/dm-sysfs.c | 5 drivers/md/dm-thin-metadata.c | 20 ++ drivers/md/dm-thin-metadata.h | 2 drivers/md/dm-thin.c | 71 ++++--- drivers/md/dm.c | 15 - drivers/md/dm.h | 17 + drivers/md/persistent-data/dm-space-map-common.c | 6 drivers/md/persistent-data/dm-space-map-metadata.c | 28 ++- drivers/media/dvb-core/dvb-usb-ids.h | 1 drivers/media/dvb-frontends/dib8000.c | 42 +++- drivers/media/dvb-frontends/m88rs2000.c | 117 +++++++++--- drivers/media/dvb-frontends/m88rs2000.h | 2 drivers/media/dvb-frontends/nxt200x.c | 2 drivers/media/platform/s5p-mfc/s5p_mfc.c | 28 --- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 9 drivers/media/usb/dvb-usb-v2/anysee.c | 3 drivers/media/usb/dvb-usb-v2/it913x.c | 3 drivers/media/v4l2-core/v4l2-dev.c | 2 drivers/misc/mei/hbm.c | 2 drivers/mmc/card/block.c | 7 drivers/mmc/core/sd.c | 37 ++-- drivers/mmc/host/atmel-mci.c | 13 + drivers/mmc/host/sdhci-pci.c | 12 + drivers/mtd/nand/mxc_nand.c | 1 drivers/net/xen-netfront.c | 2 drivers/pci/xen-pcifront.c | 4 drivers/rtc/rtc-cmos.c | 52 +++++ drivers/spi/spi-bcm63xx.c | 2 drivers/spi/spi-pxa2xx.c | 2 drivers/spi/spi.c | 4 drivers/target/iscsi/iscsi_target_util.c | 8 drivers/vhost/scsi.c | 2 drivers/video/xen-fbfront.c | 4 drivers/xen/xenbus/xenbus_probe_frontend.c | 2 fs/dcookies.c | 2 fs/exofs/ore.c | 37 ++-- fs/fuse/dev.c | 22 -- fs/nfs/nfs4client.c | 18 - fs/nfs/nfs4proc.c | 40 +++- fs/nfs/nfs4xdr.c | 47 +++-- fs/nfs/write.c | 11 - fs/notify/fanotify/fanotify_user.c | 4 fs/read_write.c | 16 - fs/splice.c | 18 + include/linux/audit.h | 2 include/linux/compat.h | 18 - include/linux/percpu_ida.h | 3 include/linux/pipe_fs_i.h | 2 include/linux/vmstat.h | 2 include/scsi/osd_ore.h | 1 include/xen/platform_pci.h | 23 ++ kernel/audit.c | 5 kernel/time/timekeeping.c | 47 +++-- kernel/trace/ftrace.c | 190 ++++++++++++++++----- kernel/trace/trace.c | 8 lib/percpu_ida.c | 21 +- mm/internal.h | 1 mm/memcontrol.c | 37 ++-- mm/memory-failure.c | 21 +- mm/mmap.c | 12 + mm/oom_kill.c | 2 mm/page-writeback.c | 57 ++---- mm/slub.c | 8 mm/vmscan.c | 23 -- net/core/skbuff.c | 32 --- net/sunrpc/auth_gss/gss_rpc_upcall.c | 2 net/sunrpc/auth_gss/svcauth_gss.c | 33 --- net/sunrpc/clnt.c | 8 net/sunrpc/netns.h | 1 security/selinux/ss/policydb.c | 14 + tools/power/x86/turbostat/Makefile | 2 tools/power/x86/turbostat/turbostat.c | 13 - 127 files changed, 1301 insertions(+), 590 deletions(-)
AKASHI Takahiro (1):
audit: correct a type mismatch in audit_syscall_exit()
Adrian Hunter (2):
mmc: sdhci-pci: Fix BYT sd card getting stuck in runtime suspend
mmc: sdhci-pci: Fix possibility of chip->fixes being null
Akash Goel (1):
drm/i915: Fix the offset issue for the stolen GEM objects
Alex Deucher (9):
drm/radeon: warn users when hw_i2c is enabled (v2) drm/radeon/dpm: disable mclk switching on desktop RV770 drm/radeon: disable ss on DP for DCE3.x drm/radeon: fix surface sync in fence on cayman (v2) drm/radeon: set the full cache bit for fences on r7xx+ drm/radeon: add UVD support for OLAND drm/radeon: fix DAC interrupt handling on DCE5+ drm/radeon/DCE4+: clear bios scratch dpms bit (v2) drm/radeon/dce8: workaround for atom BlankCrtc table
Alex Williamson (1):
intel-iommu: fix off-by-one in pagetable freeing
Andrey Vagin (1):
mm: don't lose the SOFT_DIRTY flag on mprotect
Antti Palosaari (1):
media: anysee: fix non-working E30 Combo Plus DVB-T
Bjorn Helgaas (1):
Revert "EISA: Initialize device before its resources"
Boaz Harrosh (2):
ore: Fix wrong math in allocation of per device BIO
pnfs: Proper delay for NFS4ERR_RECALLCONFLICT in layout_get_done
Borislav Petkov (1):
rtc-cmos: Add an alarm disable quirk
Chris Wilson (2):
drm/i915: Flush outstanding requests before allocating new seqno drm/i915: Decouple GPU error reporting from ring initialisation
Cyrill Gorcunov (1):
mm: ignore VM_SOFTDIRTY on VMA merging
Daniel Santos (1):
spidev: fix hang when transfer_one_message fails
Daniel Vetter (1):
drm/gem: Always initialize the gem object in object_init
Dave Airlie (4):
drm: ast,cirrus,mgag200: use drm_can_sleep
drm/mgag200: fix oops in cursor code.
drm/mgag200: fix typo causing bw limits to be ignored on some chips drm/mgag200,ast,cirrus: fix regression with drm_can_sleep conversion
David Rientjes (1):
mm, oom: base root bonus on current usage
Greg Kroah-Hartman (1):
Linux 3.12.11
Gregory CLEMENT (1):
ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed
Heiko Carstens (4):
compat: fix sys_fanotify_mark
fs/compat: fix parameter handling for compat readv/writev syscalls fs/compat: fix lookup_dcookie() parameter handling
tile: remove compat_sys_lookup_dcookie declaration to fix compile error
Hugh Dickins (1):
mm/memcg: iteration skip memcgs not yet fully initialized
Ilia Mirkin (1):
drm/nouveau/falcon: use vmalloc to create firwmare copies
Ira Weiny (1):
IB/qib: Fix QP check when looping back to/from QP1
Jeff Layton (1):
sunrpc: don't wait for write before allowing reads from use-gss-proxy file
Joe Thornber (4):
dm thin: fix discard support to a previously shared block dm space map common: make sure new space is used during extend dm space map metadata: fix extending the space map dm space map metadata: fix bug in resizing of thin metadata
Johannes Weiner (2):
mm/page-writeback.c: fix dirty_balance_reserve subtraction from dirtyable memory mm/page-writeback.c: do not count anon pages as dirtyable memory
John Stultz (6):
timekeeping: Fix lost updates to tai adjustment
timekeeping: Fix potential lost pv notification of time change
timekeeping: Avoid possible deadlock from clock_was_set_delayed 3.13.y: timekeeping: Fix clock_set/clock_was_set think-o
timekeeping: Fix CLOCK_TAI timer/nanosleep delays
timekeeping: Fix missing timekeeping_update in suspend path
Jonas Gorski (1):
spi/bcm63xx: don't substract prepend length from total length
Josh Triplett (2):
turbostat: Don't put unprocessed uapi headers in the include path
turbostat: Use GCC's CPUID functions to support PIC
Kent Overstreet (1):
percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask
Konrad Rzeszutek Wilk (1):
xen/pvhvm: If xen_platform_pci=0 is set don't blow up (v4).
Laurent Pinchart (1):
drm/rcar-du: Update plane pitch in .mode_set_base() operation
Li Zefan (1):
slub: Fix calculation of cpu slabs
Ludovic Desroches (1):
mmc: atmel-mci: fix timeout errors in SDIO mode when using DMA
Maarten Lankhorst (1):
drm/nouveau: fix m2mf copy to tiled gart
Malcolm Priestley (3):
it913x: Add support for Avermedia H335 id 0x0335
m88rs2000: add m88rs2000_set_carrieroffset
m88rs2000: set symbol rate accuratelyMarek Olšák (1):
drm/radeon: skip colorbuffer checking if COLOR_INFO.FORMAT is set to INVALID
Marek Szyprowski (2):
media: media: v4l2-dev: fix video device index assignment
media: s5p_mfc: remove s5p_mfc_get_node_type() function
Mark Brown (1):
ACPI / init: Flag use of ACPI and ACPI idioms for power supplies to regulator API
Mauro Carvalho Chehab (2):
dib8000: make 32 bits read atomic
nxt200x: increase write buffer size
Max Filippov (1):
xtensa: xtfpga: fix definitions of platform devices
Michael Grzeschik (1):
mtd: mxc_nand: remove duplicated ecc_stats counting
Michal Hocko (2):
memcg: fix endless loop caused by mem_cgroup_iter
memcg: fix css reference leak and endless loop in mem_cgroup_iter
Michel Dänzer (1):
radeon/pm: Guard access to rdev->pm.power_state array
Mika Westerberg (1):
spi/pxa2xx: initialize DMA channels to -1 to prevent inadvertent match
Mike Snitzer (2):
dm thin: initialize dm_thin_new_mapping returned by get_next_mapping dm thin: fix set_pool_mode exposed pool operation races
Miklos Szeredi (1):
fuse: fix pipe_buf_operations
Mikulas Patocka (2):
dm: wait until embedded kobject is released before destroying a device dm sysfs: fix a module unload race
Naoya Horiguchi (1):
mm/memory-failure.c: shift page lock from head page to tail page after thp split
Nicholas Bellinger (1):
iscsi-target: Fix connection reset hang with percpu_ida_alloc
Olivier Grenie (1):
dib8000: fix regression with dib807x
Patrik Jakobsson (1):
drm/gma500: Lock struct_mutex around cursor updates
Paul Bolle (1):
mei: mei_hbm_dispatch() returns void
Ray Jui (1):
mmc: fix host release issue after discard operation
Richard Guy Briggs (1):
audit: reset audit backlog wait time after error recovery
Scott Mayhew (1):
nfs: always make sure page is up-to-date before extending a write to cover the entire page
Sebastian Hesselbarth (1):
ARM: orion: provide C-style interrupt handler for MULTI_IRQ_HANDLER
Stanislaw Gruszka (1):
i915: remove pm_qos request on error
Steven Rostedt (Red Hat) (5):
tracing: Have trace buffer point back to trace_array
tracing: Check if tracing is enabled in trace_puts()
ftrace: Synchronize setting function_trace_op with ftrace_trace_function
ftrace: Fix synchronization location disabling and freeing ftrace_ops
ftrace: Have function graph only trace based on global_ops filters
Takashi Iwai (1):
drm/cirrus: correct register values for 16bpp
Tetsuo Handa (1):
SELinux: Fix memory leak upon loading policy
Thomas Hellstrom (1):
drm/vmwgfx: Fix regression caused by "drm/ttm: make ttm reservation calls behave like reservation calls"
Todd Previte (1):
drm/i915: VLV2 - Fix hotplug detect bits
Trond Myklebust (3):
NFSv4: OPEN must handle the NFS4ERR_IO return code correctly NFSv4.1: Handle errors correctly in nfs41_walk_client_list
NFSv4: Fix a slot leak in nfs40_sequence_done
Wanlong Gao (1):
arch/sh/kernel/kgdb.c: add missing #include <linux/sched.h>
Weston Andros Adamson (3):
nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME
nfs4: fix discover_server_trunking use after free
sunrpc: Fix infinite loop in RPC state machine
Wolfram Sang (1):
mmc: core: sd: implement proper support for sd3.0 au sizes
Greg KH
maintainerDocumentation/filesystems/proc.txt +2 -2
@@ -1376,8 +1376,8 @@ may allocate from based on an estimation of its current memory and swap use. For example, if a task is using all allowed memory, its badness score will be 1000. If it is using half of its allowed memory, its score will be 500. -There is an additional factor included in the badness score: root -processes are given 3% extra memory over other tasks. +There is an additional factor included in the badness score: the current memory +and swap usage is discounted by 3% for root processes. The amount of "allowed" memory depends on the context in which the oom killer was called. If it is due to the memory assigned to the allocating task's cpuset
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 12 -SUBLEVEL = 10 +SUBLEVEL = 11 EXTRAVERSION = NAME = One Giant Leap for Frogkind
arch/arm/mach-mvebu/mvebu-soc-id.c +1 -1
@@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void) } pci_base =of_iomap (child,0 ); -if (IS_ERR (pci_base)) { +if (pci_base ==NULL ) {pr_err ("cannot map registers\n" ); ret = -ENOMEM ; goto res_ioremap;
arch/arm/plat-orion/irq.c +47 -0
61 lines not on this page · raw message
arch/sh/kernel/kgdb.c +1 -0
@@ -13,6 +13,7 @@#include <linux/kdebug.h> #include <linux/irq.h> #include <linux/io.h> +#include <linux/sched.h> #include <asm/cacheflush.h> #include <asm/traps.h>
arch/tile/include/asm/compat.h +0 -1
@@ -281,7 +281,6 @@ long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, u32 dummy, u32 low, u32 high);long compat_sys_pwrite64 (unsigned int fd,char __user *ubuf,size_t count,u32 dummy,u32 low,u32 high); -long compat_sys_lookup_dcookie (u32 low,u32 high,char __user *buf,size_t len);long compat_sys_sync_file_range2 (int fd,unsigned int flags,u32 offset_lo,u32 offset_hi,u32 nbytes_lo,u32 nbytes_hi);
arch/x86/include/asm/pgtable_types.h +2 -1
@@ -121,7 +121,8 @@/* Set of bits not changed in pte_modify */ #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ - _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY) + _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY | \ + _PAGE_SOFT_DIRTY)#define _HPAGE_CHG_MASK (_PAGE_CHG_MASK | _PAGE_PSE)#define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT)
arch/x86/xen/platform-pci-unplug.c +74 -0
80 lines not on this page · raw message
arch/xtensa/platforms/xtfpga/setup.c +6 -6
@@ -194,7 +194,7 @@ void __init platform_calibrate_ccount(void)* Ethernet -- OpenCores Ethernet MAC (ethoc driver) */ -static struct resource ethoc_res[]__initdata = { +static struct resource ethoc_res[] = { [0 ] = {/* register space */ .start =OETH_REGS_PADDR , .end =OETH_REGS_PADDR +OETH_REGS_SIZE -1 ,
@@ -212,7 +212,7 @@ static struct resource ethoc_res[] __initdata = { }, }; -static struct ethoc_platform_data ethoc_pdata__initdata = { +static struct ethoc_platform_data ethoc_pdata = {/* * The MAC address for these boards is 00:50:c2:13:6f:xx. * The last byte (here as zero) is read from the DIP switches on the
@@ -222,7 +222,7 @@ static struct ethoc_platform_data ethoc_pdata __initdata = { .phy_id = -1, }; -static struct platform_device ethoc_device__initdata = { +static struct platform_device ethoc_device = { .name ="ethoc" , .id =-1 , .num_resources =ARRAY_SIZE (ethoc_res),
@@ -236,13 +236,13 @@ static struct platform_device ethoc_device __initdata = {* UART */ -static struct resource serial_resource__initdata = { +static struct resource serial_resource = { .start =DUART16552_PADDR , .end =DUART16552_PADDR +0x1f , .flags =IORESOURCE_MEM , }; -static struct plat_serial8250_port serial_platform_data[]__initdata = { +static struct plat_serial8250_port serial_platform_data[] = { [0 ] = { .mapbase =DUART16552_PADDR , .irq =DUART16552_INTNUM ,
@@ -255,7 +255,7 @@ static struct plat_serial8250_port serial_platform_data[] __initdata = { { }, }; -static struct platform_device xtavnet_uart__initdata = { +static struct platform_device xtavnet_uart = { .name ="serial8250" , .id =PLAT8250_DEV_PLATFORM , .dev = {
drivers/acpi/bus.c +9 -0
@@ -33,6 +33,7 @@#include <linux/proc_fs.h> #include <linux/acpi.h> #include <linux/slab.h> +#include <linux/regulator/machine.h> #ifdef CONFIG_X86 #include <asm/mpspec.h> #endif
@@ -575,6 +576,14 @@ void __init acpi_early_init(void) goto error0; } +/* +* If the system is using ACPI then we can be reasonably +* confident that any regulators are managed by the firmware +* so tell the regulator core it has everything it needs to +* know. +*/ +regulator_has_full_constraints (); +return ; error0:
drivers/block/xen-blkfront.c +2 -2
@@ -1278,7 +1278,7 @@ static int blkfront_probe(struct xenbus_device *dev,char *type;int len;/* no unplug has been done: do not hook devices != xen vbds */ -if (xen_platform_pci_unplug &XEN_UNPLUG_UNNECESSARY ) { +if (xen_has_pv_and_legacy_disk_devices ()) {int major;if (!VDEV_IS_EXTENDED (vdevice))
@@ -2022,7 +2022,7 @@ static int __init xlblk_init(void)if (!xen_domain ())return -ENODEV ; -if (xen_hvm_domain () && !xen_platform_pci_unplug) +if (!xen_has_pv_disk_devices ())return -ENODEV ;if (register_blkdev (XENVBD_MAJOR ,DEV_NAME )) {
drivers/char/tpm/xen-tpmfront.c +4 -0
@@ -17,6 +17,7 @@#include <xen/xenbus.h> #include <xen/page.h> #include "tpm.h" +#include <xen/platform_pci.h> struct tpm_private {struct tpm_chip *chip;
@@ -423,6 +424,9 @@ static int __init xen_tpmfront_init(void)if (!xen_domain ())return -ENODEV ; +if (!xen_has_pv_devices ()) +return -ENODEV ; +return xenbus_register_frontend (&tpmfront_driver); }module_init (xen_tpmfront_init);
drivers/eisa/eisa-bus.c +15 -11
@@ -275,11 +275,13 @@ static int __init eisa_request_resources(struct eisa_root_device *root, }if (slot) { + edev->res[i].name =NULL ; edev->res[i].start =SLOT_ADDRESS (root, slot) + (i *0x400 ); edev->res[i].end = edev->res[i].start +0xff ; edev->res[i].flags =IORESOURCE_IO ; }else { + edev->res[i].name =NULL ; edev->res[i].start =SLOT_ADDRESS (root, slot) +EISA_VENDOR_ID_OFFSET ; edev->res[i].end = edev->res[i].start +3 ;
@@ -326,19 +328,20 @@ static int __init eisa_probe(struct eisa_root_device *root)return -ENOMEM ; } -if (eisa_init_device (root, edev,0 )) { +if (eisa_request_resources (root, edev,0 )) { +dev_warn (root->dev, +"EISA: Cannot allocate resource for mainboard\n" );kfree (edev);if (!root->force_probe) -return -ENODEV ; +return -EBUSY ; goto force_probe; } -if (eisa_request_resources (root, edev,0 )) { -dev_warn (root->dev, -"EISA: Cannot allocate resource for mainboard\n" ); +if (eisa_init_device (root, edev,0 )) { +eisa_release_resources (edev);kfree (edev);if (!root->force_probe) -return -EBUSY ; +return -ENODEV ; goto force_probe; }
@@ -361,11 +364,6 @@ static int __init eisa_probe(struct eisa_root_device *root)continue ; } -if (eisa_init_device (root, edev, i)) { -kfree (edev); -continue ; - } -if (eisa_request_resources (root, edev, i)) { dev_warn(root->dev, "Cannot allocate resource for EISA slot %d\n",
@@ -374,6 +372,12 @@ static int __init eisa_probe(struct eisa_root_device *root)continue ; } +if (eisa_init_device (root, edev, i)) { +eisa_release_resources (edev); +kfree (edev); +continue ; + } +if (edev->state == (EISA_CONFIG_ENABLED |EISA_CONFIG_FORCED )) enabled_str =" (forced enabled)" ;else if (edev->state ==EISA_CONFIG_FORCED )
drivers/gpu/drm/ast/ast_fb.c +1 -1
@@ -65,7 +65,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,* then the BO is being moved and we should * store up the damage until later. */ -if (!in_interrupt ()) +if (drm_can_sleep ()) ret =ast_bo_reserve (bo, true);if (ret) {if (ret != -EBUSY )
drivers/gpu/drm/cirrus/cirrus_fbdev.c +1 -1
@@ -39,7 +39,7 @@ static void cirrus_dirty_update(struct cirrus_fbdev *afbdev,* then the BO is being moved and we should * store up the damage until later. */ -if (!in_interrupt ()) +if (drm_can_sleep ()) ret =cirrus_bo_reserve (bo, true);if (ret) {if (ret != -EBUSY )
drivers/gpu/drm/cirrus/cirrus_mode.c +2 -2
@@ -273,8 +273,8 @@ static int cirrus_crtc_mode_set(struct drm_crtc *crtc, sr07 |=0x11 ;break ;case 16 : - sr07 |=0xc1 ; - hdr =0xc0 ; + sr07 |=0x17 ; + hdr =0xc1 ;break ;case 24 : sr07 |=0x15 ;
drivers/gpu/drm/drm_gem.c +2 -1
@@ -129,11 +129,12 @@ int drm_gem_object_init(struct drm_device *dev, {struct file *filp; +drm_gem_private_object_init (dev, obj, size); + filp =shmem_file_setup ("drm mm object" , size,VM_NORESERVE );if (IS_ERR (filp))return PTR_ERR (filp); -drm_gem_private_object_init (dev, obj, size); obj->filp = filp;return 0 ;
drivers/gpu/drm/gma500/gma_display.c +10 -2
@@ -349,6 +349,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,/* If we didn't get a handle then turn the cursor off */ if (!handle) { temp =CURSOR_MODE_DISABLE ; +mutex_lock (&dev->struct_mutex);if (gma_power_begin (dev, false)) {REG_WRITE (control, temp);
@@ -365,6 +366,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, gma_crtc->cursor_obj =NULL ; } +mutex_unlock (&dev->struct_mutex);return 0 ; }
@@ -374,9 +376,12 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,return -EINVAL ; } +mutex_lock (&dev->struct_mutex); obj =drm_gem_object_lookup (dev, file_priv, handle); -if (!obj) -return -ENOENT ; +if (!obj) { + ret = -ENOENT ; + goto unlock; + }if (obj->size < width * height *4 ) {dev_dbg (dev->dev,"Buffer is too small\n" );
@@ -440,10 +445,13 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, } gma_crtc->cursor_obj = obj; +unlock: +mutex_unlock (&dev->struct_mutex);return ret; unref_cursor:drm_gem_object_unreference (obj); +mutex_unlock (&dev->struct_mutex);return ret; }
drivers/gpu/drm/i915/i915_dma.c +1 -0
@@ -1683,6 +1683,7 @@ out_gem_unload:intel_teardown_gmbus (dev);intel_teardown_mchbar (dev); +pm_qos_remove_request (&dev_priv->pm_qos);destroy_workqueue (dev_priv->wq); out_mtrrfree:arch_phys_wc_del (dev_priv->gtt.mtrr);
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -296,6 +296,7 @@ struct drm_i915_error_state {u64 fence[I915_MAX_NUM_FENCES ];struct timeval time;struct drm_i915_error_ring { +bool valid;struct drm_i915_error_object {int page_count;u32 gtt_offset;
drivers/gpu/drm/i915/i915_gem_stolen.c +1 -1
@@ -250,7 +250,7 @@ i915_pages_create_for_stolen(struct drm_device *dev, } sg = st->sgl; - sg->offset = offset; + sg->offset =0 ; sg->length = size;sg_dma_address (sg) = (dma_addr_t )dev_priv->mm.stolen_base + offset;
drivers/gpu/drm/i915/i915_gpu_error.c +15 -7
@@ -221,6 +221,9 @@ static void i915_ring_error_state(struct drm_i915_error_state_buf *m, unsigned ring) {BUG_ON (ring >=I915_NUM_RINGS );/* shut up confused gcc */ +if (!error->ring[ring].valid) +return ; +err_printf (m,"%s command stream:\n" ,ring_str (ring));err_printf (m," HEAD: 0x%08x\n" , error->head[ring]);err_printf (m," TAIL: 0x%08x\n" , error->tail[ring]);
@@ -272,7 +275,6 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,struct drm_device *dev = error_priv->dev;drm_i915_private_t *dev_priv = dev->dev_private;struct drm_i915_error_state *error = error_priv->error; -struct intel_ring_buffer *ring;int i, j, page, offset, elt;if (!error) {
@@ -306,7 +308,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,if (INTEL_INFO (dev)->gen ==7 )err_printf (m,"ERR_INT: 0x%08x\n" , error->err_int); -for_each_ring (ring, dev_priv, i) +for (i =0 ; i <ARRAY_SIZE (error->ring); i++)i915_ring_error_state (m, dev, error, i);if (error->active_bo)
@@ -363,8 +365,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, } } - obj = error->ring[i].ctx; -if (obj) { +if ((obj = error->ring[i].ctx)) {err_printf (m,"%s --- HW Context = 0x%08x\n" , dev_priv->ring[i].name, obj->gtt_offset);
@@ -644,7 +645,8 @@ i915_error_first_batchbuffer(struct drm_i915_private *dev_priv,return NULL ; obj = ring->scratch.obj; -if (acthd >=i915_gem_obj_ggtt_offset (obj) && +if (obj !=NULL && + acthd >=i915_gem_obj_ggtt_offset (obj) && acthd <i915_gem_obj_ggtt_offset (obj) + obj->base.size)return i915_error_object_create (dev_priv, obj); }
@@ -747,11 +749,17 @@ static void i915_gem_record_rings(struct drm_device *dev, struct drm_i915_error_state *error) {struct drm_i915_private *dev_priv = dev->dev_private; -struct intel_ring_buffer *ring;struct drm_i915_gem_request *request;int i, count; -for_each_ring (ring, dev_priv, i) { +for (i =0 ; i <I915_NUM_RINGS ; i++) { +struct intel_ring_buffer *ring = &dev_priv->ring[i]; + +if (ring->dev ==NULL ) +continue ; + + error->ring[i].valid = true; +i915_record_ring_state (dev, error, ring); error->ring[i].batchbuffer =
drivers/gpu/drm/i915/i915_reg.h +7 -3
@@ -1955,9 +1955,13 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) -#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +#define PORTD_HOTPLUG_LIVE_STATUS_G4X (1 << 29) +#define PORTC_HOTPLUG_LIVE_STATUS_G4X (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS_G4X (1 << 27) +/* VLV DP/HDMI bits again match Bspec */ +#define PORTD_HOTPLUG_LIVE_STATUS_VLV (1 << 27) +#define PORTC_HOTPLUG_LIVE_STATUS_VLV (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS_VLV (1 << 29)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)
drivers/gpu/drm/i915/intel_dp.c +28 -12
@@ -2803,18 +2803,34 @@ g4x_dp_detect(struct intel_dp *intel_dp)return status; } -switch (intel_dig_port->port) { -case PORT_B : - bit =PORTB_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_C : - bit =PORTC_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_D : - bit =PORTD_HOTPLUG_LIVE_STATUS ; -break ; -default : -return connector_status_unknown; +if (IS_VALLEYVIEW (dev)) { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS_VLV ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS_VLV ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS_VLV ; +break ; +default : +return connector_status_unknown; + } + }else { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS_G4X ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS_G4X ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS_G4X ; +break ; +default : +return connector_status_unknown; + } }if ((I915_READ (PORT_HOTPLUG_STAT ) & bit) ==0 )
drivers/gpu/drm/i915/intel_ringbuffer.c +8 -4
@@ -1501,8 +1501,8 @@ intel_ring_alloc_seqno(struct intel_ring_buffer *ring)return i915_gem_get_seqno (ring->dev, &ring->outstanding_lazy_request); } -static int __intel_ring_begin (struct intel_ring_buffer *ring, -int bytes) +static int __intel_ring_prepare (struct intel_ring_buffer *ring, +int bytes) {int ret;
@@ -1518,7 +1518,6 @@ static int __intel_ring_begin(struct intel_ring_buffer *ring,return ret; } - ring->space -= bytes;return 0 ; }
@@ -1533,12 +1532,17 @@ int intel_ring_begin(struct intel_ring_buffer *ring,if (ret)return ret; + ret =__intel_ring_prepare (ring, num_dwords *sizeof (uint32_t )); +if (ret) +return ret; +/* Preallocate the olr before touching the ring */ ret =intel_ring_alloc_seqno (ring);if (ret)return ret; -return __intel_ring_begin (ring, num_dwords *sizeof (uint32_t )); + ring->space -= num_dwords *sizeof (uint32_t ); +return 0 ; }void intel_ring_init_seqno (struct intel_ring_buffer *ring,u32 seqno)
drivers/gpu/drm/mgag200/mgag200_cursor.c +5 -3
@@ -22,8 +22,10 @@ static void mga_hide_cursor(struct mga_device *mdev) {WREG8 (MGA_CURPOSXL ,0 );WREG8 (MGA_CURPOSXH ,0 ); -mgag200_bo_unpin (mdev->cursor.pixels_1); -mgag200_bo_unpin (mdev->cursor.pixels_2); +if (mdev->cursor.pixels_1->pin_count) +mgag200_bo_unpin (mdev->cursor.pixels_1); +if (mdev->cursor.pixels_2->pin_count) +mgag200_bo_unpin (mdev->cursor.pixels_2); } int mga_crtc_cursor_set(struct drm_crtc *crtc,
@@ -32,7 +34,7 @@ int mga_crtc_cursor_set(struct drm_crtc *crtc, uint32_t width, uint32_t height) { -struct drm_device *dev = (struct drm_device *)file_priv->minor->dev; +struct drm_device *dev = crtc->dev;struct mga_device *mdev = (struct mga_device *)dev->dev_private;struct mgag200_bo *pixels_1 = mdev->cursor.pixels_1;struct mgag200_bo *pixels_2 = mdev->cursor.pixels_2;
drivers/gpu/drm/mgag200/mgag200_fb.c +1 -1
@@ -41,7 +41,7 @@ static void mga_dirty_update(struct mga_fbdev *mfbdev,* then the BO is being moved and we should * store up the damage until later. */ -if (!in_interrupt ()) +if (drm_can_sleep ()) ret =mgag200_bo_reserve (bo, true);if (ret) {if (ret != -EBUSY )
drivers/gpu/drm/mgag200/mgag200_mode.c +2 -2
@@ -1521,11 +1521,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector, (mga_vga_calculate_mode_bandwidth(mode, bpp) > (32700 * 1024))) {return MODE_BANDWIDTH ; - } else if (mode->type == G200_EH && + } else if (mdev->type == G200_EH && (mga_vga_calculate_mode_bandwidth (mode ,bpp ) > (37500 * 1024))) {return MODE_BANDWIDTH ; - } else if (mode->type == G200_ER && + } else if (mdev->type == G200_ER && (mga_vga_calculate_mode_bandwidth (mode , bpp) > (55000 * 1024))) {return MODE_BANDWIDTH ;
drivers/gpu/drm/nouveau/core/engine/falcon.c +15 -5
@@ -56,6 +56,16 @@ _nouveau_falcon_wr32(struct nouveau_object *object, u64 addr, u32 data)nv_wr32 (falcon, falcon->addr + addr, data); } +static void * +vmemdup (const void *src,size_t len) +{ +void *p =vmalloc (len); + +if (p) +memcpy (p, src, len); +return p; +} +int _nouveau_falcon_init (struct nouveau_object *object) {
@@ -111,7 +121,7 @@ _nouveau_falcon_init(struct nouveau_object *object) ret =request_firmware (&fw, name, &device->pdev->dev);if (ret ==0 ) { - falcon->code.data =kmemdup (fw->data, fw->size,GFP_KERNEL ); + falcon->code.data =vmemdup (fw->data, fw->size); falcon->code.size = fw->size; falcon->data.data =NULL ; falcon->data.size =0 ;
@@ -134,7 +144,7 @@ _nouveau_falcon_init(struct nouveau_object *object)return ret; } - falcon->data.data =kmemdup (fw->data, fw->size,GFP_KERNEL ); + falcon->data.data =vmemdup (fw->data, fw->size); falcon->data.size = fw->size;release_firmware (fw);if (!falcon->data.data)
@@ -149,7 +159,7 @@ _nouveau_falcon_init(struct nouveau_object *object)return ret; } - falcon->code.data =kmemdup (fw->data, fw->size,GFP_KERNEL ); + falcon->code.data =vmemdup (fw->data, fw->size); falcon->code.size = fw->size;release_firmware (fw);if (!falcon->code.data)
@@ -235,8 +245,8 @@ _nouveau_falcon_fini(struct nouveau_object *object, bool suspend)if (!suspend) {nouveau_gpuobj_ref (NULL , &falcon->core);if (falcon->external) { -kfree (falcon->data.data); -kfree (falcon->code.data); +vfree (falcon->data.data); +vfree (falcon->code.data); falcon->code.data =NULL ; } }
drivers/gpu/drm/nouveau/nouveau_bo.c +8 -25
@@ -802,25 +802,25 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) { struct nouveau_mem *node = old_mem->mm_node; -struct nouveau_bo *nvbo =nouveau_bo (bo);u64 length = (new_mem->num_pages <<PAGE_SHIFT );u64 src_offset = node->vma[0 ].offset;u64 dst_offset = node->vma[1 ].offset; +int src_tiled = !!node->memtype; +int dst_tiled = !!((struct nouveau_mem *)new_mem->mm_node)->memtype;int ret;while (length) {u32 amount, stride, height; + ret =RING_SPACE (chan,18 +6 * (src_tiled + dst_tiled)); +if (ret) +return ret; + amount =min (length, (u64)(4 *1024 *1024 )); stride =16 *4 ; height = amount / stride; -if (old_mem->mem_type ==TTM_PL_VRAM && -nouveau_bo_tile_layout (nvbo)) { - ret =RING_SPACE (chan,8 ); -if (ret) -return ret; - +if (src_tiled) {BEGIN_NV04 (chan, NvSubCopy,0x0200 ,7 );OUT_RING (chan,0 );OUT_RING (chan,0 );
@@ -830,19 +830,10 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,OUT_RING (chan,0 );OUT_RING (chan,0 ); }else { - ret =RING_SPACE (chan,2 ); -if (ret) -return ret; -BEGIN_NV04 (chan, NvSubCopy,0x0200 ,1 );OUT_RING (chan,1 ); } -if (new_mem->mem_type ==TTM_PL_VRAM && -nouveau_bo_tile_layout (nvbo)) { - ret =RING_SPACE (chan,8 ); -if (ret) -return ret; - +if (dst_tiled) {BEGIN_NV04 (chan, NvSubCopy,0x021c ,7 );OUT_RING (chan,0 );OUT_RING (chan,0 );
@@ -852,18 +843,10 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,OUT_RING (chan,0 );OUT_RING (chan,0 ); }else { - ret =RING_SPACE (chan,2 ); -if (ret) -return ret; -BEGIN_NV04 (chan, NvSubCopy,0x021c ,1 );OUT_RING (chan,1 ); } - ret =RING_SPACE (chan,14 ); -if (ret) -return ret; -BEGIN_NV04 (chan, NvSubCopy,0x0238 ,2 );OUT_RING (chan,upper_32_bits (src_offset));OUT_RING (chan,upper_32_bits (dst_offset));
drivers/gpu/drm/radeon/atombios_crtc.c +24 -1
@@ -209,6 +209,16 @@ static void atombios_enable_crtc_memreq(struct drm_crtc *crtc, int state)atom_execute_table (rdev->mode_info.atom_context, index, (uint32_t *)&args); } +static const u32 vga_control_regs[6 ] = +{ +AVIVO_D1VGA_CONTROL , +AVIVO_D2VGA_CONTROL , +EVERGREEN_D3VGA_CONTROL , +EVERGREEN_D4VGA_CONTROL , +EVERGREEN_D5VGA_CONTROL , +EVERGREEN_D6VGA_CONTROL , +}; +static void atombios_blank_crtc (struct drm_crtc *crtc,int state) {struct radeon_crtc *radeon_crtc =to_radeon_crtc (crtc);
@@ -216,13 +226,23 @@ static void atombios_blank_crtc(struct drm_crtc *crtc, int state)struct radeon_device *rdev = dev->dev_private;int index =GetIndexIntoMasterTable (COMMAND , BlankCRTC);BLANK_CRTC_PS_ALLOCATION args; +u32 vga_control =0 ;memset (&args,0 ,sizeof (args)); +if (ASIC_IS_DCE8 (rdev)) { + vga_control =RREG32 (vga_control_regs[radeon_crtc->crtc_id]); +WREG32 (vga_control_regs[radeon_crtc->crtc_id], vga_control |1 ); + } + args.ucCRTC = radeon_crtc->crtc_id; args.ucBlanking = state;atom_execute_table (rdev->mode_info.atom_context, index, (uint32_t *)&args); + +if (ASIC_IS_DCE8 (rdev)) { +WREG32 (vga_control_regs[radeon_crtc->crtc_id], vga_control); + } }static void atombios_powergate_crtc (struct drm_crtc *crtc,int state)
@@ -938,11 +958,14 @@ static bool atombios_crtc_prepare_pll(struct drm_crtc *crtc, struct drm_display_radeon_atombios_get_ppll_ss_info (rdev, &radeon_crtc->ss,ATOM_DP_SS_ID1 ); - }else + }else { radeon_crtc->ss_enabled =radeon_atombios_get_ppll_ss_info (rdev, &radeon_crtc->ss,ATOM_DP_SS_ID1 ); + } +/* disable spread spectrum on DCE3 DP */ + radeon_crtc->ss_enabled = false; }break ;case ATOM_ENCODER_MODE_LVDS :
drivers/gpu/drm/radeon/evergreen.c +2 -2
@@ -4249,8 +4249,8 @@ void evergreen_disable_interrupt_state(struct radeon_device *rdev)WREG32 (GRPH_INT_CONTROL +EVERGREEN_CRTC5_REGISTER_OFFSET ,0 ); } -/* only one DAC on DCE6 */ -if (!ASIC_IS_DCE6 (rdev)) +/* only one DAC on DCE5 */ +if (!ASIC_IS_DCE5 (rdev))WREG32 (DACA_AUTODETECT_INT_CONTROL ,0 );WREG32 (DACB_AUTODETECT_INT_CONTROL ,0 );
drivers/gpu/drm/radeon/evergreen_cs.c +4 -1
@@ -967,7 +967,10 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p)if (track->cb_dirty) { tmp = track->cb_target_mask;for (i =0 ; i <8 ; i++) { -if ((tmp >> (i *4 )) &0xF ) { +u32 format =G_028C70_FORMAT (track->cb_color_info[i]); + +if (format !=V_028C70_COLOR_INVALID && + (tmp >> (i *4 )) &0xF ) {/* at least one component is enabled */ if (track->cb_color_bo[i] ==NULL ) { dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n",
drivers/gpu/drm/radeon/ni.c +7 -9
@@ -1335,13 +1335,12 @@ void cayman_fence_ring_emit(struct radeon_device *rdev, {struct radeon_ring *ring = &rdev->ring[fence->ring];u64 addr = rdev->fence_drv[fence->ring].gpu_addr; +u32 cp_coher_cntl =PACKET3_FULL_CACHE_ENA |PACKET3_TC_ACTION_ENA | +PACKET3_SH_ACTION_ENA ;/* flush read cache over gart for this vmid */ -radeon_ring_write (ring,PACKET3 (PACKET3_SET_CONFIG_REG ,1 )); -radeon_ring_write (ring, (CP_COHER_CNTL2 -PACKET3_SET_CONFIG_REG_START ) >>2 ); -radeon_ring_write (ring,0 );radeon_ring_write (ring,PACKET3 (PACKET3_SURFACE_SYNC ,3 )); -radeon_ring_write (ring,PACKET3_TC_ACTION_ENA |PACKET3_SH_ACTION_ENA ); +radeon_ring_write (ring,PACKET3_ENGINE_ME | cp_coher_cntl);radeon_ring_write (ring,0xFFFFFFFF );radeon_ring_write (ring,0 );radeon_ring_write (ring,10 );/* poll interval */
@@ -1357,6 +1356,8 @@ void cayman_fence_ring_emit(struct radeon_device *rdev,void cayman_ring_ib_execute (struct radeon_device *rdev,struct radeon_ib *ib) {struct radeon_ring *ring = &rdev->ring[ib->ring]; +u32 cp_coher_cntl =PACKET3_FULL_CACHE_ENA |PACKET3_TC_ACTION_ENA | +PACKET3_SH_ACTION_ENA ;/* set to DX10/11 mode */ radeon_ring_write (ring,PACKET3 (PACKET3_MODE_CONTROL ,0 ));
@@ -1381,14 +1382,11 @@ void cayman_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib) (ib->vm ? (ib->vm->id << 24) : 0));/* flush read cache over gart for this vmid */ -radeon_ring_write (ring,PACKET3 (PACKET3_SET_CONFIG_REG ,1 )); -radeon_ring_write (ring, (CP_COHER_CNTL2 -PACKET3_SET_CONFIG_REG_START ) >>2 ); -radeon_ring_write (ring, ib->vm ? ib->vm->id :0 );radeon_ring_write (ring,PACKET3 (PACKET3_SURFACE_SYNC ,3 )); -radeon_ring_write (ring,PACKET3_TC_ACTION_ENA |PACKET3_SH_ACTION_ENA ); +radeon_ring_write (ring,PACKET3_ENGINE_ME | cp_coher_cntl);radeon_ring_write (ring,0xFFFFFFFF );radeon_ring_write (ring,0 ); -radeon_ring_write (ring,10 );/* poll interval */ +radeon_ring_write (ring, ((ib->vm ? ib->vm->id :0 ) <<24 ) |10 );/* poll interval */ }static void cayman_cp_enable (struct radeon_device *rdev,bool enable)
drivers/gpu/drm/radeon/nid.h +1 -0
@@ -1154,6 +1154,7 @@# define PACKET3_DB_ACTION_ENA (1 << 26)# define PACKET3_SH_ACTION_ENA (1 << 27)# define PACKET3_SX_ACTION_ENA (1 << 28) +# define PACKET3_ENGINE_ME (1 << 31)#define PACKET3_ME_INITIALIZE 0x44#define PACKET3_ME_INITIALIZE_DEVICE_ID (x) ((x) << 16)#define PACKET3_COND_WRITE 0x45
drivers/gpu/drm/radeon/r600.c +7 -6
@@ -2554,14 +2554,17 @@ void r600_fence_ring_emit(struct radeon_device *rdev, struct radeon_fence *fence) {struct radeon_ring *ring = &rdev->ring[fence->ring]; +u32 cp_coher_cntl =PACKET3_TC_ACTION_ENA |PACKET3_VC_ACTION_ENA | +PACKET3_SH_ACTION_ENA ; + +if (rdev->family >=CHIP_RV770 ) + cp_coher_cntl |=PACKET3_FULL_CACHE_ENA ;if (rdev->wb.use_event) {u64 addr = rdev->fence_drv[fence->ring].gpu_addr;/* flush read cache over gart */ radeon_ring_write (ring,PACKET3 (PACKET3_SURFACE_SYNC ,3 )); -radeon_ring_write (ring,PACKET3_TC_ACTION_ENA | -PACKET3_VC_ACTION_ENA | -PACKET3_SH_ACTION_ENA ); +radeon_ring_write (ring, cp_coher_cntl);radeon_ring_write (ring,0xFFFFFFFF );radeon_ring_write (ring,0 );radeon_ring_write (ring,10 );/* poll interval */
@@ -2575,9 +2578,7 @@ void r600_fence_ring_emit(struct radeon_device *rdev, }else {/* flush read cache over gart */ radeon_ring_write (ring,PACKET3 (PACKET3_SURFACE_SYNC ,3 )); -radeon_ring_write (ring,PACKET3_TC_ACTION_ENA | -PACKET3_VC_ACTION_ENA | -PACKET3_SH_ACTION_ENA ); +radeon_ring_write (ring, cp_coher_cntl);radeon_ring_write (ring,0xFFFFFFFF );radeon_ring_write (ring,0 );radeon_ring_write (ring,10 );/* poll interval */
drivers/gpu/drm/radeon/r600_cs.c +4 -1
@@ -749,7 +749,10 @@ static int r600_cs_track_check(struct radeon_cs_parser *p) }for (i =0 ; i <8 ; i++) { -if ((tmp >> (i *4 )) &0xF ) { +u32 format =G_0280A0_FORMAT (track->cb_color_info[i]); + +if (format !=V_0280A0_COLOR_INVALID && + (tmp >> (i *4 )) &0xF ) {/* at least one component is enabled */ if (track->cb_color_bo[i] ==NULL ) { dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n",
drivers/gpu/drm/radeon/r600d.h +1 -0
@@ -1547,6 +1547,7 @@# define PACKET3_CP_DMA_CMD_DAIC (1 << 29)#define PACKET3_SURFACE_SYNC 0x43# define PACKET3_CB0_DEST_BASE_ENA (1 << 6) +# define PACKET3_FULL_CACHE_ENA (1 << 20)/* r7xx+ only */ # define PACKET3_TC_ACTION_ENA (1 << 23)# define PACKET3_VC_ACTION_ENA (1 << 24)# define PACKET3_CB_ACTION_ENA (1 << 25)
drivers/gpu/drm/radeon/radeon_atombios.c +4 -0
@@ -3944,6 +3944,10 @@ void radeon_atom_initialize_bios_scratch_regs(struct drm_device *dev)/* tell the bios not to handle mode switching */ bios_6_scratch |=ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH ; +/* clear the vbios dpms state */ +if (ASIC_IS_DCE4 (rdev)) + bios_2_scratch &= ~ATOM_S2_DEVICE_DPMS_STATE ; +if (rdev->family >=CHIP_R600 ) {WREG32 (R600_BIOS_2_SCRATCH , bios_2_scratch);WREG32 (R600_BIOS_6_SCRATCH , bios_6_scratch);
drivers/gpu/drm/radeon/radeon_i2c.c +3 -0
@@ -1020,6 +1020,9 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c)/* Add the default buses */ void radeon_i2c_init (struct radeon_device *rdev) { +if (radeon_hw_i2c) +DRM_INFO ("hw_i2c forced on, you may experience display detection problems!\n" ); +if (rdev->is_atom_bios)radeon_atombios_i2c_init (rdev);else
drivers/gpu/drm/radeon/radeon_pm.c +4 -2
@@ -1024,8 +1024,10 @@ static void radeon_pm_resume_old(struct radeon_device *rdev) rdev->pm.current_clock_mode_index =0 ; rdev->pm.current_sclk = rdev->pm.default_sclk; rdev->pm.current_mclk = rdev->pm.default_mclk; - rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0 ].voltage.voltage; - rdev->pm.current_vddci = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0 ].voltage.vddci; +if (rdev->pm.power_state) { + rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0 ].voltage.voltage; + rdev->pm.current_vddci = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0 ].voltage.vddci; + }if (rdev->pm.pm_method ==PM_METHOD_DYNPM && rdev->pm.dynpm_state ==DYNPM_STATE_SUSPENDED ) { rdev->pm.dynpm_state =DYNPM_STATE_ACTIVE ;
drivers/gpu/drm/radeon/radeon_uvd.c +1 -0
@@ -91,6 +91,7 @@ int radeon_uvd_init(struct radeon_device *rdev)case CHIP_VERDE :case CHIP_PITCAIRN :case CHIP_ARUBA : +case CHIP_OLAND : fw_name =FIRMWARE_TAHITI ;break ;
drivers/gpu/drm/radeon/rv770_dpm.c +6 -0
@@ -2531,6 +2531,12 @@ bool rv770_dpm_vblank_too_short(struct radeon_device *rdev) (rdev->pdev->subsystem_device == 0x1c42)) switch_limit =200 ; +/* RV770 */ +/* mclk switching doesn't seem to work reliably on desktop RV770s */ +if ((rdev->family ==CHIP_RV770 ) && + !(rdev->flags &RADEON_IS_MOBILITY )) + switch_limit =0xffffffff ;/* disable mclk switching */ +if (vblank_time < switch_limit)return true;else
drivers/gpu/drm/radeon/si.c +1 -1
@@ -5625,7 +5625,7 @@ static void si_disable_interrupt_state(struct radeon_device *rdev) }if (!ASIC_IS_NODCE (rdev)) { -WREG32 (DACA_AUTODETECT_INT_CONTROL ,0 ); +WREG32 (DAC_AUTODETECT_INT_CONTROL ,0 ); tmp =RREG32 (DC_HPD1_INT_CONTROL ) & DC_HPDx_INT_POLARITY;WREG32 (DC_HPD1_INT_CONTROL , tmp);
drivers/gpu/drm/radeon/sid.h +1 -1
@@ -770,7 +770,7 @@# define GRPH_PFLIP_INT_MASK (1 << 0)# define GRPH_PFLIP_INT_TYPE (1 << 8) -#define DACA_AUTODETECT_INT_CONTROL 0x66c8 +#define DAC_AUTODETECT_INT_CONTROL 0x67c8#define DC_HPD1_INT_STATUS 0x601c#define DC_HPD2_INT_STATUS 0x6028
drivers/gpu/drm/radeon/uvd_v2_2.c +1 -0
@@ -153,6 +153,7 @@ int uvd_v2_2_resume(struct radeon_device *rdev) chip_id =0x01000015 ;break ;case CHIP_PITCAIRN : +case CHIP_OLAND : chip_id =0x01000016 ;break ;case CHIP_ARUBA :
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +0 -1
@@ -371,7 +371,6 @@ static int rcar_du_crtc_mode_set(struct drm_crtc *crtc, goto error; rcrtc->plane->format = format; - rcrtc->plane->pitch = crtc->fb->pitches[0 ]; rcrtc->plane->src_x = x; rcrtc->plane->src_y = y;
drivers/gpu/drm/rcar-du/rcar_du_plane.c +11 -10
@@ -104,6 +104,15 @@ void rcar_du_plane_update_base(struct rcar_du_plane *plane) {struct rcar_du_group *rgrp = plane->group;unsigned int index = plane->hwindex; +u32 mwr; + +/* Memory pitch (expressed in pixels) */ +if (plane->format->planes ==2 ) + mwr = plane->pitch; +else + mwr = plane->pitch *8 / plane->format->bpp; + +rcar_du_plane_write (rgrp, index, PnMWR, mwr);/* The Y position is expressed in raster line units and must be doubled * for 32bpp formats, according to the R8A7790 datasheet. No mention of
@@ -133,6 +142,8 @@ void rcar_du_plane_compute_base(struct rcar_du_plane *plane, {struct drm_gem_cma_object *gem; + plane->pitch = fb->pitches[0 ]; + gem =drm_fb_cma_get_gem_obj (fb,0 ); plane->dma[0 ] = gem->paddr + fb->offsets[0 ];
@@ -209,7 +220,6 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane,struct rcar_du_group *rgrp = plane->group;u32 ddcr2 = PnDDCR2_CODE;u32 ddcr4; -u32 mwr;/* Data format *
@@ -240,14 +250,6 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane,rcar_du_plane_write (rgrp, index, PnDDCR2, ddcr2);rcar_du_plane_write (rgrp, index, PnDDCR4, ddcr4); -/* Memory pitch (expressed in pixels) */ -if (plane->format->planes ==2 ) - mwr = plane->pitch; -else - mwr = plane->pitch *8 / plane->format->bpp; - -rcar_du_plane_write (rgrp, index, PnMWR, mwr); -/* Destination position and size */ rcar_du_plane_write (rgrp, index, PnDSXR, plane->width);rcar_du_plane_write (rgrp, index, PnDSYR, plane->height);
@@ -309,7 +311,6 @@ rcar_du_plane_update(struct drm_plane *plane, struct drm_crtc *crtc, rplane->crtc = crtc; rplane->format = format; - rplane->pitch = fb->pitches[0 ]; rplane->src_x = src_x >>16 ; rplane->src_y = src_y >>16 ;
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +5 -4
@@ -1483,11 +1483,11 @@ int vmw_execbuf_process(struct drm_file *file_priv, ret =vmw_cmd_check_all (dev_priv, sw_context, kernel_commands, command_size);if (unlikely (ret !=0 )) - goto out_err; + goto out_err_nores; ret =vmw_resources_reserve (sw_context);if (unlikely (ret !=0 )) - goto out_err; + goto out_err_nores; ret =ttm_eu_reserve_buffers (&ticket, &sw_context->validate_nodes);if (unlikely (ret !=0 ))
@@ -1569,10 +1569,11 @@ int vmw_execbuf_process(struct drm_file *file_priv,return 0 ; out_err: -vmw_resource_relocations_free (&sw_context->res_relocations); -vmw_free_relocations (sw_context);ttm_eu_backoff_reservation (&ticket, &sw_context->validate_nodes); +out_err_nores:vmw_resource_list_unreserve (&sw_context->resource_list, true); +vmw_resource_relocations_free (&sw_context->res_relocations); +vmw_free_relocations (sw_context);vmw_clear_validations (sw_context);if (unlikely (dev_priv->pinned_bo !=NULL && !dev_priv->query_cid_valid))
drivers/infiniband/hw/qib/qib_ud.c +8 -1
@@ -57,13 +57,20 @@ static void qib_ud_loopback(struct qib_qp *sqp, struct qib_swqe *swqe)struct qib_sge *sge;struct ib_wc wc;u32 length; +enum ib_qp_type sqptype, dqptype; qp =qib_lookup_qpn (ibp, swqe->wr.wr.ud.remote_qpn);if (!qp) { ibp->n_pkt_drops++;return ; } -if (qp->ibqp.qp_type != sqp->ibqp.qp_type || + + sqptype = sqp->ibqp.qp_type ==IB_QPT_GSI ? +IB_QPT_UD : sqp->ibqp.qp_type; + dqptype = qp->ibqp.qp_type ==IB_QPT_GSI ? +IB_QPT_UD : qp->ibqp.qp_type; + +if (dqptype != sqptype || !(ib_qib_state_ops[qp->state] &QIB_PROCESS_RECV_OK )) { ibp->n_pkt_drops++; goto drop;
drivers/input/misc/xen-kbdfront.c +4 -0
@@ -29,6 +29,7 @@#include <xen/interface/io/fbif.h> #include <xen/interface/io/kbdif.h> #include <xen/xenbus.h> +#include <xen/platform_pci.h> struct xenkbd_info {struct input_dev *kbd;
@@ -380,6 +381,9 @@ static int __init xenkbd_init(void)if (xen_initial_domain ())return -ENODEV ; +if (!xen_has_pv_devices ()) +return -ENODEV ; +return xenbus_register_frontend (&xenkbd_driver); }
drivers/iommu/intel-iommu.c +1 -1
@@ -917,7 +917,7 @@ static void dma_pte_free_level(struct dmar_domain *domain, int level,/* If range covers entire pagetable, free it */ if (!(start_pfn > level_pfn || - last_pfn < level_pfn +level_size (level))) { + last_pfn < level_pfn +level_size (level) -1 )) {dma_clear_pte (pte);domain_flush_cache (domain, pte,sizeof (*pte));free_pgtable_page (level_pte);
drivers/md/Kconfig +4 -0
@@ -176,8 +176,12 @@ config MD_FAULTY source "drivers/md/bcache/Kconfig" +config BLK_DEV_DM_BUILTIN + boolean + config BLK_DEV_DM tristate "Device mapper support" + select BLK_DEV_DM_BUILTIN ---help--- Device-mapper is a low level volume manager. It works by allowing people to specify mappings for ranges of logical sectors. Various
drivers/md/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_MD_FAULTY) += faulty.o obj-$(CONFIG_BCACHE) += bcache/ obj-$(CONFIG_BLK_DEV_MD) += md-mod.o obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o +obj-$(CONFIG_BLK_DEV_DM_BUILTIN) += dm-builtin.o obj-$(CONFIG_DM_BUFIO) += dm-bufio.o obj-$(CONFIG_DM_BIO_PRISON) += dm-bio-prison.o obj-$(CONFIG_DM_CRYPT) += dm-crypt.o
drivers/md/dm-builtin.c new file +48 -0
48 lines not on this page · raw message
drivers/md/dm-sysfs.c +4 -1
@@ -86,6 +86,7 @@ static const struct sysfs_ops dm_sysfs_ops = {static struct kobj_type dm_ktype = { .sysfs_ops = &dm_sysfs_ops, .default_attrs = dm_attrs, + .release = dm_kobject_release, };/*
@@ -104,5 +105,7 @@ int dm_sysfs_init(struct mapped_device *md)*/ void dm_sysfs_exit (struct mapped_device *md) { -kobject_put (dm_kobject (md)); +struct kobject *kobj =dm_kobject (md); +kobject_put (kobj); +wait_for_completion (dm_get_completion_from_kobject (kobj)); }
drivers/md/dm-thin-metadata.c +20 -0
@@ -1349,6 +1349,12 @@ dm_thin_id dm_thin_dev_id(struct dm_thin_device *td)return td->id; } +/* +* Check whether @time (of block creation) is older than @td's last snapshot. +* If so then the associated block is shared with the last snapshot device. +* Any block on a device created *after* the device last got snapshotted is +* necessarily not shared. +*/ static bool __snapshotted_since (struct dm_thin_device *td,uint32_t time) {return td->snapshotted_time > time;
@@ -1458,6 +1464,20 @@ int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block)return r; } +int dm_pool_block_is_used (struct dm_pool_metadata *pmd,dm_block_t b,bool *result) +{ +int r; +uint32_t ref_count; + +down_read (&pmd->root_lock); + r =dm_sm_get_count (pmd->data_sm, b, &ref_count); +if (!r) + *result = (ref_count !=0 ); +up_read (&pmd->root_lock); + +return r; +} +bool dm_thin_changed_this_transaction (struct dm_thin_device *td) {int r;
drivers/md/dm-thin-metadata.h +2 -0
@@ -181,6 +181,8 @@ int dm_pool_get_data_block_size(struct dm_pool_metadata *pmd, sector_t *result);int dm_pool_get_data_dev_size (struct dm_pool_metadata *pmd,dm_block_t *result); +int dm_pool_block_is_used (struct dm_pool_metadata *pmd,dm_block_t b,bool *result); +/* * Returns -ENOSPC if the new size is too small and already allocated * blocks would be lost.
drivers/md/dm-thin.c +45 -26
170 lines not on this page · raw message
drivers/md/dm.c +5 -10
@@ -194,8 +194,8 @@ struct mapped_device {/* forced geometry settings */ struct hd_geometry geometry; -/* sysfs handle */ -struct kobject kobj; +/* kobject and completion */ +struct dm_kobject_holder kobj_holder;/* zero-length flush that will be cloned and submitted to targets */ struct bio flush_bio;
@@ -2005,6 +2005,7 @@ static struct mapped_device *alloc_dev(int minor)init_waitqueue_head (&md->wait);INIT_WORK (&md->work, dm_wq_work);init_waitqueue_head (&md->eventq); +init_completion (&md->kobj_holder.completion); md->disk->major = _major; md->disk->first_minor = minor;
@@ -2866,20 +2867,14 @@ struct gendisk *dm_disk(struct mapped_device *md)struct kobject *dm_kobject (struct mapped_device *md) { -return &md->kobj; +return &md->kobj_holder.kobj; } -/* -* struct mapped_device should not be exported outside of dm.c -* so use this check to verify that kobj is part of md structure -*/ struct mapped_device *dm_get_from_kobject (struct kobject *kobj) {struct mapped_device *md; - md = container_of(kobj, struct mapped_device, kobj); -if (&md->kobj != kobj) -return NULL ; + md = container_of(kobj, struct mapped_device, kobj_holder.kobj);if (test_bit (DMF_FREEING , &md->flags) ||dm_deleting_md (md))
drivers/md/dm.h +17 -0
@@ -15,6 +15,8 @@#include <linux/list.h> #include <linux/blkdev.h> #include <linux/hdreg.h> +#include <linux/completion.h> +#include <linux/kobject.h> #include "dm-stats.h"
@@ -138,12 +140,27 @@ void dm_interface_exit(void);/* * sysfs interface */ +struct dm_kobject_holder { +struct kobject kobj; +struct completion completion; +}; + +static inline struct completion *dm_get_completion_from_kobject (struct kobject *kobj) +{ + return &container_of(kobj, struct dm_kobject_holder, kobj)->completion; +} +int dm_sysfs_init (struct mapped_device *md);void dm_sysfs_exit (struct mapped_device *md);struct kobject *dm_kobject (struct mapped_device *md);struct mapped_device *dm_get_from_kobject (struct kobject *kobj);/* +* The kobject helper +*/ +void dm_kobject_release (struct kobject *kobj); + +/* * Targets for linear and striped mappings */ int dm_linear_init (void );
drivers/md/persistent-data/dm-space-map-common.c +5 -1
@@ -245,6 +245,10 @@ int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks)return -EINVAL ; } +/* +* We need to set this before the dm_tm_new_block() call below. +*/ + ll->nr_blocks = nr_blocks;for (i = old_blocks; i < blocks; i++) {struct dm_block *b;struct disk_index_entry idx;
@@ -252,6 +256,7 @@ int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks) r =dm_tm_new_block (ll->tm, &dm_sm_bitmap_validator, &b);if (r <0 )return r; + idx.blocknr =cpu_to_le64 (dm_block_location (b)); r =dm_tm_unlock (ll->tm, b);
@@ -266,7 +271,6 @@ int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks)return r; } - ll->nr_blocks = nr_blocks;return 0 ; }
drivers/md/persistent-data/dm-space-map-metadata.c +23 -5
@@ -608,20 +608,38 @@ static int sm_metadata_extend(struct dm_space_map *sm, dm_block_t extra_blocks)* Flick into a mode where all blocks get allocated in the new area. */ smm->begin = old_len; -memcpy (&smm->sm, &bootstrap_ops,sizeof (smm->sm)); +memcpy (sm, &bootstrap_ops,sizeof (*sm));/* * Extend. */ r =sm_ll_extend (&smm->ll, extra_blocks); +if (r) + goto out;/* -* Switch back to normal behaviour. +* We repeatedly increment then commit until the commit doesn't +* allocate any new blocks. */ -memcpy (&smm->sm, &ops,sizeof (smm->sm)); -for (i = old_len; !r && i < smm->begin; i++) - r =sm_ll_inc (&smm->ll, i, &ev); +do { +for (i = old_len; !r && i < smm->begin; i++) { + r =sm_ll_inc (&smm->ll, i, &ev); +if (r) + goto out; + } + old_len = smm->begin; + + r =sm_ll_commit (&smm->ll); +if (r) + goto out; + + }while (old_len != smm->begin); +out: +/* +* Switch back to normal behaviour. +*/ +memcpy (sm, &ops,sizeof (*sm));return r; }
drivers/media/dvb-core/dvb-usb-ids.h +1 -0
@@ -239,6 +239,7 @@#define USB_PID_AVERMEDIA_A835B_4835 0x4835#define USB_PID_AVERMEDIA_1867 0x1867#define USB_PID_AVERMEDIA_A867 0xa867 +#define USB_PID_AVERMEDIA_H335 0x0335#define USB_PID_AVERMEDIA_TWINSTAR 0x0825#define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006#define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009
drivers/media/dvb-frontends/dib8000.c +31 -11
81 lines not on this page · raw message
drivers/media/dvb-frontends/m88rs2000.c +87 -30
170 lines not on this page · raw message
drivers/media/dvb-frontends/m88rs2000.h +2 -0
@@ -53,6 +53,8 @@ static inline struct dvb_frontend *m88rs2000_attach( }#endif /* CONFIG_DVB_M88RS2000 */ +#define RS2000_FE_CRYSTAL_KHZ 27000 +enum {DEMOD_WRITE =0x1 ,WRITE_DELAY =0x10 ,
drivers/media/dvb-frontends/nxt200x.c +1 -1
@@ -40,7 +40,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt/* Max transfer size done by I2C transfer functions */ -#define MAX_XFER_SIZE 64 +#define MAX_XFER_SIZE 256#define NXT2002_DEFAULT_FIRMWARE "dvb-fe-nxt2002.fw"#define NXT2004_DEFAULT_FIRMWARE "dvb-fe-nxt2004.fw"
drivers/media/platform/s5p-mfc/s5p_mfc.c +7 -21
@@ -177,21 +177,6 @@ unlock:mutex_unlock (&dev->mfc_mutex); } -static enum s5p_mfc_node_type s5p_mfc_get_node_type (struct file *file) -{ -struct video_device *vdev =video_devdata (file); - -if (!vdev) { -mfc_err ("failed to get video_device" ); -return MFCNODE_INVALID ; - } -if (vdev->index ==0 ) -return MFCNODE_DECODER ; -else if (vdev->index ==1 ) -return MFCNODE_ENCODER ; -return MFCNODE_INVALID ; -} -static void s5p_mfc_clear_int_flags (struct s5p_mfc_dev *dev) {mfc_write (dev,0 ,S5P_FIMV_RISC_HOST_INT );
@@ -701,6 +686,7 @@ irq_cleanup_hw:/* Open an MFC node */ static int s5p_mfc_open (struct file *file) { +struct video_device *vdev =video_devdata (file);struct s5p_mfc_dev *dev =video_drvdata (file);struct s5p_mfc_ctx *ctx =NULL ;struct vb2_queue *q;
@@ -738,7 +724,7 @@ static int s5p_mfc_open(struct file *file)/* Mark context as idle */ clear_work_bit_irqsave (ctx); dev->ctx[ctx->num] = ctx; -if (s5p_mfc_get_node_type (file) ==MFCNODE_DECODER ) { +if (vdev == dev->vfd_dec) { ctx->type =MFCINST_DECODER ; ctx->c_ops =get_dec_codec_ops ();s5p_mfc_dec_init (ctx);
@@ -748,7 +734,7 @@ static int s5p_mfc_open(struct file *file)mfc_err ("Failed to setup mfc controls\n" ); goto err_ctrls_setup; } - }else if (s5p_mfc_get_node_type (file) ==MFCNODE_ENCODER ) { + }else if (vdev == dev->vfd_enc) { ctx->type =MFCINST_ENCODER ; ctx->c_ops =get_enc_codec_ops ();/* only for encoder */
@@ -793,10 +779,10 @@ static int s5p_mfc_open(struct file *file) q = &ctx->vq_dst; q->type =V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE ; q->drv_priv = &ctx->fh; -if (s5p_mfc_get_node_type (file) ==MFCNODE_DECODER ) { +if (vdev == dev->vfd_dec) { q->io_modes =VB2_MMAP ; q->ops =get_dec_queue_ops (); - }else if (s5p_mfc_get_node_type (file) ==MFCNODE_ENCODER ) { + }else if (vdev == dev->vfd_enc) { q->io_modes =VB2_MMAP |VB2_USERPTR ; q->ops =get_enc_queue_ops (); }else {
@@ -815,10 +801,10 @@ static int s5p_mfc_open(struct file *file) q->type =V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ; q->io_modes =VB2_MMAP ; q->drv_priv = &ctx->fh; -if (s5p_mfc_get_node_type (file) ==MFCNODE_DECODER ) { +if (vdev == dev->vfd_dec) { q->io_modes =VB2_MMAP ; q->ops =get_dec_queue_ops (); - }else if (s5p_mfc_get_node_type (file) ==MFCNODE_ENCODER ) { + }else if (vdev == dev->vfd_enc) { q->io_modes =VB2_MMAP |VB2_USERPTR ; q->ops =get_enc_queue_ops (); }else {
drivers/media/platform/s5p-mfc/s5p_mfc_common.h +0 -9
@@ -115,15 +115,6 @@ enum s5p_mfc_fmt_type { };/** -* enum s5p_mfc_node_type - The type of an MFC device node. -*/ -enum s5p_mfc_node_type { -MFCNODE_INVALID =-1 , -MFCNODE_DECODER =0 , -MFCNODE_ENCODER =1 , -}; - -/** * enum s5p_mfc_inst_type - The type of an MFC instance. */ enum s5p_mfc_inst_type {
drivers/media/usb/dvb-usb-v2/anysee.c +2 -1
@@ -442,6 +442,7 @@ static struct cxd2820r_config anysee_cxd2820r_config = {* IOD[0] ZL10353 1=enabled * IOE[0] tuner 0=enabled * tuner is behind ZL10353 I2C-gate +* tuner is behind TDA10023 I2C-gate * * E7 TC VID=1c73 PID=861f HW=18 FW=0.7 AMTCI=0.5 "anysee-E7TC(LP)" * PCB: 508TC (rev0.6)
@@ -956,7 +957,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap)if (fe && adap->fe[1 ]) {/* attach tuner for 2nd FE */ - fe =dvb_attach (dvb_pll_attach, adap->fe[0 ], + fe =dvb_attach (dvb_pll_attach, adap->fe[1 ], (0xc0 >>1 ), &d->i2c_adap,DVB_PLL_SAMSUNG_DTOS403IH102A ); }
drivers/media/usb/dvb-usb-v2/it913x.c +3 -0
@@ -799,6 +799,9 @@ static const struct usb_device_id it913x_id_table[] = { {DVB_USB_DEVICE (USB_VID_KWORLD_2 ,USB_PID_CTVDIGDUAL_V2 , &it913x_properties,"Digital Dual TV Receiver CTVDIGDUAL_V2" , RC_MAP_IT913X_V1) }, + { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_H335, + &it913x_properties,"Avermedia H335" , + RC_MAP_IT913X_V2) }, {} /* Terminating entry */ };
drivers/media/v4l2-core/v4l2-dev.c +1 -1
@@ -872,8 +872,8 @@ int __video_register_device(struct video_device *vdev, int type, int nr,/* Should not happen since we thought this minor was free */ WARN_ON (video_device[vdev->minor] !=NULL ); - video_device[vdev->minor] = vdev; vdev->index =get_index (vdev); + video_device[vdev->minor] = vdev;mutex_unlock (&videodev_lock);if (vdev->ioctl_ops)
drivers/misc/mei/hbm.c +1 -1
@@ -593,7 +593,7 @@ void mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)*/ if (dev->hbm_state ==MEI_HBM_IDLE ) {dev_dbg (&dev->pdev->dev,"hbm: state is idle ignore spurious messages\n" ); -return 0 ; +return ; }switch (mei_msg->hbm_cmd) {
drivers/mmc/card/block.c +4 -3
@@ -1959,6 +1959,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)struct mmc_card *card = md->queue.card;struct mmc_host *host = card->host;unsigned long flags; +unsigned int cmd_flags = req ? req->cmd_flags :0 ;if (req && !mq->mqrq_prev->req)/* claim host only for the first request */
@@ -1974,7 +1975,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) } mq->flags &= ~MMC_QUEUE_NEW_REQUEST ; -if (req && req->cmd_flags &REQ_DISCARD ) { +if (cmd_flags &REQ_DISCARD ) {/* complete ongoing async transfer before issuing discard */ if (card->host->areq)mmc_blk_issue_rw_rq (mq,NULL );
@@ -1983,7 +1984,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) ret =mmc_blk_issue_secdiscard_rq (mq, req); else ret =mmc_blk_issue_discard_rq (mq, req); - }else if (req && req->cmd_flags &REQ_FLUSH ) { + }else if (cmd_flags &REQ_FLUSH ) {/* complete ongoing async transfer before issuing flush */ if (card->host->areq)mmc_blk_issue_rw_rq (mq,NULL );
@@ -1999,7 +2000,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) out:if ((!req && !(mq->flags &MMC_QUEUE_NEW_REQUEST )) || - (req && (req->cmd_flags &MMC_REQ_SPECIAL_MASK ))) + (cmd_flags &MMC_REQ_SPECIAL_MASK ))/* * Release host when there are no more requests * and after special request(discard, flush) is done.
drivers/mmc/core/sd.c +22 -15
@@ -11,6 +11,7 @@*/ #include <linux/err.h> +#include <linux/sizes.h> #include <linux/slab.h> #include <linux/stat.h>
@@ -44,6 +45,13 @@ static const unsigned int tacc_mant[] = { 35, 40, 45, 50, 55, 60, 70, 80, }; +static const unsigned int sd_au_size[] = { +0 ,SZ_16K /512 ,SZ_32K /512 ,SZ_64K /512 , +SZ_128K /512 ,SZ_256K /512 ,SZ_512K /512 ,SZ_1M /512 , +SZ_2M /512 ,SZ_4M /512 ,SZ_8M /512 , (SZ_8M +SZ_4M ) /512 , +SZ_16M /512 , (SZ_16M +SZ_8M ) /512 ,SZ_32M /512 ,SZ_64M /512 , +}; +#define UNSTUFF_BITS (resp,start,size) \ ({ \ const int __size = size; \
@@ -215,7 +223,7 @@ static int mmc_decode_scr(struct mmc_card *card)static int mmc_read_ssr (struct mmc_card *card) {unsigned int au, es, et, eo; -int err, i, max_au; +int err, i;u32 *ssr;if (!(card->csd.cmdclass &CCC_APP_SPEC )) {
@@ -239,26 +247,25 @@ static int mmc_read_ssr(struct mmc_card *card)for (i =0 ; i <16 ; i++) ssr[i] =be32_to_cpu (ssr[i]); -/* SD3.0 increases max AU size to 64MB (0xF) from 4MB (0x9) */ - max_au = card->scr.sda_spec3 ?0xF :0x9 ; -/* * UNSTUFF_BITS only works with four u32s so we have to offset the * bitfield positions accordingly. */ au =UNSTUFF_BITS (ssr,428 -384 ,4 ); -if (au >0 && au <= max_au) { - card->ssr.au =1 << (au +4 ); - es =UNSTUFF_BITS (ssr,408 -384 ,16 ); - et =UNSTUFF_BITS (ssr,402 -384 ,6 ); - eo =UNSTUFF_BITS (ssr,400 -384 ,2 ); -if (es && et) { - card->ssr.erase_timeout = (et *1000 ) / es; - card->ssr.erase_offset = eo *1000 ; +if (au) { +if (au <=9 || card->scr.sda_spec3) { + card->ssr.au = sd_au_size[au]; + es =UNSTUFF_BITS (ssr,408 -384 ,16 ); + et =UNSTUFF_BITS (ssr,402 -384 ,6 ); +if (es && et) { + eo =UNSTUFF_BITS (ssr,400 -384 ,2 ); + card->ssr.erase_timeout = (et *1000 ) / es; + card->ssr.erase_offset = eo *1000 ; + } + }else { +pr_warning ("%s: SD Status: Invalid Allocation Unit size.\n" , +mmc_hostname (card->host)); } - }else { -pr_warning ("%s: SD Status: Invalid Allocation Unit " -"size.\n" ,mmc_hostname (card->host)); } out:kfree (ssr);
drivers/mmc/host/atmel-mci.c +12 -1
@@ -1193,11 +1193,22 @@ static void atmci_start_request(struct atmel_mci *host, iflags |=ATMCI_CMDRDY ; cmd = mrq->cmd; cmdflags =atmci_prepare_command (slot->mmc, cmd); -atmci_send_command (host, cmd, cmdflags); + +/* +* DMA transfer should be started before sending the command to avoid +* unexpected errors especially for read operations in SDIO mode. +* Unfortunately, in PDC mode, command has to be sent before starting +* the transfer. +*/ +if (host->submit_data != &atmci_submit_data_dma) +atmci_send_command (host, cmd, cmdflags);if (data) host->submit_data (host, data); +if (host->submit_data == &atmci_submit_data_dma) +atmci_send_command (host, cmd, cmdflags); +if (mrq->stop) { host->stop_cmdr =atmci_prepare_command (slot->mmc, mrq->stop); host->stop_cmdr |=ATMCI_CMDR_STOP_XFER ;
drivers/mmc/host/sdhci-pci.c +12 -0
@@ -59,6 +59,7 @@ struct sdhci_pci_fixes {unsigned int quirks;unsigned int quirks2;bool allow_runtime_pm; +bool own_cd_for_runtime_pm;int (*probe) (struct sdhci_pci_chip *);
@@ -290,6 +291,7 @@ static const struct sdhci_pci_fixes sdhci_intel_mrst_hc1_hc2 = {static const struct sdhci_pci_fixes sdhci_intel_mfd_sd = { .quirks =SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC , .allow_runtime_pm = true, + .own_cd_for_runtime_pm = true, };static const struct sdhci_pci_fixes sdhci_intel_mfd_sdio = {
@@ -354,6 +356,7 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {static const struct sdhci_pci_fixes sdhci_intel_byt_sd = { .quirks2 =SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON , .allow_runtime_pm = true, + .own_cd_for_runtime_pm = true, };/* O2Micro extra registers */
@@ -1381,6 +1384,15 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(sdhci_pci_add_own_cd (slot); +/* +* Check if the chip needs a separate GPIO for card detect to wake up +* from runtime suspend. If it is not there, don't allow runtime PM. +* Note sdhci_pci_add_own_cd() sets slot->cd_gpio to -EINVAL on failure. +*/ +if (chip->fixes && chip->fixes->own_cd_for_runtime_pm && + !gpio_is_valid (slot->cd_gpio)) + chip->allow_runtime_pm = false; +return slot; remove:
drivers/mtd/nand/mxc_nand.c +0 -1
@@ -676,7 +676,6 @@ static int mxc_nand_correct_data_v2_v3(struct mtd_info *mtd, u_char *dat, ecc_stat >>=4 ; }while (--no_subpages); - mtd->ecc_stats.corrected += ret;pr_debug ("%d Symbol Correctable RS-ECC Error\n" , ret);return ret;
drivers/net/xen-netfront.c +1 -1
@@ -2070,7 +2070,7 @@ static int __init netif_init(void)if (!xen_domain ())return -ENODEV ; -if (xen_hvm_domain () && !xen_platform_pci_unplug) +if (!xen_has_pv_nic_devices ())return -ENODEV ;pr_info ("Initialising Xen virtual ethernet driver\n" );
drivers/pci/xen-pcifront.c +4 -0
@@ -20,6 +20,7 @@#include <linux/workqueue.h> #include <linux/bitops.h> #include <linux/time.h> +#include <xen/platform_pci.h> #include <asm/xen/swiotlb-xen.h> #define INVALID_GRANT_REF (0)
@@ -1138,6 +1139,9 @@ static int __init pcifront_init(void)if (!xen_pv_domain () ||xen_initial_domain ())return -ENODEV ; +if (!xen_has_pv_devices ()) +return -ENODEV ; +pci_frontend_registrar (1 /* enable */ );return xenbus_register_frontend (&xenpci_driver);
drivers/rtc/rtc-cmos.c +51 -1
80 lines not on this page · raw message
drivers/spi/spi-bcm63xx.c +0 -2
@@ -169,8 +169,6 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first, transfer_list); } - len -= prepend_len; -init_completion (&bs->done);/* Fill in the Message control register */
drivers/spi/spi-pxa2xx.c +2 -0
@@ -1070,6 +1070,8 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev) pdata->num_chipselect =1 ; pdata->enable_dma = true; + pdata->tx_chan_id =-1 ; + pdata->rx_chan_id =-1 ;return pdata; }
drivers/spi/spi.c +3 -1
@@ -600,7 +600,9 @@ static void spi_pump_messages(struct kthread_work *work) ret = master->transfer_one_message (master, master->cur_msg);if (ret) {dev_err (&master->dev, -"failed to transfer one message from queue\n" ); +"failed to transfer one message from queue: %d\n" , ret); + master->cur_msg->status = ret; +spi_finalize_current_message (master);return ; } }
drivers/target/iscsi/iscsi_target_util.c +6 -2
@@ -156,9 +156,13 @@ struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn, gfp_t gfp_mask) {struct iscsi_cmd *cmd;struct se_session *se_sess = conn->sess->se_sess; -int size, tag; +int size, tag, state = (gfp_mask & __GFP_WAIT) ?TASK_INTERRUPTIBLE : +TASK_RUNNING ; + + tag =percpu_ida_alloc (&se_sess->sess_tag_pool, state); +if (tag <0 ) +return NULL ; - tag =percpu_ida_alloc (&se_sess->sess_tag_pool, gfp_mask); size =sizeof (struct iscsi_cmd ) + conn->conn_transport->priv_size; cmd = (struct iscsi_cmd *)(se_sess->sess_cmd_map + (tag * size));memset (cmd,0 , size);
drivers/vhost/scsi.c +1 -1
@@ -728,7 +728,7 @@ vhost_scsi_get_tag(struct vhost_virtqueue *vq, } se_sess = tv_nexus->tvn_se_sess; - tag =percpu_ida_alloc (&se_sess->sess_tag_pool,GFP_ATOMIC ); + tag =percpu_ida_alloc (&se_sess->sess_tag_pool,TASK_RUNNING );if (tag <0 ) {pr_err ("Unable to obtain tag for tcm_vhost_cmd\n" );return ERR_PTR (-ENOMEM );
drivers/video/xen-fbfront.c +4 -0
@@ -35,6 +35,7 @@#include <xen/interface/io/fbif.h> #include <xen/interface/io/protocols.h> #include <xen/xenbus.h> +#include <xen/platform_pci.h> struct xenfb_info {unsigned char *fb;
@@ -699,6 +700,9 @@ static int __init xenfb_init(void)if (xen_initial_domain ())return -ENODEV ; +if (!xen_has_pv_devices ()) +return -ENODEV ; +return xenbus_register_frontend (&xenfb_driver); }
drivers/xen/xenbus/xenbus_probe_frontend.c +1 -1
@@ -496,7 +496,7 @@ subsys_initcall(xenbus_probe_frontend_init);#ifndef MODULE static int __init boot_wait_for_devices (void ) { -if (xen_hvm_domain () && !xen_platform_pci_unplug) +if (!xen_has_pv_devices ())return -ENODEV ; ready_to_wait_for_devices =1 ;
fs/dcookies.c +1 -1
@@ -204,7 +204,7 @@ out: }#ifdef CONFIG_COMPAT -COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, w0, u32, w1, char __user *, buf, size_t, len) +COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, w0, u32, w1, char __user *, buf, compat_size_t, len) {#ifdef __BIG_ENDIANreturn sys_lookup_dcookie (((u64 )w0 <<32 ) | w1, buf, len);
fs/exofs/ore.c +25 -12
@@ -103,7 +103,7 @@ int ore_verify_layout(unsigned total_comps, struct ore_layout *layout) layout->max_io_length = (BIO_MAX_PAGES_KMALLOC *PAGE_SIZE - layout->stripe_unit) * - layout->group_width; + (layout->group_width - layout->parity);if (layout->parity) {unsigned stripe_length = (layout->group_width - layout->parity) *
@@ -286,7 +286,8 @@ int ore_get_rw_state(struct ore_layout *layout, struct ore_components *oc,if (length) {ore_calc_stripe_info (layout, offset, length, &ios->si); ios->length = ios->si.length; - ios->nr_pages = (ios->length +PAGE_SIZE -1 ) /PAGE_SIZE ; + ios->nr_pages = ((ios->offset & (PAGE_SIZE -1 )) + + ios->length +PAGE_SIZE -1 ) /PAGE_SIZE ;if (layout->parity)_ore_post_alloc_raid_stuff (ios); }
@@ -536,6 +537,7 @@ void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,u64 H = LmodS -G *T ;u32 N =div_u64 (H ,U ); +u32 Nlast;/* "H - (N * U)" is just "H % U" so it's bound to u32 */ u32 C = (u32)(H - (N *U )) / stripe_unit +G * group_width;
@@ -568,6 +570,10 @@ void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset, si->length =T -H ;if (si->length > length) si->length = length; + + Nlast =div_u64 (H + si->length +U -1 ,U ); + si->maxdevUnits = Nlast -N ; + si->M =M ; }EXPORT_SYMBOL (ore_calc_stripe_info);
@@ -583,13 +589,16 @@ int _ore_add_stripe_unit(struct ore_io_state *ios, unsigned *cur_pg,int ret;if (per_dev->bio ==NULL ) { -unsigned pages_in_stripe = ios->layout->group_width * - (ios->layout->stripe_unit /PAGE_SIZE ); -unsigned nr_pages = ios->nr_pages * ios->layout->group_width / - (ios->layout->group_width - - ios->layout->parity); -unsigned bio_size = (nr_pages + pages_in_stripe) / - ios->layout->group_width; +unsigned bio_size; + +if (!ios->reading) { + bio_size = ios->si.maxdevUnits; + }else { + bio_size = (ios->si.maxdevUnits +1 ) * + (ios->layout->group_width - ios->layout->parity) / + ios->layout->group_width; + } + bio_size *= (ios->layout->stripe_unit /PAGE_SIZE ); per_dev->bio =bio_kmalloc (GFP_KERNEL , bio_size);if (unlikely (!per_dev->bio)) {
@@ -609,8 +618,12 @@ int _ore_add_stripe_unit(struct ore_io_state *ios, unsigned *cur_pg, added_len =bio_add_pc_page (q, per_dev->bio, pages[pg], pglen, pgbase);if (unlikely (pglen != added_len)) { -ORE_DBGMSG ("Failed bio_add_pc_page bi_vcnt=%u\n" , - per_dev->bio->bi_vcnt); +/* If bi_vcnt == bi_max then this is a SW BUG */ +ORE_DBGMSG ("Failed bio_add_pc_page bi_vcnt=0x%x " +"bi_max=0x%x BIO_MAX=0x%x cur_len=0x%x\n" , + per_dev->bio->bi_vcnt, + per_dev->bio->bi_max_vecs, +BIO_MAX_PAGES_KMALLOC , cur_len); ret = -ENOMEM ; goto out; }
@@ -1098,7 +1111,7 @@ int ore_truncate(struct ore_layout *layout, struct ore_components *oc, size_attr->attr = g_attr_logical_length; size_attr->attr.val_ptr = &size_attr->newsize; -ORE_DBGMSG ("trunc(0x%llx) obj_offset=0x%llx dev=%d\n" , +ORE_DBGMSG2 ("trunc(0x%llx) obj_offset=0x%llx dev=%d\n" ,_LLU (oc->comps->obj.id),_LLU (obj_size), i); ret =_truncate_mirrors (ios, i * ios->layout->mirrors_p1, &size_attr->attr);
fs/fuse/dev.c +5 -17
@@ -1296,22 +1296,6 @@ static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov,return fuse_dev_do_read (fc, file, &cs,iov_length (iov, nr_segs)); } -static int fuse_dev_pipe_buf_steal (struct pipe_inode_info *pipe, -struct pipe_buffer *buf) -{ -return 1 ; -} - -static const struct pipe_buf_operations fuse_dev_pipe_buf_ops = { - .can_merge =0 , - .map = generic_pipe_buf_map, - .unmap = generic_pipe_buf_unmap, - .confirm = generic_pipe_buf_confirm, - .release = generic_pipe_buf_release, - .steal = fuse_dev_pipe_buf_steal, - .get = generic_pipe_buf_get, -}; -static ssize_t fuse_dev_splice_read (struct file *in,loff_t *ppos,struct pipe_inode_info *pipe,size_t len,unsigned int flags)
@@ -1358,7 +1342,11 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, buf->page = bufs[page_nr].page; buf->offset = bufs[page_nr].offset; buf->len = bufs[page_nr].len; - buf->ops = &fuse_dev_pipe_buf_ops; +/* +* Need to be careful about this. Having buf->ops in module +* code can Oops if the buffer persists after module unload. +*/ + buf->ops = &nosteal_pipe_buf_ops; pipe->nrbufs++; page_nr++;
fs/nfs/nfs4client.c +9 -9
@@ -407,13 +407,11 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp, error =nfs4_discover_server_trunking (clp, &old);if (error <0 ) goto error; -nfs_put_client (clp); -if (clp != old) { - clp->cl_preserve_clid = true; - clp = old; - } -return clp; +if (clp != old) + clp->cl_preserve_clid = true; +nfs_put_client (clp); +return old; error:nfs_mark_client_ready (clp, error);
@@ -491,9 +489,10 @@ int nfs40_walk_client_list(struct nfs_client *new, prev = pos; status =nfs_wait_client_init_complete (pos); -spin_lock (&nn->nfs_client_lock);if (status <0 ) -continue ; + goto out; + status = -NFS4ERR_STALE_CLIENTID ; +spin_lock (&nn->nfs_client_lock); }if (pos->cl_cons_state !=NFS_CS_READY )continue ;
@@ -631,7 +630,8 @@ int nfs41_walk_client_list(struct nfs_client *new, }spin_lock (&nn->nfs_client_lock);if (status <0 ) -continue ; +break ; + status = -NFS4ERR_STALE_CLIENTID ; }if (pos->cl_cons_state !=NFS_CS_READY )continue ;
fs/nfs/nfs4proc.c +33 -7
@@ -532,7 +532,7 @@ static int nfs40_sequence_done(struct rpc_task *task,struct nfs4_slot *slot = res->sr_slot;struct nfs4_slot_table *tbl; -if (!RPC_WAS_SENT (task)) +if (slot ==NULL ) goto out; tbl = slot->table;
@@ -7057,9 +7057,9 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)struct nfs_server *server =NFS_SERVER (inode);struct pnfs_layout_hdr *lo;struct nfs4_state *state =NULL ; -unsigned long timeo, giveup; +unsigned long timeo, now, giveup; -dprintk ("--> %s\n" , __func__); +dprintk ("--> %s tk_status => %d\n" , __func__, -task->tk_status);if (!nfs41_sequence_done (task, &lgp->res.seq_res)) goto out;
@@ -7067,12 +7067,38 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)switch (task->tk_status) {case 0 : goto out; +/* +* NFS4ERR_LAYOUTTRYLATER is a conflict with another client +* (or clients) writing to the same RAID stripe +*/ case -NFS4ERR_LAYOUTTRYLATER : +/* +* NFS4ERR_RECALLCONFLICT is when conflict with self (must recall +* existing layout before getting a new one). +*/ case -NFS4ERR_RECALLCONFLICT : timeo =rpc_get_timeout (task->tk_client); giveup = lgp->args.timestamp + timeo; -if (time_after (giveup, jiffies)) - task->tk_status = -NFS4ERR_DELAY ; + now = jiffies; +if (time_after (giveup, now)) { +unsigned long delay; + +/* Delay for: +* - Not less then NFS4_POLL_RETRY_MIN. +* - One last time a jiffie before we give up +* - exponential backoff (time_now minus start_attempt) +*/ + delay = max_t(unsigned long, NFS4_POLL_RETRY_MIN, +min ((giveup - now -1 ), + now - lgp->args.timestamp)); + +dprintk ("%s: NFS4ERR_RECALLCONFLICT waiting %lu\n" , + __func__, delay); +rpc_delay (task, delay); + task->tk_status =0 ; +rpc_restart_call_prepare (task); + goto out;/* Do not call nfs4_async_handle_error() */ + }break ;case -NFS4ERR_EXPIRED :case -NFS4ERR_BAD_STATEID :
@@ -7561,7 +7587,7 @@ nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,switch (err) {case 0 :case -NFS4ERR_WRONGSEC : -case -NFS4ERR_NOTSUPP : +case -ENOTSUPP : goto out;default : err =nfs4_handle_exception (server, err, &exception);
@@ -7595,7 +7621,7 @@ nfs41_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,* Fall back on "guess and check" method if * the server doesn't support SECINFO_NO_NAME */ -if (err == -NFS4ERR_WRONGSEC || err == -NFS4ERR_NOTSUPP ) { +if (err == -NFS4ERR_WRONGSEC || err == -ENOTSUPP ) { err =nfs4_find_root_sec (server, fhandle, info); goto out_freepage; }
fs/nfs/nfs4xdr.c +31 -16
68 lines not on this page · raw message
fs/nfs/write.c +6 -5
@@ -922,19 +922,20 @@ out:* extend the write to cover the entire page in order to avoid fragmentation * inefficiencies. * -* If the file is opened for synchronous writes or if we have a write delegation -* from the server then we can just skip the rest of the checks. +* If the file is opened for synchronous writes then we can just skip the rest +* of the checks. */ static int nfs_can_extend_write (struct file *file,struct page *page,struct inode *inode) {if (file->f_flags &O_DSYNC )return 0 ; +if (!nfs_write_pageuptodate (page, inode)) +return 0 ;if (NFS_PROTO (inode)->have_delegation (inode,FMODE_WRITE ))return 1 ; -if (nfs_write_pageuptodate (page, inode) && (inode->i_flock ==NULL || - (inode->i_flock->fl_start ==0 && +if (inode->i_flock ==NULL || (inode->i_flock->fl_start ==0 && inode->i_flock->fl_end ==OFFSET_MAX && - inode->i_flock->fl_type !=F_RDLCK ))) + inode->i_flock->fl_type !=F_RDLCK ))return 1 ;return 0 ; }
fs/notify/fanotify/fanotify_user.c +2 -2
@@ -888,9 +888,9 @@ COMPAT_SYSCALL_DEFINE6(fanotify_mark, {return sys_fanotify_mark (fanotify_fd, flags, #ifdef __BIG_ENDIAN - ((__u64 )mask1 <<32 ) | mask0, -#else ((__u64 )mask0 <<32 ) | mask1, +#else + ((__u64 )mask1 <<32 ) | mask0, #endif dfd, pathname); }
fs/read_write.c +8 -8
@@ -977,9 +977,9 @@ out:return ret; } -COMPAT_SYSCALL_DEFINE3(readv, unsigned long, fd, +COMPAT_SYSCALL_DEFINE3 (readv, compat_ulong_t, fd, const struct compat_iovec __user *,vec, - unsigned long, vlen) + compat_ulong_t, vlen) {struct fd f =fdget (fd);ssize_t ret;
@@ -1014,9 +1014,9 @@ COMPAT_SYSCALL_DEFINE4(preadv64, unsigned long, fd,return ret; } -COMPAT_SYSCALL_DEFINE5(preadv, unsigned long, fd, +COMPAT_SYSCALL_DEFINE5 (preadv, compat_ulong_t, fd, const struct compat_iovec __user *,vec, - unsigned long, vlen, u32, pos_low, u32, pos_high) + compat_ulong_t, vlen, u32, pos_low, u32, pos_high) {loff_t pos = ((loff_t )pos_high <<32 ) | pos_low;return compat_sys_preadv64 (fd, vec, vlen, pos);
@@ -1044,9 +1044,9 @@ out:return ret; } -COMPAT_SYSCALL_DEFINE3(writev, unsigned long, fd, +COMPAT_SYSCALL_DEFINE3 (writev, compat_ulong_t, fd, const struct compat_iovec __user *, vec, - unsigned long, vlen) + compat_ulong_t, vlen) {struct fd f =fdget (fd);ssize_t ret;
@@ -1081,9 +1081,9 @@ COMPAT_SYSCALL_DEFINE4(pwritev64, unsigned long, fd,return ret; } -COMPAT_SYSCALL_DEFINE5(pwritev, unsigned long, fd, +COMPAT_SYSCALL_DEFINE5 (pwritev, compat_ulong_t, fd, const struct compat_iovec __user *,vec, - unsigned long, vlen, u32, pos_low, u32, pos_high) + compat_ulong_t, vlen, u32, pos_low, u32, pos_high) {loff_t pos = ((loff_t )pos_high <<32 ) | pos_low;return compat_sys_pwritev64 (fd, vec, vlen, pos);
fs/splice.c +18 -0
@@ -555,6 +555,24 @@ static const struct pipe_buf_operations default_pipe_buf_ops = { .get = generic_pipe_buf_get, }; +static int generic_pipe_buf_nosteal (struct pipe_inode_info *pipe, +struct pipe_buffer *buf) +{ +return 1 ; +} + +/* Pipe buffer operations for a socket and similar. */ +const struct pipe_buf_operations nosteal_pipe_buf_ops = { + .can_merge =0 , + .map = generic_pipe_buf_map, + .unmap = generic_pipe_buf_unmap, + .confirm = generic_pipe_buf_confirm, + .release = generic_pipe_buf_release, + .steal = generic_pipe_buf_nosteal, + .get = generic_pipe_buf_get, +}; +EXPORT_SYMBOL (nosteal_pipe_buf_ops); +static ssize_t kernel_readv (struct file *file,const struct iovec *vec,unsigned long vlen,loff_t offset) {
include/linux/audit.h +1 -1
@@ -135,7 +135,7 @@ static inline void audit_syscall_exit(void *pt_regs) {if (unlikely (current->audit_context)) {int success =is_syscall_success (pt_regs); -int return_code =regs_return_value (pt_regs); +long return_code =regs_return_value (pt_regs);__audit_syscall_exit (success, return_code); }
include/linux/compat.h +9 -9
@@ -327,16 +327,16 @@ asmlinkage long compat_sys_keyctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5);asmlinkage long compat_sys_ustat (unsigned dev,struct compat_ustat __user *u32); -asmlinkage ssize_t compat_sys_readv(unsigned long fd, -const struct compat_iovec __user *vec,unsigned long vlen); -asmlinkage ssize_t compat_sys_writev(unsigned long fd, -const struct compat_iovec __user *vec,unsigned long vlen); -asmlinkage ssize_t compat_sys_preadv(unsigned long fd, +asmlinkage ssize_t compat_sys_readv(compat_ulong_t fd, +const struct compat_iovec __user *vec,compat_ulong_t vlen); +asmlinkage ssize_t compat_sys_writev(compat_ulong_t fd, +const struct compat_iovec __user *vec,compat_ulong_t vlen); +asmlinkage ssize_t compat_sys_preadv(compat_ulong_t fd,const struct compat_iovec __user *vec, -unsigned long vlen,u32 pos_low,u32 pos_high); -asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, +compat_ulong_t vlen,u32 pos_low,u32 pos_high); +asmlinkage ssize_t compat_sys_pwritev(compat_ulong_t fd,const struct compat_iovec __user *vec, -unsigned long vlen,u32 pos_low,u32 pos_high); +compat_ulong_t vlen,u32 pos_low,u32 pos_high);asmlinkage long comat_sys_lseek (unsigned int ,compat_off_t ,unsigned int ); asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv,
@@ -422,7 +422,7 @@ extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,asmlinkage long compat_sys_ptrace (compat_long_t request,compat_long_t pid,compat_long_t addr,compat_long_t data); -asmlinkage long compat_sys_lookup_dcookie (u32 ,u32 ,char __user *,size_t ); +asmlinkage long compat_sys_lookup_dcookie (u32 ,u32 ,char __user *,compat_size_t );/* * epoll (fs/eventpoll.c) compat bits follow ... */
include/linux/percpu_ida.h +2 -1
@@ -4,6 +4,7 @@#include <linux/types.h> #include <linux/bitops.h> #include <linux/init.h> +#include <linux/sched.h> #include <linux/spinlock_types.h> #include <linux/wait.h> #include <linux/cpumask.h>
@@ -51,7 +52,7 @@ struct percpu_ida { }____cacheline_aligned_in_smp ; }; -int percpu_ida_alloc (struct percpu_ida *pool,gfp_t gfp); +int percpu_ida_alloc (struct percpu_ida *pool,int state);void percpu_ida_free (struct percpu_ida *pool,unsigned tag);void percpu_ida_destroy (struct percpu_ida *pool);
include/linux/pipe_fs_i.h +2 -0
@@ -157,6 +157,8 @@ int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);int generic_pipe_buf_steal (struct pipe_inode_info *,struct pipe_buffer *);void generic_pipe_buf_release (struct pipe_inode_info *,struct pipe_buffer *); +extern const struct pipe_buf_operations nosteal_pipe_buf_ops; +/* for F_SETPIPE_SZ and F_GETPIPE_SZ */ long pipe_fcntl (struct file *,unsigned int ,unsigned long arg);struct pipe_inode_info *get_pipe_info (struct file *file);
include/linux/vmstat.h +0 -2
@@ -142,8 +142,6 @@ static inline unsigned long zone_page_state_snapshot(struct zone *zone,return x; } -extern unsigned long global_reclaimable_pages (void ); -#ifdef CONFIG_NUMA /* * Determine the per node value of a stat item. This function
include/scsi/osd_ore.h +1 -0
@@ -102,6 +102,7 @@ struct ore_striping_info {unsigned unit_off;unsigned cur_pg;unsigned cur_comp; +unsigned maxdevUnits; };struct ore_io_state ;
include/xen/platform_pci.h +23 -0
@@ -48,4 +48,27 @@ static inline int xen_must_unplug_disks(void) {extern int xen_platform_pci_unplug; +#if defined(CONFIG_XEN_PVHVM ) +extern bool xen_has_pv_devices (void ); +extern bool xen_has_pv_disk_devices (void ); +extern bool xen_has_pv_nic_devices (void ); +extern bool xen_has_pv_and_legacy_disk_devices (void ); +#else +static inline bool xen_has_pv_devices (void ) +{ +return IS_ENABLED (CONFIG_XEN ); +} +static inline bool xen_has_pv_disk_devices (void ) +{ +return IS_ENABLED (CONFIG_XEN ); +} +static inline bool xen_has_pv_nic_devices (void ) +{ +return IS_ENABLED (CONFIG_XEN ); +} +static inline bool xen_has_pv_and_legacy_disk_devices (void ) +{ +return false; +} +#endif #endif /* _XEN_PLATFORM_PCI_H */
kernel/audit.c +4 -1
@@ -103,7 +103,8 @@ static int audit_rate_limit;/* Number of outstanding audit_buffers allowed. */ static int audit_backlog_limit =64 ; -static int audit_backlog_wait_time =60 *HZ ; +#define AUDIT_BACKLOG_WAIT_TIME (60 * HZ) +static int audit_backlog_wait_time =AUDIT_BACKLOG_WAIT_TIME ;static int audit_backlog_wait_overflow =0 ;/* The identity of the user shutting down the audit system. */
@@ -1135,6 +1136,8 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,return NULL ; } + audit_backlog_wait_time =AUDIT_BACKLOG_WAIT_TIME ; + ab =audit_buffer_alloc (ctx, gfp_mask, type);if (!ab) {audit_log_lost ("out of memory in audit_log_start" );
kernel/time/timekeeping.c +33 -14
134 lines not on this page · raw message
kernel/trace/ftrace.c +148 -42
22 lines not on this page · raw message
mm/page-writeback.c +26 -31
57 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.