diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-03 18:35:45 -0600 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2016-08-03 18:35:46 -0600 |
| commit | 9ecb5b34b92ff0ceb2dba6157281f8bb39017d9c (patch) | |
| tree | 1b45f4df31c3698fb66ae1a1c2e392d8c143b16d /kernel | |
| parent | da92b44bf9d918082cbf533e4c21f232273f7d88 (diff) | |
| parent | 059df41e860f67a9ba59ff4af2c95d754d6e4a28 (diff) | |
Promotion of kernel.lnx.4.4-160803.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
hwmon: (max1111) Return -ENODEV from max1111_read_channe
vfs: show_vfsstat: do not ignore errors from show_devnam
ALSA: usb-audio: add Microsoft HD-5001 to quirks
drm/radeon: add a dpm quirk for all R7 370 parts
crypto: ux500 - fix checks of error code returned by dev
PKCS#7: pkcs7_validate_trust(): initialize the _trusted
scsi: storvsc: fix SRB_STATUS_ABORTED handling
libnvdimm: fix smart data retrieval
ipv4: fix broadcast packets reception
987051 I0baf2be2d5a476e2e4267f20b99d0ddf5492469e qseecom: Change format specifier %p to %pK
staging: comedi: ni_mio_common: fix the ni_write[blw]()
ppp: release rtnl mutex when interface creation fails
USB: iowarrior: fix oops with malicious USB descriptors
drm/amdgpu/gmc: move vram type fetching into sw_init
ppp: take reference on channels netns
PM / OPP: Parse 'opp-<prop>-<name>' bindings
crypto: ccp - Add hash state import and export support
mld, igmp: Fix reserved tailroom calculation
ipv4: initialize flowi4_flags before calling fib_lookup(
1044129 I972def91c47af5e1d2406c470a40bf6c2f3fbde9 iio: adc: rradc: Append sysfs channel string
1027136 Ia1a72138967a3806253f8431b36af71eaabe816d msm: misc: hdcp: add hdcp support for display port
of: alloc anywhere from memblock if range not specified
pinctrl: sh-pfc: only use dummy states for non-DT platfo
sched/cputime: Fix steal time accounting vs. CPU hotplug
parisc: Avoid function pointers for kernel exception rou
ip6_tunnel: set rtnl_link_ops before calling register_ne
HID: fix hid_ignore_special_drivers module parameter
net: validate variable length ll headers
dm: fix excessive dm-mq context switching
md/raid5: preserve STRIPE_PREREAD_ACTIVE in break_stripe
PM / OPP: Manage device clk
arm64: opcodes.h: Add arm big-endian config options befo
PM / OPP: Disable OPPs that aren't supported by the regu
Bluetooth: Add new AR3012 ID 0489:e095
1042302 I9ed40ccedab71a3800b97fc7825741855bceaa29 input: touchscreen: add protocol B support for ITE tech
PM / OPP: Rename structures for clarity
tpm_eventlog.c: fix binary_bios_measurements
usb: renesas_usbhs: fix to avoid using a disabled ep in
writeback, cgroup: fix premature wb_put() in locked_inod
cpufreq: dt: No need to allocate resources anymore
xtensa: clear all DBREAKC registers on start
1044326 Iaa2c9e45fe0ed0392e084a381d2d1e1d506bc609 msm: mdss: hdmi: send info frame for HDR video streams
bridge: allow zero ageing time
PM / OPP: Fix NULL pointer dereference crash when disabl
mtip32xx: Cleanup queued requests after surprise removal
md/raid5: Compare apples to apples (or sectors to sector
1049012 I059e1b111c607e49a7cc9a7940cf458e701c73d3 wcd_dsp_mgr: Add the WCD DSP manager driver
ALSA: hda - Fix white noise on Asus N750JV headphone
USB: digi_acceleport: do sanity checking for the number
ipv4: Don't do expensive useless work during inetdev des
tools/hv: Use include/uapi with __EXPORTED_HEADERS__
clk: rockchip: add hclk_cpubus to the list of rk3188 cri
USB: serial: cp210x: Adding GE Healthcare Device ID
sh_eth: fix NULL pointer dereference in sh_eth_ring_form
net: mvneta: enable change MAC address when interface is
perf tools: Dont stop PMU parsing on alias parse error
1045208 I34365ce21659348ad1d1289e3b06b81e778c2648 input: msg21xx_ts: Move the driver to proper path
PM / OPP: Fix incorrect comments
1044129 Iec4aa730fa97133af0c0fb9d47557738ef6f45a0 iio: adc: rradc: Update die_temp and chg_temp scaling
1048435 I5ece4a5676cf1d2fae4a5276da5833272cd95ecb msm: ipa3: update IPA BCR register values
Bluetooth: Fix potential buffer overflow with Add Advert
mmc: sh_mmcif: rework dma channel handling
kbuild/mkspec: fix grub2 installkernel issue
RAID5: revert e9e4c377e2f563 to fix a livelock
ocfs2/dlm: fix race between convert and recovery
1041436 Iffbb50993b1ec04eebe925bf5da48192688ca62e ARM: dts: msm: add 2k truly panel for qrd in msmcobalt
crypto: marvell/cesa - forward devm_ioremap_resource() e
EDAC/sb_edac: Fix computation of channel address
raid1: include bio_end_io_list in nr_queued to prevent f
ALSA: hda - Fix unconditional GPIO toggle via automute
ALSA: usb-audio: Add sanity checks for endpoint accesses
PM / OPP: Remove 'operating-points-names' binding
rbd: use GFP_NOIO consistently for request allocations
1042302 I314677747e8bbbcb273cd898376bbe03197c8c25 input: it7258_ts_i2c: add low reset and reset delay supp
bcache: fix race of writeback thread starting before com
1047860 Ic3140ee333e646352f7ede3ecf969b7f078ff2c9 defconfig: Enable REMOTEQDSS
tpm_crb: tpm2_shutdown() must be called before tpm_chip_
HID: multitouch: force retrieving of Win8 signature blob
x86/microcode/intel: Make early loader look for builtin
fuse: Add reference counting for fuse_io_priv
splice: handle zero nr_pages in splice_to_pipe()
1045392 Icd637fcd264565b06bcb90f8e6f7b26c8d112f24 thermal: tsens: Update TSENS property for reading efuse
qlcnic: Fix mailbox completion handling during spurious
USB: serial: ftdi_sio: Add support for ICP DAS I-756xU d
sd: Fix excessive capacity printing on devices with bloc
ipr: Fix regression when loading firmware
nfs: use file_dentry()
ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list
Revert "PCI: Add helpers to manage pci_dev->irq and pci_
btrfs: fix crash/invalid memory access on fsync when usi
KVM: x86: fix missed hardware breakpoints
coda: fix first encoded frame payload
scripts/coccinelle: modernize &
cdc-acm: fix NULL pointer reference
mac80211: properly deal with station hashtable insert er
KVM: VMX: avoid guest hang on invalid invvpid instructio
fuse: do not use iocb after it may have been freed
ALSA: hda - fix front mic problem for a HP desktop
cgroup: ignore css_sets associated with dead cgroups dur
x86/microcode: Untangle from BLK_DEV_INITRD
drm/amdgpu/gmc: use proper register for vram type on Fij
ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM
macvtap: always pass ethernet header in linear
ipv4: only create late gso-skb if skb is already set up
ext4: ignore quota mount options if the quota feature is
Revert "usb: hub: do not clear BOS field during reset de
1049012 I2b1464c2a035a039440e6d3e5122ad3f90da4d1e ASoC: wcd-dsp-utils: Add utilities for wcd dsp
USB: cdc-acm: more sanity checking
x86/iopl/64: Properly context-switch IOPL on Xen PV
1028339 I41e9012210ce9a5f4fbeb4236365c0fa2db08625 ARM: dts: msm: Modify the GPIO bias for I2C_5 on msmcoba
1009727 I34989768811b23762c4afe3e33e229ffa3f1db17 serial: msm_serial_hs: Move clk count voting out of runt
cpufreq: dt: Reuse dev_pm_opp_get_max_transition_latency
sg: fix dxferp in from_to case
tracing: Fix crash from reading trace_pipe with sendfile
ALSA: timer: Use mod_timer() for rearming the system tim
mmc: sdhci: fix data timeout (part 2)
mtip32xx: Handle FTL rebuild failure state during device
quota: Fix possible GPF due to uninitialised pointers
usb: retry reset if a device times out
staging: android: ion: Set the length of the DMA sg entr
net: qca_spi: clear IFF_TX_SKB_SHARING
ACPI / PM: Runtime resume devices when waking from hiber
cpufreq-dt: fix handling regulator_get_voltage() result
ALSA: usb-audio: Fix double-free in error paths after sn
PM / OPP: Introduce dev_pm_opp_get_max_volt_latency()
perf/core: Fix perf_sched_count derailment
Revert "PCI, x86: Implement pcibios_alloc_irq() and pcib
mmc: sdhci: fix data timeout (part 1)
mtip32xx: Fix broken service thread handling
be2iscsi: set the boot_kset pointer to NULL in case of f
pinctrl: sunxi: Fix A33 external interrupts not working
compiler-gcc: disable -ftracer for __noclone functions
1041436 I23d9ebc6ae2f4070984ee0d5b7e6fbe40f6872dd ARM: dts: msm: add 4k dsc panel for qrd in msmcobalt
mmc: mmc_spi: Add Card Detect comments and fix CD GPIO c
HID: logitech: fix Dual Action gamepad support
fs: add file_dentry()
mmc: block: fix ABI regression of mmc_blk_ioctl
clk: rockchip: rk3368: fix parents of video encoder/deco
Input: ims-pcu - sanity check against missing interfaces
USB: uas: Reduce can_queue to MAX_CMNDS
parisc: Unbreak handling exceptions from kernel modules
ASoC: samsung: pass DMA channels as pointers
mac80211: avoid excessive stack usage in sta_info
ALSA: pcm: Avoid "BUG:" string for warnings again
bonding: fix bond_get_stats()
net: bcmgenet: fix dma api length mismatch
ext4: add lockdep annotations for i_data_sem
drm/radeon: add another R7 370 quirk
net: vrf: Remove direct access to skb->data
parisc: Fix kernel crash with reversed copy_from_user()
v4l: vsp1: Set the SRU CTRL0 register when starting the
xtensa: ISS: don't hang if stdin EOF is reached
MIPS: Fix MSA ld unaligned failure cases
staging: comedi: ni_tiocmd: change mistaken use of start
ALSA: usb-audio: Minor code cleanup in create_fixed_stre
mac80211: fix unnecessary frame drops in mesh fwding
mei: bus: check if the device is enabled before data tra
usb: renesas_usbhs: disable TX IRQ before starting TX DM
PM / OPP: Add {opp-microvolt|opp-microamp}-<name> bindin
1044129 I46dca1f606b5414bf7a032c18c9684ba2e53cf28 iio: adc: rradc: Add RRADC channels
perf tools: Fix python extension build
dm: fix rq_end_stats() NULL pointer in dm_requeue_origin
mm/page_alloc: prevent merging between isolated and othe
sched/preempt, sh: kmap_coherent relies on disabled pree
ia64: define ioremap_uc()
usbnet: cleanup after bind() in probe()
RAID5: check_reshape() shouldn't call mddev_suspend
USB: usb_driver_claim_interface: add sanity checking
crypto: atmel - fix checks of error code returned by dev
rocker: set FDB cleanup timer according to lowest ageing
pwc: Add USB id for Philips Spc880nc webcam
mtip32xx: Handle safe removal during IO
iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE
md: multipath: don't hardcopy bio in .make_request path
PM / OPP: Rename OPP nodes as opp@<opp-hz>
tracing: Fix trace_printk() to print when not using bpri
1042302 Ib9905017fc18999e7ab7c9cb8bc1af398f5f9791 input: it7258_ts_i2c: Do not put driver in infinite loop
tcp/dccp: remove obsolete WARN_ON() in icmp handlers
cpufreq: dt: OPP layers handles clock-latency for V1 bin
PM / OPP: Add dev_pm_opp_set_rate()
mlxsw: spectrum: Check requested ageing time is valid
PM / OPP: Add "opp-supported-hw" binding
1042302 Ib666f406442ad5f323a08e4624832fba5e2546e2 input: it7258_ts_i2c: add regulator framework support
cpufreq: dt: Pass regulator name to the OPP core
vxlan: fix missing options_len update on RX with collect
mm: memcontrol: reclaim when shrinking memory.high below
perf/x86/intel: Add definition for PT PMI bit
1044489 I3ab9858daf6dcdbce762946cbdebeb96eaad764a ASoC: msmcobalt: fix proxy channels index value
KVM: i8254: change PIT discard tick policy
adv7511: TX_EDID_PRESENT is still 1 after a disconnect
sched/cputime: Fix steal_account_process_tick() to alway
bttv: Width must be a multiple of 16 when capturing plan
KVM: fix spin_lock_init order on x86
pcmcia: db1xxx_ss: fix last irq_to_gpio user
1049012 If1162c09de8d4d7c330a97a1f133f6d46ce2fd74 mfd: wcd934x: Add page 0x50 registers for wcd934x codec
tcp: fix tcpi_segs_in after connection establishment
1047798 I52095462c60d1320e3aeabed7aaf7462f143f8da ARM: dts: msm: Add platform info for msmcobalt
perf/x86/intel: Fix PEBS warning by only restoring activ
1049012 I0640ac1ed60a2ec3633636760593211ecd2f9c2d ASoC: wcd-spi: SPI driver for WCD audio codecs
tunnel: Clear IPCB(skb)->opt before dst_link_failure cal
bcache: cleaned up error handling around register_cache(
raid10: include bio_end_io_list in nr_queued to prevent
ALSA: hda - fix the mic mute button and led problem for
mpls: find_outdev: check for err ptr in addition to NULL
1042302 I63720092f445700b7ae66e10950d87a4654060aa input: it7258_ts_i2c: add force fw and cfg update functi
ath9k: fix buffer overrun for ar9287
powerpc/mm: Fixup preempt underflow with huge pages
arm64: vdso: Mark vDSO code as read-only
rapidio/rionet: fix deadlock on SMP
ALSA: usb-audio: Fix NULL dereference in create_fixed_st
KVM: VMX: fix nested vpid for old KVM guests
perf/x86/pebs: Add workaround for broken OVFL status on
PM / OPP: Fix parsing of opp-microvolt and opp-microamp
mac80211: fix txq queue related crashes
mlx4: add missing braces in verify_qp_parameters
PM / OPP: get/put regulators from OPP core
dm snapshot: disallow the COW and origin devices from be
ARM: dts: at91: sama5d4 Xplained: don't disable hsmci re
HID: wacom: fix Bamboo ONE oops
rtnl: fix msg size calculation in if_nlmsg_size()
1046577 Ia2d375b4c9d53dc4eedaf4983dd0bd1433419d75 ARM: dts: msm: Update frequency to MEM ACC level mapping
PM / OPP: Add missing doc comments
USB: uas: Add a new NO_REPORT_LUNS quirk
farsync: fix off-by-one bug in fst_add_one
dm cache: make sure every metadata function checks fail_
regulator: core: Fix nested locking of supplies
PM / OPP: Use snprintf() instead of sprintf()
drm/radeon: add a dpm quirk for sapphire Dual-X R7 370 2
mmc: sdhci-pci: Add support and PCI IDs for more Broxton
clk: bcm2835: Fix setting of PLL divider clock rates
udp6: fix UDP/IPv6 encap resubmit path
perf: Do not double free
ALSA: hda - Apply fix for white noise on Asus N550JV, to
drm/radeon: disable runtime pm on PX laptops without dGP
tty: Fix GPF in flush_to_ldisc(), part 2
1042841 I88de436b29c3000dcebeec4da607dff42d0609fe msm: ipa: add support for configuring polling interval/s
1042302 Ie3ee6b861c10ae901dea54f252f6a799d688f02a input: touchscreen: Change touch driver suspend code flo
crypto: ccp - memset request context to zero during impo
ipr: Fix out-of-bounds null overwrite
USB: uas: Limit qdepth at the scsi-host level
tcp: convert cached rtt from usec to jiffies when feedin
1044301 Id968f2541e1a543d3d7cf1c96af9936c9ae564ea msm: mdss: hdmi: use pinctrl API to toggle 5v on msmcoba
crypto: keywrap - memzero the correct memory
IB/srpt: Simplify srpt_handle_tsk_mgmt()
x86/mm: TLB_REMOTE_SEND_IPI should count pages
cpufreq-dt: Supply power coefficient when registering co
cpufreq: dt: Unsupported OPPs are already disabled
1041436 I13034d549833d68941f84fb9639946ecbe7e6107 ARM: dts: msm: set 2k truly panel as default for qrd pla
writeback, cgroup: fix use of the wrong bdi_writeback wh
1044129 I4da81a576b88285cedb0a1c7fd49ccd526d25012 ARM: dts: msm: Remove RRADC channel nodes on pmicobalt
878479 I49230fb6532ee02f122d5f16dfad8dbd978b368e input: it7258_ts_i2c: replace unused variable in driver
1028339 I50d918197a4cd0b503dff78e7d4ba89518c1d1c2 ARM: dts: msm: Modify the GPIO bias for UART_3 on msmcob
iwlwifi: mvm: Fix paging memory leak
1045396 If2408bc4678b2e0f7e2366329be005cd652661cf spmi: pmic-arb: correct support for up to 512 APIDs
KVM: x86: reduce default value of halt_poll_ns parameter
1048299 I9cba8e370c753ac5aa33252fce0ea446f061b4c0 power_supply: add CHARGER_TEMP and CHARGER_TEMP_MAX prop
drm/radeon: Don't drop DP 2.7 Ghz link setup on some car
jbd2: fix FS corruption possibility in jbd2_journal_dest
mtip32xx: Avoid issuing standby immediate cmd during FTL
s390: fix floating pointer register corruption (again)
tpm: fix the rollback in tpm_chip_register()
1042302 I261db5723a19a7084072487527b350d155a54e78 input: it7258_ts_i2c: add gpio configuration support
ALSA: hda - Don't handle ELD notify from invalid port
drm/amdgpu: disable runtime pm on PX laptops without dGP
intel_idle: prevent SKL-H boot failure when C8+C9+C10 en
1045163 Idf191144354426233eca41727a41e26ddbf92f95 input: touchpanel: Move Goodix GT915 driver to drivers f
aacraid: Fix memory leak in aac_fib_map_free
drm/amdgpu: include the right version of gmc header file
iser-target: Rework connection termination
ALSA: usb-audio: Add a sample rate quirk for Phoenix Aud
1048706 Iedccc4ab908e1b076efdd4506b686c826eacb73a msm: ipa: fix multiple static analysis issues
aacraid: Fix RRQ overload
ppp: ensure file->private_data can't be overridden
packet: validate variable length ll headers
1042302 Ia81bb3da7e0b880de6f2ed95d346b533104ed3fc input: touchscreen: clean ITE tech driver probe function
mm: fix invalid node in alloc_migrate_target()
1042302 I8912545589cb763c1deb70bebb081e920af69ad2 input: touchscreen: add auto fw upgrade for ITE tech dri
brd: Fix discard request processing
usbvision: fix crash on detecting device with invalid co
1044422 I81d2e3b67bf55460f40406328c5ad8c40851033a qcom-charger: add support for WiPower
1045392 Id6893729f5b37a862f3621b8c7897eb767490cd7 ARM: dts: msm: Remove TSENS QFPROM address and slope dat
scripts/kconfig: allow building with make 3.80 again
Bluetooth: btusb: Add a new AR3012 ID 13d3:3472
Input: synaptics - handle spurious release of trackstick
cpufreq: dt: Convert few pr_debug/err() calls to dev_dbg
1018104 I464c785eba28f02993042d220e5744025e2f9346 ASoC: wcd9335: don't check for HPHL and HPHR for mono he
ipv4: l2tp: fix a potential issue in l2tp_ip_recv
1017648 I8dee2f8aa0a6882ec1c320669f165e7cb94bb5f1 serial: msm_serial_hs: Modify IPC Logging
Btrfs: fix file/data loss caused by fsync after rename a
arm64: replace read_lock to rcu lock in call_step_hook
s390/pci: enforce fmb page boundary rule
1024876 I9819c4b95876f697e75b1b84810b6c520d9c33ec CHROMIUM: android: binder: Fix potential scheduling-whil
clk: rockchip: rk3368: fix cpuclk mux bit of big cpu-clu
watchdog: rc32434_wdt: fix ioctl error handling
scsi_common: do not clobber fixed sense information
x86/irq: Cure live lock in fixup_irqs()
libnvdimm, pfn: fix uuid validation
1044710 I9d3c5eec717da0b072144a1027e4582e73aaa6d9 msm: ipa: fix IPA driver processing context delete logic
cpufreq: dt: Rename 'need_update' to 'opp_v1'
staging: android: ion_test: fix check of platform_device
iser-target: Add new state ISER_CONN_BOUND to isert_conn
iser-target: Fix identification of login rx descriptor t
ax25: add link layer header validation function
PM / OPP: Initialize regulator pointer to an error value
1037822 Ic1edcb3548eae152fc01de88859bcf311f48f847 msm: ipa: update wan rx size buffer
pinctrl: freescale: imx: fix bogus check of of_iomap() r
8250: use callbacks to access UART_DLL/UART_DLM
sctp: lack the check for ports in sctp_v6_cmp_addr
KVM: VMX: avoid guest hang on invalid invept instruction
1044129 I56e6bff28be2cc23f00622d5c37e42564c51a72f iio: adc: rradc: Update RRADC reads and scaling
PM / OPP: Set cpu_dev->id in cpumask first
perf/x86/intel: Fix PEBS data source interpretation on N
au0828: fix au0828_v4l2_close() dev_state race condition
au0828: Fix dev_state handling
1022917 I68200b12fcb316bf36f7c3af2734a094f972da9c ASoC: wcd9335: Changes to support CPE session using EC P
qmi_wwan: add "D-Link DWM-221 B1" device id
xfrm: Fix crash observed during device unregistration an
Linux 4.4.7
usb: hub: fix a typo in hub_port_init() leading to wrong
pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsi
qmi_wwan: add Sierra Wireless EM74xx device ID
tun, bpf: fix suspicious RCU usage in tun_{attach, detac
bcache: fix cache_set_flush() NULL pointer dereference o
cdc_ncm: toggle altsetting to force reset before setup
ipv6: l2tp: fix a potential issue in l2tp_ip6_recv
target: Fix target_release_cmd_kref shutdown comp leak
1038623 I917f025678e6abb03058d5be4ec42d9e6d76835f msm: ipa: disconnect sequence change for USB 2.0
Linux 4.4.8
aic7xxx: Fix queue depth handling
xtensa: fix preemption in {clear,copy}_user_highpage
1039008 I6fc333e15c5f0410c6b560b2a7005a1752f5f936 qcom-charger: qpnp-smb2: End charge cycle while battery
ideapad-laptop: Add ideapad Y700 (15) to the no_hw_rfkil
mtd: onenand: fix deadlock in onenand_block_markbad
cpufreq: dt: No need to fetch voltage-tolerance
s390/cpumf: Fix lpp detection
drm/udl: Use unlocked gem unreferencing
mm: memcontrol: reclaim and OOM kill when shrinking memo
xen/events: Mask a moving irq
1047266 I380efdf90305a65d4cde46dfe44762ac11c87678 usb: gadget: f_cdev: Fix NULL ptr dereference in usb_cse
mmc: sh_mmcif: Correct TX DMA channel allocation
fs/coredump: prevent fsuid=0 dumps into user-controlled
net: jme: fix suspend/resume on JMC260
Bluetooth: btusb: Add new AR3012 ID 13d3:3395
x86/entry/compat: Keep TS_COMPAT set during signal deliv
PM / OPP: Introduce dev_pm_opp_get_max_transition_latenc
1048941 I5ddb2036ab3df4715382368c144365d578ce4bb8 irq-chip: gic-v3: remove print message in irq driver
1042302 I8f193ee10076b6cf058b0a6940db54f71f70b758 input: touchscreen: correct probe error path for ITE tec
mmc: sdhci: Fix override of timeout clk wrt max_busy_tim
net: Fix use after free in the recvmmsg exit path
1042302 I3bbea110af189f236bb175670210e086e15d5d2d input: it7258_ts_i2c: add pinctrl support
ALSA: hda - Fix headset support and noise on HP EliteBoo
nfsd4: fix bad bounds checking
ALSA: hda - Fixup speaker pass-through control for nid 0
Input: powermate - fix oops with malicious USB descripto
HID: i2c-hid: fix OOB write in i2c_hid_set_or_send_repor
iio: accel: bmc150: fix endianness when reading axes
USB: option: add "D-Link DWM-221 B1" device id
1047605 I593d288edb704d2a92a65d47ca7f6399ba2e080d ARM: dts: msm: Update the graphics OPP property on MSMCO
s390/cpumf: add missing lpp magic initialization
clk: rockchip: rk3368: fix cpuclk core dividers
HID: usbhid: fix inconsistent reset/resume/reset-resume
iommu: Don't overwrite domain pointer when there is no d
iio: gyro: bmg160: fix buffer read values
sd: Fix discard granularity when LBPRZ=1
bitops: Do not default to __clear_bit() for __clear_bit_
MAINTAINERS: Update mailing list and web page for hwmon
iio: gyro: bmg160: fix endianness when reading axes
net: irda: Fix use-after-free in irtty_open()
ipv6: Count in extension headers in skb->network_header
Revert "x86/PCI: Don't alloc pcibios-irq when MSI is ena
PM / OPP: Initialize u_volt_min/max to a valid value
X.509: Fix leap year handling again
crypto: ccp - Limit the amount of information exported
1049012 I1cedf646d0df1ab5968df4830502649de305c9d1 mfd: wcd934x: Mark CPE registers as volatile
tpm: fix the cleanup of struct tpm_chip
1042302 I02bcea18e93146b68aaeb8d81fa7bec67b5bcc73 input: touchscreen: clean ITE tech TS driver
ARC: bitops: Remove non relevant comments
1049491 I4236f4b6272d0bccaf8a2d6f7d5435caf044bd59 Revert "Thermal: handle thermal zone device properly dur
PCI: ACPI: IA64: fix IO port generic range check
x86/apic: Fix suspicious RCU usage in smp_trace_call_fun
perf/x86/intel: Use PAGE_SIZE for PEBS buffer size on Co
bridge: Allow set bridge ageing time when switchdev disa
1024876 I781dc34fdf52823fd34f4bb93872f85847076c66 sched,preempt: Fix preempt_count manipulations
Thermal: Ignore invalid trip points
tuntap: restore default qdisc
PCI: Disable IO/MEM decoding for devices with non-compli
mtip32xx: Print exact time when an internal command is i
EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_d
crypto: ccp - Don't assume export/import areas are align
nfsd: fix deadlock secinfo+readdir compound
PM / OPP: Add debugfs support
pinctrl: nomadik: fix pull debug print inversion
net: qca_spi: Don't clear IFF_BROADCAST
regulator: core: avoid unused variable warning
x86/PCI: Mark Broadwell-EP Home Agent & PCU as having no
ipv6: re-enable fragment header matching in ipv6_find_hd
qlcnic: Remove unnecessary usage of atomic_t
tipc: Revert "tipc: use existing sk_write_queue for outg
mtip32xx: Fix for rmmod crash when drive is in FTL rebui
bpf: avoid copying junk bytes in bpf_get_current_comm()
dm thin metadata: don't issue prefetches if a transactio
1042302 I4b6b9867dc0d74c02d165aae670213544fcda1bc input: it7258_ts_i2c: add dt parsing support
1042302 Ia989d8130bbded4ae5acab0b9c3122998acb2056 input: it7258_ts_i2c: add low power mode support in susp
PM / OPP: Parse 'opp-supported-hw' binding
pinctrl: pistachio: fix mfio84-89 function description a
cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequen
Bluetooth: btusb: Add a new AR3012 ID 04ca:3014
ALSA: usb-audio: Skip volume controls triggers hangup on
media: v4l2-compat-ioctl32: fix missing length copy in p
1039005 Ieee8276f000c2eb43951e64eee8f07295a351558 ARM: dts: msm: vote IPA_cfg on msmcobalt
ALSA: hda - Asus N750JV external subwoofer fixup
USB: cypress_m8: add endpoint sanity check
perf tools: Fix checking asprintf return value
perf: Cure event->pending_disable race
ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates
1037824 I01434ce0b58b5162c8e7aec1d43a7c66a7eaac44 msm: ipa: Fix the memory leak on exception
IB/ipoib: fix for rare multicast join race condition
net: fix bridge multicast packet checksum validation
qlge: Fix receive packets drop.
iser-target: Separate flows for np listeners and connect
mtip32xx: Remove unwanted code from taskfile error handl
mtip32xx: Implement timeout handler
libnvdimm: Fix security issue with DSM IOCTL.
ALSA: hda/realtek - Enable the ALC292 dock fixup on the
ARC: [BE] readl()/writel() to work in Big Endian CPU con
usb: renesas_usbhs: avoid NULL pointer derefernce in usb
1041206 I4f72857557222cbd719da7bd177511951ef7f1ff smb-lib: Add support for thermal daemon throttling fcc
clk: rockchip: rk3368: fix hdmi_cec gate-register
x86/iopl: Fix iopl capability check on Xen PV
ALSA: usb-audio: Add a quirk for Plantronics BT300
KVM: x86: Inject pending interrupt even if pending nmi e
1013201 Ie6ec7211c64f3c4f53b9f590e5bcf5fa1937d594 soc: qcom: irq_helper: Add irq helper module
PM / sleep: Clear pm_suspend_global_flags upon hibernate
ARM: dts: at91: sama5d3 Xplained: don't disable hsmci re
tracing: Have preempt(irqs)off trace preempt disabled fu
PM / OPP: Parse clock-latency and voltage-tolerance for
1047772 I17817fbf6692829959314923c514b377e612aff8 soc: qcom: socinfo: Add support for APQCOBALT
ALSA: hda - Apply reboot D3 fix for CX20724 codec, too
drm/dp: move hw_mutex up the call stack
1024876 I90fe02cdedb8a5677b900a68528fb443b9204322 android: binder: Disable preemption while holding the gl
sh_eth: advance 'rxdesc' later in sh_eth_ring_format()
watchdog: don't run proc_watchdog_update if new value is
USB: mct_u232: add sanity checking in probe
1009727 I0e5d6b8a8a69efc2d9c65dc1edc85f13cbc94fc3 msm_serial_hs: Change resource voting and system suspend
saa7134: Fix bytesperline not being set correctly for pl
aacraid: Set correct msix count for EEH recovery
Input: ati_remote2 - fix crashes on detecting device wit
cpufreq: cpufreq-dt: avoid uninitialized variable warnin
xfs: fix two memory leaks in xfs_attr_list.c error paths
coda: fix error path in case of missing pdata on non-DT
mac80211: fix ibss scan parameters
virtio: virtio 1.0 cs04 spec compliance for reset
Change-Id: I03b236b9820f429c9f15c27f50b2a0017f074b9b
CRs-Fixed: 1009727, 1044326, 987051, 1022917, 1047798, 1044301, 1044129, 1041436, 1037824, 1045208, 1038623, 1041206, 1047772, 1042841, 1047266, 1044489, 1048435, 1039005, 1028339, 1017648, 1018104, 1047860, 1048941, 878479, 1039008, 1037822, 1042302, 1044422, 1024876, 1013201, 1027136, 1045396, 1047605, 1045392, 1049012, 1048706, 1045163, 1046577, 1048299, 1044710, 1049491
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/bpf/helpers.c | 2 | ||||
| -rw-r--r-- | kernel/cgroup.c | 20 | ||||
| -rw-r--r-- | kernel/drivers/input/touchscreen/msg21xx/msg21xx_ts.c | 1757 | ||||
| -rw-r--r-- | kernel/events/core.c | 20 | ||||
| -rw-r--r-- | kernel/power/hibernate.c | 1 | ||||
| -rw-r--r-- | kernel/sched/core.c | 1 | ||||
| -rw-r--r-- | kernel/sched/cputime.c | 14 | ||||
| -rw-r--r-- | kernel/sched/sched.h | 13 | ||||
| -rw-r--r-- | kernel/sysctl_binary.c | 2 | ||||
| -rw-r--r-- | kernel/trace/trace.c | 5 | ||||
| -rw-r--r-- | kernel/trace/trace_irqsoff.c | 8 | ||||
| -rw-r--r-- | kernel/trace/trace_printk.c | 3 | ||||
| -rw-r--r-- | kernel/watchdog.c | 9 |
13 files changed, 75 insertions, 1780 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 4504ca66118d..50da680c479f 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -166,7 +166,7 @@ static u64 bpf_get_current_comm(u64 r1, u64 size, u64 r3, u64 r4, u64 r5) if (!task) return -EINVAL; - memcpy(buf, task->comm, min_t(size_t, size, sizeof(task->comm))); + strlcpy(buf, task->comm, min_t(size_t, size, sizeof(task->comm))); return 0; } diff --git a/kernel/cgroup.c b/kernel/cgroup.c index d5512e1e7138..e8d71110ed2a 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2498,6 +2498,14 @@ static void cgroup_migrate_add_src(struct css_set *src_cset, lockdep_assert_held(&cgroup_mutex); lockdep_assert_held(&css_set_lock); + /* + * If ->dead, @src_set is associated with one or more dead cgroups + * and doesn't contain any migratable tasks. Ignore it early so + * that the rest of migration path doesn't get confused by it. + */ + if (src_cset->dead) + return; + src_cgrp = cset_cgroup_from_root(src_cset, dst_cgrp->root); if (!list_empty(&src_cset->mg_preload_node)) @@ -5186,6 +5194,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp) __releases(&cgroup_mutex) __acquires(&cgroup_mutex) { struct cgroup_subsys_state *css; + struct cgrp_cset_link *link; int ssid; lockdep_assert_held(&cgroup_mutex); @@ -5206,11 +5215,18 @@ static int cgroup_destroy_locked(struct cgroup *cgrp) return -EBUSY; /* - * Mark @cgrp dead. This prevents further task migration and child - * creation by disabling cgroup_lock_live_group(). + * Mark @cgrp and the associated csets dead. The former prevents + * further task migration and child creation by disabling + * cgroup_lock_live_group(). The latter makes the csets ignored by + * the migration path. */ cgrp->self.flags &= ~CSS_ONLINE; + spin_lock_bh(&css_set_lock); + list_for_each_entry(link, &cgrp->cset_links, cset_link) + link->cset->dead = true; + spin_unlock_bh(&css_set_lock); + /* initiate massacre of all css's */ for_each_css(css, ssid, cgrp) kill_css(css); diff --git a/kernel/drivers/input/touchscreen/msg21xx/msg21xx_ts.c b/kernel/drivers/input/touchscreen/msg21xx/msg21xx_ts.c deleted file mode 100644 index 4eb7fd4b1cc9..000000000000 --- a/kernel/drivers/input/touchscreen/msg21xx/msg21xx_ts.c +++ /dev/null @@ -1,1757 +0,0 @@ -/* - * MStar MSG21XX touchscreen driver - * - * Copyright (c) 2006-2012 MStar Semiconductor, Inc. - * - * Copyright (C) 2012 Bruce Ding <bruce.ding@mstarsemi.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/kernel.h> -#include <linux/input.h> -#include <linux/interrupt.h> -#include <linux/i2c.h> -#include <linux/timer.h> -#include <linux/gpio.h> - -#include <linux/sysfs.h> -#include <linux/init.h> -#include <linux/mutex.h> -#include <mach/gpio.h> -#include <linux/spinlock.h> -#include <linux/delay.h> -#include <linux/slab.h> - -#include <linux/syscalls.h> -#include <linux/file.h> -#include <linux/fs.h> -#include <linux/fcntl.h> -#include <linux/string.h> -#include <asm/unistd.h> -#include <linux/cdev.h> -#include <asm/uaccess.h> -#if defined(CONFIG_HAS_EARLYSUSPEND) -#include <linux/earlysuspend.h> -#endif -#include <linux/input.h> -#if defined(CONFIG_FB) -#include <linux/notifier.h> -#include <linux/fb.h> -#endif -#ifdef CONFIG_TOUCHSCREEN_PROXIMITY_SENSOR -#include <linux/input/vir_ps.h> -#endif - -/*=============================================================*/ -// Macro Definition -/*=============================================================*/ - -#define TOUCH_DRIVER_DEBUG 0 -#if (TOUCH_DRIVER_DEBUG == 1) -#define DBG(fmt, arg...) pr_err(fmt, ##arg) //pr_info(fmt, ##arg) -#else -#define DBG(fmt, arg...) -#endif - -/*=============================================================*/ -// Constant Value & Variable Definition -/*=============================================================*/ - -#define U8 unsigned char -#define U16 unsigned short -#define U32 unsigned int -#define S8 signed char -#define S16 signed short -#define S32 signed int - -#define TOUCH_SCREEN_X_MIN (0) -#define TOUCH_SCREEN_Y_MIN (0) -/* - * Note. - * Please change the below touch screen resolution according to the touch panel that you are using. - */ -#define TOUCH_SCREEN_X_MAX (480) -#define TOUCH_SCREEN_Y_MAX (800) -/* - * Note. - * Please do not change the below setting. - */ -#define TPD_WIDTH (2048) -#define TPD_HEIGHT (2048) - -/* - * Note. - * Please change the below GPIO pin setting to follow the platform that you are using - */ -static int int_gpio = 1; -static int reset_gpio = 0; -#define MS_TS_MSG21XX_GPIO_RST reset_gpio -#define MS_TS_MSG21XX_GPIO_INT int_gpio -//---------------------------------------------------------------------// - -//#define SYSFS_AUTHORITY_CHANGE_FOR_CTS_TEST - -#ifdef SYSFS_AUTHORITY_CHANGE_FOR_CTS_TEST -#define SYSFS_AUTHORITY (0644) -#else -#define SYSFS_AUTHORITY (0777) -#endif - -#define FIRMWARE_AUTOUPDATE -#ifdef FIRMWARE_AUTOUPDATE -typedef enum { - SWID_START = 1, - SWID_TRULY = SWID_START, - SWID_NULL, -} SWID_ENUM; - -unsigned char MSG_FIRMWARE[1][33*1024] = -{ - { - #include "msg21xx_truly_update_bin.h" - } -}; -#endif - -#define CONFIG_TP_HAVE_KEY - -/* - * Note. - * If the below virtual key value definition are not consistent with those that defined in key layout file of platform, - * please change the below virtual key value to follow the platform that you are using. - */ -#ifdef CONFIG_TP_HAVE_KEY -#define TOUCH_KEY_MENU (139) //229 -#define TOUCH_KEY_HOME (172) //102 -#define TOUCH_KEY_BACK (158) -#define TOUCH_KEY_SEARCH (217) - -const U16 tp_key_array[] = {TOUCH_KEY_MENU, TOUCH_KEY_HOME, TOUCH_KEY_BACK, TOUCH_KEY_SEARCH}; -#define MAX_KEY_NUM (sizeof(tp_key_array)/sizeof(tp_key_array[0])) -#endif - -#define SLAVE_I2C_ID_DBBUS (0xC4>>1) -#define SLAVE_I2C_ID_DWI2C (0x4C>>1) - -#define DEMO_MODE_PACKET_LENGTH (8) -#define MAX_TOUCH_NUM (2) //5 - -#define TP_PRINT -#ifdef TP_PRINT -static int tp_print_proc_read(void); -static void tp_print_create_entry(void); -#endif - -static char *fw_version = NULL; // customer firmware version -static U16 fw_version_major = 0; -static U16 fw_version_minor = 0; -static U8 temp[94][1024]; -static U32 crc32_table[256]; -static int FwDataCnt = 0; -static U8 bFwUpdating = 0; -static struct class *firmware_class = NULL; -static struct device *firmware_cmd_dev = NULL; - -static struct i2c_client *i2c_client = NULL; - -#if defined(CONFIG_FB) -static int fb_notifier_callback(struct notifier_block *self, unsigned long event, void *data); -static struct notifier_block msg21xx_fb_notif; -#elif defined (CONFIG_HAS_EARLYSUSPEND) -static struct early_suspend mstar_ts_early_suspend; -#endif - -#ifdef CONFIG_TOUCHSCREEN_PROXIMITY_SENSOR -static U8 bEnableTpProximity = 0; -static U8 bFaceClosingTp = 0; -#endif -static U8 bTpInSuspend = 0; - -static int irq_msg21xx = -1; -static struct work_struct msg21xx_wk; -static struct mutex msg21xx_mutex; -static struct input_dev *input_dev = NULL; - -/*=============================================================*/ -// Data Type Definition -/*=============================================================*/ - -typedef struct -{ - U16 x; - U16 y; -} touchPoint_t; - -/// max 80+1+1 = 82 bytes -typedef struct -{ - touchPoint_t point[MAX_TOUCH_NUM]; - U8 count; - U8 keycode; -} touchInfo_t; - -enum i2c_speed -{ - I2C_SLOW = 0, - I2C_NORMAL = 1, /* Enable erasing/writing for 10 msec. */ - I2C_FAST = 2, /* Disable EWENB before 10 msec timeout. */ -}; - -typedef enum -{ - EMEM_ALL = 0, - EMEM_MAIN, - EMEM_INFO, -} EMEM_TYPE_t; - -/*=============================================================*/ -// Function Definition -/*=============================================================*/ - -/// CRC -static U32 _CRC_doReflect(U32 ref, S8 ch) -{ - U32 value = 0; - U32 i = 0; - - for (i = 1; i < (ch + 1); i ++) - { - if (ref & 1) - { - value |= 1 << (ch - i); - } - ref >>= 1; - } - - return value; -} - -U32 _CRC_getValue(U32 text, U32 prevCRC) -{ - U32 ulCRC = prevCRC; - - ulCRC = (ulCRC >> 8) ^ crc32_table[(ulCRC & 0xFF) ^ text]; - - return ulCRC; -} - -static void _CRC_initTable(void) -{ - U32 magic_number = 0x04c11db7; - U32 i, j; - - for (i = 0; i <= 0xFF; i ++) - { - crc32_table[i] = _CRC_doReflect (i, 8) << 24; - for (j = 0; j < 8; j ++) - { - crc32_table[i] = (crc32_table[i] << 1) ^ (crc32_table[i] & (0x80000000L) ? magic_number : 0); - } - crc32_table[i] = _CRC_doReflect(crc32_table[i], 32); - } -} - -static void reset_hw(void) -{ - DBG("reset_hw()\n"); - - gpio_direction_output(MS_TS_MSG21XX_GPIO_RST, 1); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 0); - mdelay(100); /* Note that the RST must be in LOW 10ms at least */ - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 1); - mdelay(100); /* Enable the interrupt service thread/routine for INT after 50ms */ -} - -static int read_i2c_seq(U8 addr, U8* buf, U16 size) -{ - int rc = 0; - struct i2c_msg msgs[] = - { - { - .addr = addr, - .flags = I2C_M_RD, // read flag - .len = size, - .buf = buf, - }, - }; - - /* If everything went ok (i.e. 1 msg transmitted), return #bytes - transmitted, else error code. */ - if (i2c_client != NULL) - { - rc = i2c_transfer(i2c_client->adapter, msgs, 1); - if (rc < 0) - { - DBG("read_i2c_seq() error %d\n", rc); - } - } - else - { - DBG("i2c_client is NULL\n"); - } - - return rc; -} - -static int write_i2c_seq(U8 addr, U8* buf, U16 size) -{ - int rc = 0; - struct i2c_msg msgs[] = - { - { - .addr = addr, - .flags = 0, // if read flag is undefined, then it means write flag. - .len = size, - .buf = buf, - }, - }; - - /* If everything went ok (i.e. 1 msg transmitted), return #bytes - transmitted, else error code. */ - if (i2c_client != NULL) - { - rc = i2c_transfer(i2c_client->adapter, msgs, 1); - if ( rc < 0 ) - { - DBG("write_i2c_seq() error %d\n", rc); - } - } - else - { - DBG("i2c_client is NULL\n"); - } - - return rc; -} - -static U16 read_reg(U8 bank, U8 addr) -{ - U8 tx_data[3] = {0x10, bank, addr}; - U8 rx_data[2] = {0}; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, &tx_data[0], 3); - read_i2c_seq(SLAVE_I2C_ID_DBBUS, &rx_data[0], 2); - - return (rx_data[1] << 8 | rx_data[0]); -} - -static void write_reg(U8 bank, U8 addr, U16 data) -{ - U8 tx_data[5] = {0x10, bank, addr, data & 0xFF, data >> 8}; - write_i2c_seq(SLAVE_I2C_ID_DBBUS, &tx_data[0], 5); -} - -static void write_reg_8bit(U8 bank, U8 addr, U8 data) -{ - U8 tx_data[4] = {0x10, bank, addr, data}; - write_i2c_seq(SLAVE_I2C_ID_DBBUS, &tx_data[0], 4); -} - -void dbbusDWIICEnterSerialDebugMode(void) -{ - U8 data[5]; - - // Enter the Serial Debug Mode - data[0] = 0x53; - data[1] = 0x45; - data[2] = 0x52; - data[3] = 0x44; - data[4] = 0x42; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, data, 5); -} - -void dbbusDWIICStopMCU(void) -{ - U8 data[1]; - - // Stop the MCU - data[0] = 0x37; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, data, 1); -} - -void dbbusDWIICIICUseBus(void) -{ - U8 data[1]; - - // IIC Use Bus - data[0] = 0x35; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, data, 1); -} - -void dbbusDWIICIICReshape(void) -{ - U8 data[1]; - - // IIC Re-shape - data[0] = 0x71; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, data, 1); -} - -void dbbusDWIICIICNotUseBus(void) -{ - U8 data[1]; - - // IIC Not Use Bus - data[0] = 0x34; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, data, 1); -} - -void dbbusDWIICNotStopMCU(void) -{ - U8 data[1]; - - // Not Stop the MCU - data[0] = 0x36; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, data, 1); -} - -void dbbusDWIICExitSerialDebugMode(void) -{ - U8 data[1]; - - // Exit the Serial Debug Mode - data[0] = 0x45; - - write_i2c_seq(SLAVE_I2C_ID_DBBUS, data, 1); - - // Delay some interval to guard the next transaction - //udelay ( 200 ); // delay about 0.2ms -} - -//---------------------------------------------------------------------// - -static U8 get_ic_type(void) -{ - U8 ic_type = 0; - - reset_hw(); - dbbusDWIICEnterSerialDebugMode(); - dbbusDWIICStopMCU(); - dbbusDWIICIICUseBus(); - dbbusDWIICIICReshape(); - mdelay ( 300 ); - - // stop mcu - write_reg_8bit ( 0x0F, 0xE6, 0x01 ); - // disable watch dog - write_reg ( 0x3C, 0x60, 0xAA55 ); - // get ic type - ic_type = (0xff)&(read_reg(0x1E, 0xCC)); - - if (ic_type != 1 //msg2133 - && ic_type != 2 //msg21xxA - && ic_type != 3) //msg26xxM - { - ic_type = 0; - } - - reset_hw(); - - return ic_type; -} - -static int get_customer_firmware_version(void) -{ - U8 dbbus_tx_data[3] = {0}; - U8 dbbus_rx_data[4] = {0}; - int ret = 0; - - DBG("get_customer_firmware_version()\n"); - - dbbus_tx_data[0] = 0x53; - dbbus_tx_data[1] = 0x00; - dbbus_tx_data[2] = 0x2A; - mutex_lock(&msg21xx_mutex); - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_tx_data[0], 3); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_rx_data[0], 4); - mutex_unlock(&msg21xx_mutex); - fw_version_major = (dbbus_rx_data[1]<<8) + dbbus_rx_data[0]; - fw_version_minor = (dbbus_rx_data[3]<<8) + dbbus_rx_data[2]; - - DBG("*** major = %d ***\n", fw_version_major); - DBG("*** minor = %d ***\n", fw_version_minor); - - if (fw_version == NULL) - { - fw_version = kzalloc(sizeof(char), GFP_KERNEL); - } - - sprintf(fw_version, "%03d%03d", fw_version_major, fw_version_minor); - - return ret; -} - -static int firmware_erase_c33 ( EMEM_TYPE_t emem_type ) -{ - // stop mcu - write_reg ( 0x0F, 0xE6, 0x0001 ); - - //disable watch dog - write_reg_8bit ( 0x3C, 0x60, 0x55 ); - write_reg_8bit ( 0x3C, 0x61, 0xAA ); - - // set PROGRAM password - write_reg_8bit ( 0x16, 0x1A, 0xBA ); - write_reg_8bit ( 0x16, 0x1B, 0xAB ); - - write_reg_8bit ( 0x16, 0x18, 0x80 ); - - if ( emem_type == EMEM_ALL ) - { - write_reg_8bit ( 0x16, 0x08, 0x10 ); //mark - } - - write_reg_8bit ( 0x16, 0x18, 0x40 ); - mdelay ( 10 ); - - // clear pce - write_reg_8bit ( 0x16, 0x18, 0x80 ); - - // erase trigger - if ( emem_type == EMEM_MAIN ) - { - write_reg_8bit ( 0x16, 0x0E, 0x04 ); //erase main - } - else - { - write_reg_8bit ( 0x16, 0x0E, 0x08 ); //erase all block - } - - return ( 1 ); -} - -static ssize_t firmware_update_c33 ( struct device *dev, struct device_attribute *attr, - const char *buf, size_t size, EMEM_TYPE_t emem_type ) -{ - U32 i, j; - U32 crc_main, crc_main_tp; - U32 crc_info, crc_info_tp; - U16 reg_data = 0; - int update_pass = 1; - - crc_main = 0xffffffff; - crc_info = 0xffffffff; - - reset_hw(); - dbbusDWIICEnterSerialDebugMode(); - dbbusDWIICStopMCU(); - dbbusDWIICIICUseBus(); - dbbusDWIICIICReshape(); - mdelay ( 300 ); - - //erase main - firmware_erase_c33 ( EMEM_MAIN ); - mdelay ( 1000 ); - - reset_hw(); - dbbusDWIICEnterSerialDebugMode(); - dbbusDWIICStopMCU(); - dbbusDWIICIICUseBus(); - dbbusDWIICIICReshape(); - mdelay ( 300 ); - - ///////////////////////// - // Program - ///////////////////////// - - //polling 0x3CE4 is 0x1C70 - if ( ( emem_type == EMEM_ALL ) || ( emem_type == EMEM_MAIN ) ) - { - do - { - reg_data = read_reg ( 0x3C, 0xE4 ); - } - while ( reg_data != 0x1C70 ); - } - - switch ( emem_type ) - { - case EMEM_ALL: - write_reg ( 0x3C, 0xE4, 0xE38F ); // for all-blocks - break; - case EMEM_MAIN: - write_reg ( 0x3C, 0xE4, 0x7731 ); // for main block - break; - case EMEM_INFO: - write_reg ( 0x3C, 0xE4, 0x7731 ); // for info block - - write_reg_8bit ( 0x0F, 0xE6, 0x01 ); - - write_reg_8bit ( 0x3C, 0xE4, 0xC5 ); - write_reg_8bit ( 0x3C, 0xE5, 0x78 ); - - write_reg_8bit ( 0x1E, 0x04, 0x9F ); - write_reg_8bit ( 0x1E, 0x05, 0x82 ); - - write_reg_8bit ( 0x0F, 0xE6, 0x00 ); - mdelay ( 100 ); - break; - } - - // polling 0x3CE4 is 0x2F43 - do - { - reg_data = read_reg ( 0x3C, 0xE4 ); - } - while ( reg_data != 0x2F43 ); - - // calculate CRC 32 - _CRC_initTable (); - - for ( i = 0; i < 32; i++ ) // total 32 KB : 2 byte per R/W - { - if ( i == 31 ) - { - temp[i][1014] = 0x5A; - temp[i][1015] = 0xA5; - - for ( j = 0; j < 1016; j++ ) - { - crc_main = _CRC_getValue ( temp[i][j], crc_main); - } - } - else - { - for ( j = 0; j < 1024; j++ ) - { - crc_main = _CRC_getValue ( temp[i][j], crc_main); - } - } - - //write_i2c_seq(SLAVE_I2C_ID_DWI2C, temp[i], 1024); - for (j = 0; j < 8; j++) - { - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &temp[i][j*128], 128 ); - } - msleep (100); - - // polling 0x3CE4 is 0xD0BC - do - { - reg_data = read_reg ( 0x3C, 0xE4 ); - } - while ( reg_data != 0xD0BC ); - - write_reg ( 0x3C, 0xE4, 0x2F43 ); - } - - if ( ( emem_type == EMEM_ALL ) || ( emem_type == EMEM_MAIN ) ) - { - // write file done and check crc - write_reg ( 0x3C, 0xE4, 0x1380 ); - } - mdelay ( 10 ); - - if ( ( emem_type == EMEM_ALL ) || ( emem_type == EMEM_MAIN ) ) - { - // polling 0x3CE4 is 0x9432 - do - { - reg_data = read_reg ( 0x3C, 0xE4 ); - }while ( reg_data != 0x9432 ); - } - - crc_main = crc_main ^ 0xffffffff; - crc_info = crc_info ^ 0xffffffff; - - if ( ( emem_type == EMEM_ALL ) || ( emem_type == EMEM_MAIN ) ) - { - // CRC Main from TP - crc_main_tp = read_reg ( 0x3C, 0x80 ); - crc_main_tp = ( crc_main_tp << 16 ) | read_reg ( 0x3C, 0x82 ); - - // CRC Info from TP - crc_info_tp = read_reg ( 0x3C, 0xA0 ); - crc_info_tp = ( crc_info_tp << 16 ) | read_reg ( 0x3C, 0xA2 ); - } - - update_pass = 1; - if ( ( emem_type == EMEM_ALL ) || ( emem_type == EMEM_MAIN ) ) - { - if ( crc_main_tp != crc_main ) - update_pass = 0; - - /* - if ( crc_info_tp != crc_info ) - update_pass = 0; - */ - } - - if ( !update_pass ) - { - DBG( "update_C33 failed\n" ); - reset_hw(); - FwDataCnt = 0; - return 0; - } - - DBG( "update_C33 OK\n" ); - reset_hw(); - FwDataCnt = 0; - return size; -} - -#ifdef FIRMWARE_AUTOUPDATE -unsigned short main_sw_id = 0x7FF, info_sw_id = 0x7FF; -U32 bin_conf_crc32 = 0; - -static U32 _CalMainCRC32(void) -{ - U32 ret=0; - U16 reg_data=0; - - reset_hw(); - - dbbusDWIICEnterSerialDebugMode(); - dbbusDWIICStopMCU(); - dbbusDWIICIICUseBus(); - dbbusDWIICIICReshape(); - msleep ( 100 ); - - //Stop MCU - write_reg ( 0x0F, 0xE6, 0x0001 ); - - // Stop Watchdog - write_reg_8bit ( 0x3C, 0x60, 0x55 ); - write_reg_8bit ( 0x3C, 0x61, 0xAA ); - - //cmd - write_reg ( 0x3C, 0xE4, 0xDF4C ); - write_reg ( 0x1E, 0x04, 0x7d60 ); - // TP SW reset - write_reg ( 0x1E, 0x04, 0x829F ); - - //MCU run - write_reg ( 0x0F, 0xE6, 0x0000 ); - - //polling 0x3CE4 - do - { - reg_data = read_reg ( 0x3C, 0xE4 ); - }while ( reg_data != 0x9432 ); - - // Cal CRC Main from TP - ret = read_reg ( 0x3C, 0x80 ); - ret = ( ret << 16 ) | read_reg ( 0x3C, 0x82 ); - - DBG("[21xxA]:Current main crc32=0x%x\n",ret); - return (ret); -} - -static void _ReadBinConfig ( void ) -{ - U8 dbbus_tx_data[5]={0}; - U8 dbbus_rx_data[4]={0}; - U16 reg_data=0; - - reset_hw(); - - dbbusDWIICEnterSerialDebugMode(); - dbbusDWIICStopMCU(); - dbbusDWIICIICUseBus(); - dbbusDWIICIICReshape(); - msleep ( 100 ); - - //Stop MCU - write_reg ( 0x0F, 0xE6, 0x0001 ); - - // Stop Watchdog - write_reg_8bit ( 0x3C, 0x60, 0x55 ); - write_reg_8bit ( 0x3C, 0x61, 0xAA ); - - //cmd - write_reg ( 0x3C, 0xE4, 0xA4AB ); - write_reg ( 0x1E, 0x04, 0x7d60 ); - - // TP SW reset - write_reg ( 0x1E, 0x04, 0x829F ); - - //MCU run - write_reg ( 0x0F, 0xE6, 0x0000 ); - - //polling 0x3CE4 - do - { - reg_data = read_reg ( 0x3C, 0xE4 ); - } - while ( reg_data != 0x5B58 ); - - dbbus_tx_data[0] = 0x72; - dbbus_tx_data[1] = 0x7F; - dbbus_tx_data[2] = 0x55; - dbbus_tx_data[3] = 0x00; - dbbus_tx_data[4] = 0x04; - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_tx_data[0], 5 ); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_rx_data[0], 4 ); - if ((dbbus_rx_data[0]>=0x30 && dbbus_rx_data[0]<=0x39) - &&(dbbus_rx_data[1]>=0x30 && dbbus_rx_data[1]<=0x39) - &&(dbbus_rx_data[2]>=0x31 && dbbus_rx_data[2]<=0x39)) - { - main_sw_id = (dbbus_rx_data[0]-0x30)*100+(dbbus_rx_data[1]-0x30)*10+(dbbus_rx_data[2]-0x30); - } - - dbbus_tx_data[0] = 0x72; - dbbus_tx_data[1] = 0x7F; - dbbus_tx_data[2] = 0xFC; - dbbus_tx_data[3] = 0x00; - dbbus_tx_data[4] = 0x04; - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_tx_data[0], 5 ); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_rx_data[0], 4 ); - bin_conf_crc32 = dbbus_rx_data[0]; - bin_conf_crc32 = (bin_conf_crc32<<8)|dbbus_rx_data[1]; - bin_conf_crc32 = (bin_conf_crc32<<8)|dbbus_rx_data[2]; - bin_conf_crc32 = (bin_conf_crc32<<8)|dbbus_rx_data[3]; - - dbbus_tx_data[0] = 0x72; - dbbus_tx_data[1] = 0x83; - dbbus_tx_data[2] = 0x00; - dbbus_tx_data[3] = 0x00; - dbbus_tx_data[4] = 0x04; - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_tx_data[0], 5 ); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_rx_data[0], 4 ); - if ((dbbus_rx_data[0]>=0x30 && dbbus_rx_data[0]<=0x39) - &&(dbbus_rx_data[1]>=0x30 && dbbus_rx_data[1]<=0x39) - &&(dbbus_rx_data[2]>=0x31 && dbbus_rx_data[2]<=0x39)) - { - info_sw_id = (dbbus_rx_data[0]-0x30)*100+(dbbus_rx_data[1]-0x30)*10+(dbbus_rx_data[2]-0x30); - } - - DBG("[21xxA]:main_sw_id = %d, info_sw_id = %d, bin_conf_crc32=0x%x\n", main_sw_id, info_sw_id, bin_conf_crc32); -} - -static int fwAutoUpdate(void *unused) -{ - int time = 0; - ssize_t ret = 0; - - for (time = 0; time < 5; time++) - { - DBG("fwAutoUpdate time = %d\n",time); - ret = firmware_update_c33(NULL, NULL, NULL, 1, EMEM_MAIN); - if (ret == 1) - { - DBG("AUTO_UPDATE OK!!!"); - break; - } - } - if (time == 5) - { - DBG("AUTO_UPDATE failed!!!"); - } - enable_irq(irq_msg21xx); - return 0; -} -#endif - -//------------------------------------------------------------------------------// -static ssize_t firmware_update_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - DBG("*** firmware_update_show() fw_version = %s ***\n", fw_version); - - return sprintf(buf, "%s\n", fw_version); -} - -static ssize_t firmware_update_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - bFwUpdating = 1; - disable_irq(irq_msg21xx); - - DBG("*** update fw size = %d ***\n", FwDataCnt); - size = firmware_update_c33 (dev, attr, buf, size, EMEM_MAIN); - - enable_irq(irq_msg21xx); - bFwUpdating = 0; - - return size; -} - -static DEVICE_ATTR(update, SYSFS_AUTHORITY, firmware_update_show, firmware_update_store); - -static ssize_t firmware_version_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - DBG("*** firmware_version_show() fw_version = %s ***\n", fw_version); - - return sprintf(buf, "%s\n", fw_version); -} - -static ssize_t firmware_version_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - get_customer_firmware_version(); - - DBG("*** firmware_version_store() fw_version = %s ***\n", fw_version); - - return size; -} - -static DEVICE_ATTR(version, SYSFS_AUTHORITY, firmware_version_show, firmware_version_store); - -static ssize_t firmware_data_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - DBG("*** firmware_data_show() FwDataCnt = %d ***\n", FwDataCnt); - - return FwDataCnt; -} - -static ssize_t firmware_data_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - int count = size / 1024; - int i; - - for (i = 0; i < count; i ++) - { - memcpy(temp[FwDataCnt], buf+(i*1024), 1024); - - FwDataCnt ++; - } - - DBG("***FwDataCnt = %d ***\n", FwDataCnt); - - if (buf != NULL) - { - DBG("*** buf[0] = %c ***\n", buf[0]); - } - - return size; -} - -static DEVICE_ATTR(data, SYSFS_AUTHORITY, firmware_data_show, firmware_data_store); - -#ifdef TP_PRINT -static ssize_t tp_print_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - tp_print_proc_read(); - - return sprintf(buf, "%d\n", bTpInSuspend); -} - -static ssize_t tp_print_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - DBG("*** tp_print_store() ***\n"); - - return size; -} - -static DEVICE_ATTR(tpp, SYSFS_AUTHORITY, tp_print_show, tp_print_store); -#endif - -//------------------------------------------------------------------------------// -#ifdef CONFIG_TOUCHSCREEN_PROXIMITY_SENSOR -static void _msg_enable_proximity(void) -{ - U8 tx_data[4] = {0}; - - DBG("_msg_enable_proximity!"); - tx_data[0] = 0x52; - tx_data[1] = 0x00; - tx_data[2] = 0x47; - tx_data[3] = 0xa0; - mutex_lock(&msg21xx_mutex); - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &tx_data[0], 4); - mutex_unlock(&msg21xx_mutex); - - bEnableTpProximity = 1; -} - -static void _msg_disable_proximity(void) -{ - U8 tx_data[4] = {0}; - - DBG("_msg_disable_proximity!"); - tx_data[0] = 0x52; - tx_data[1] = 0x00; - tx_data[2] = 0x47; - tx_data[3] = 0xa1; - mutex_lock(&msg21xx_mutex); - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &tx_data[0], 4); - mutex_unlock(&msg21xx_mutex); - - bEnableTpProximity = 0; - bFaceClosingTp = 0; -} - -void tsps_msg21xx_enable(int en) -{ - if (en) - { - _msg_enable_proximity(); - } - else - { - _msg_disable_proximity(); - } -} - -int tsps_msg21xx_data(void) -{ - return bFaceClosingTp; -} -#endif - -static U8 calculate_checksum(U8 *msg, S32 length) -{ - S32 Checksum = 0; - S32 i; - - for (i = 0; i < length; i ++) - { - Checksum += msg[i]; - } - - return (U8)((-Checksum) & 0xFF); -} - -static S32 parse_info(touchInfo_t *info) -{ - U8 data[DEMO_MODE_PACKET_LENGTH] = {0}; - U8 checksum = 0; - U32 x = 0, y = 0; - U32 x2 = 0, y2 = 0; - U32 delta_x = 0, delta_y = 0; - - mutex_lock(&msg21xx_mutex); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &data[0], DEMO_MODE_PACKET_LENGTH); - mutex_unlock(&msg21xx_mutex); - checksum = calculate_checksum(&data[0], (DEMO_MODE_PACKET_LENGTH-1)); - DBG("check sum: [%x] == [%x]? \n", data[DEMO_MODE_PACKET_LENGTH-1], checksum); - - if(data[DEMO_MODE_PACKET_LENGTH-1] != checksum) - { - DBG("WRONG CHECKSUM\n"); - return -1; - } - - if(data[0] != 0x52) - { - DBG("WRONG HEADER\n"); - return -1; - } - - info->keycode = 0xFF; - if ((data[1] == 0xFF) && (data[2] == 0xFF) && (data[3] == 0xFF) && (data[4] == 0xFF) && (data[6] == 0xFF)) - { - if ((data[5] == 0xFF) || (data[5] == 0)) - { - info->keycode = 0xFF; - } - else if ((data[5] == 1) || (data[5] == 2) || (data[5] == 4) || (data[5] == 8)) - { - if (data[5] == 1) - { - info->keycode = 0; - } - else if (data[5] == 2) - { - info->keycode = 1; - } - else if (data[5] == 4) - { - info->keycode = 2; - } - else if (data[5] == 8) - { - info->keycode = 3; - } - } - #ifdef CONFIG_TOUCHSCREEN_PROXIMITY_SENSOR - else if (bEnableTpProximity &&((data[5] == 0x80) || (data[5] == 0x40))) - { - if (data[5] == 0x80) - { - bFaceClosingTp = 1; - } - else if (data[5] == 0x40) - { - bFaceClosingTp = 0; - } - DBG("bEnableTpProximity=%d; bFaceClosingTp=%d; data[5]=%x;\n", bEnableTpProximity, bFaceClosingTp, data[5]); - return -1; - } - #endif - else - { - DBG("WRONG KEY\n"); - return -1; - } - } - else - { - x = (((data[1] & 0xF0 ) << 4) | data[2]); - y = ((( data[1] & 0x0F) << 8) | data[3]); - delta_x = (((data[4] & 0xF0) << 4 ) | data[5]); - delta_y = (((data[4] & 0x0F) << 8 ) | data[6]); - - if ((delta_x == 0) && (delta_y == 0)) - { - info->point[0].x = x * TOUCH_SCREEN_X_MAX / TPD_WIDTH; - info->point[0].y = y * TOUCH_SCREEN_Y_MAX/ TPD_HEIGHT; - info->count = 1; - } - else - { - if (delta_x > 2048) - { - delta_x -= 4096; - } - if (delta_y > 2048) - { - delta_y -= 4096; - } - x2 = (U32)((S16)x + (S16)delta_x); - y2 = (U32)((S16)y + (S16)delta_y); - info->point[0].x = x * TOUCH_SCREEN_X_MAX / TPD_WIDTH; - info->point[0].y = y * TOUCH_SCREEN_Y_MAX/ TPD_HEIGHT; - info->point[1].x = x2 * TOUCH_SCREEN_X_MAX / TPD_WIDTH; - info->point[1].y = y2 * TOUCH_SCREEN_Y_MAX/ TPD_HEIGHT; - info->count = 2; - } - } - - return 0; -} - -static void touch_driver_touch_pressed(int x, int y) -{ - DBG("point touch pressed"); - - input_report_key(input_dev, BTN_TOUCH, 1); - input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, 1); - input_report_abs(input_dev, ABS_MT_POSITION_X, x); - input_report_abs(input_dev, ABS_MT_POSITION_Y, y); - input_mt_sync(input_dev); -} - -static void touch_driver_touch_released(void) -{ - DBG("point touch released"); - - input_report_key(input_dev, BTN_TOUCH, 0); - input_mt_sync(input_dev); -} - -/* read data through I2C then report data to input sub-system when interrupt occurred */ -void touch_driver_do_work(struct work_struct *work) -{ - touchInfo_t info; - int i = 0; - static int last_keycode = 0xFF; - static int last_count = 0; - - DBG("touch_driver_do_work()\n"); - - memset(&info, 0x0, sizeof(info)); - if (0 == parse_info(&info)) - { - #ifdef CONFIG_TP_HAVE_KEY - if (info.keycode != 0xFF) //key touch pressed - { - DBG("touch_driver_do_work() info.keycode=%x, last_keycode=%x, tp_key_array[%d]=%d\n", info.keycode, last_keycode, info.keycode, tp_key_array[info.keycode]); - if (info.keycode < MAX_KEY_NUM) - { - if (info.keycode != last_keycode) - { - DBG("key touch pressed"); - - input_report_key(input_dev, BTN_TOUCH, 1); - input_report_key(input_dev, tp_key_array[info.keycode], 1); - - last_keycode = info.keycode; - } - else - { - /// pass duplicate key-pressing - DBG("REPEATED KEY\n"); - } - } - else - { - DBG("WRONG KEY\n"); - } - } - else //key touch released - { - if (last_keycode != 0xFF) - { - DBG("key touch released"); - - input_report_key(input_dev, BTN_TOUCH, 0); - input_report_key(input_dev, tp_key_array[last_keycode], 0); - - last_keycode = 0xFF; - } - } - #endif //CONFIG_TP_HAVE_KEY - - if (info.count > 0) //point touch pressed - { - for (i = 0; i < info.count; i ++) - { - touch_driver_touch_pressed(info.point[i].x, info.point[i].y); - } - last_count = info.count; - } - else if (last_count > 0) //point touch released - { - touch_driver_touch_released(); - last_count = 0; - } - - input_sync(input_dev); - } - - enable_irq(irq_msg21xx); -} - -/* The interrupt service routine will be triggered when interrupt occurred */ -irqreturn_t touch_driver_isr(int irq, void *dev_id) -{ - DBG("touch_driver_isr()\n"); - - disable_irq_nosync(irq_msg21xx); - schedule_work(&msg21xx_wk); - - return IRQ_HANDLED; -} - -#if defined(CONFIG_FB) -static int fb_notifier_callback(struct notifier_block *self, unsigned long event, void *data) -{ - struct fb_event *evdata = data; - int *blank; - - if (evdata && evdata->data && event == FB_EVENT_BLANK ) - { - blank = evdata->data; - if (*blank == FB_BLANK_UNBLANK) - { - if (bTpInSuspend) - { - gpio_direction_output(MS_TS_MSG21XX_GPIO_RST, 1); - mdelay(10); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 0); - mdelay(10); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 1); - mdelay(200); - - touch_driver_touch_released(); - input_sync(input_dev); - - enable_irq(irq_msg21xx); - } - bTpInSuspend = 0; - } - else if (*blank == FB_BLANK_POWERDOWN) - { - if (bFwUpdating) - { - DBG("suspend bFwUpdating=%d\n", bFwUpdating); - return 0; - } - - #ifdef CONFIG_TOUCHSCREEN_PROXIMITY_SENSOR - if (bEnableTpProximity) - { - DBG("suspend bEnableTpProximity=%d\n", bEnableTpProximity); - return 0; - } - #endif - - if (bTpInSuspend == 0) - { - disable_irq(irq_msg21xx); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 0); - } - bTpInSuspend = 1; - } - } - - return 0; -} -#endif - -#ifdef CONFIG_HAS_EARLYSUSPEND -void touch_driver_early_suspend(struct early_suspend *p) -{ - DBG("touch_driver_early_suspend()\n"); - - if (bFwUpdating) - { - DBG("suspend bFwUpdating=%d\n", bFwUpdating); - return; - } - -#ifdef CONFIG_TOUCHSCREEN_PROXIMITY_SENSOR - if (bEnableTpProximity) - { - DBG("suspend bEnableTpProximity=%d\n", bEnableTpProximity); - return; - } -#endif - - if (bTpInSuspend == 0) - { - disable_irq(irq_msg21xx); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 0); - } - bTpInSuspend = 1; -} - -void touch_driver_early_resume(struct early_suspend *p) -{ - DBG("touch_driver_early_resume() bTpInSuspend=%d\n", bTpInSuspend); - - if (bTpInSuspend) - { - gpio_direction_output(MS_TS_MSG21XX_GPIO_RST, 1); - mdelay(10); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 0); - mdelay(10); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 1); - mdelay(200); - - touch_driver_touch_released(); - input_sync(input_dev); - - enable_irq(irq_msg21xx); - } - bTpInSuspend = 0; -} -#endif - -/* probe function is used for matching and initializing input device */ -static int touch_driver_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ -#ifdef FIRMWARE_AUTOUPDATE - unsigned short update_bin_major = 0, update_bin_minor = 0; - int i, update_flag = 0; -#endif - int ret = 0; - - if (input_dev != NULL) - { - DBG("input device has found\n"); - return -1; - } - - DBG("*** %s ***\n", __FUNCTION__); - - i2c_client = client; - - ret = gpio_request(MS_TS_MSG21XX_GPIO_RST, "reset"); - if (ret < 0) - { - pr_err("*** Failed to request GPIO %d, error %d ***\n", MS_TS_MSG21XX_GPIO_RST, ret); - goto err0; - } - - // power on TP - gpio_direction_output(MS_TS_MSG21XX_GPIO_RST, 1); - mdelay(100); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 0); - mdelay(10); - gpio_set_value(MS_TS_MSG21XX_GPIO_RST, 1); - mdelay(200); - if (0 == get_ic_type()) - { - pr_err("the currnet ic is not Mstar\n"); - ret = -1; - goto err0; - } - - mutex_init(&msg21xx_mutex); - - /* allocate an input device */ - input_dev = input_allocate_device(); - if (!input_dev) - { - ret = -ENOMEM; - pr_err("*** input device allocation failed ***\n"); - goto err1; - } - - input_dev->name = client->name; - input_dev->phys = "I2C"; - input_dev->dev.parent = &client->dev; - input_dev->id.bustype = BUS_I2C; - - /* set the supported event type for input device */ - set_bit(EV_ABS, input_dev->evbit); - set_bit(EV_SYN, input_dev->evbit); - set_bit(EV_KEY, input_dev->evbit); - set_bit(BTN_TOUCH, input_dev->keybit); - set_bit(INPUT_PROP_DIRECT, input_dev->propbit); - -#ifdef CONFIG_TP_HAVE_KEY - { - int i; - for (i = 0; i < MAX_KEY_NUM; i ++) - { - input_set_capability(input_dev, EV_KEY, tp_key_array[i]); - } - } -#endif - - input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 2, 0, 0); - input_set_abs_params(input_dev, ABS_MT_POSITION_X, TOUCH_SCREEN_X_MIN, TOUCH_SCREEN_X_MAX, 0, 0); - input_set_abs_params(input_dev, ABS_MT_POSITION_Y, TOUCH_SCREEN_Y_MIN, TOUCH_SCREEN_Y_MAX, 0, 0); - - /* register the input device to input sub-system */ - ret = input_register_device(input_dev); - if (ret < 0) - { - pr_err("*** Unable to register ms-touchscreen input device ***\n"); - goto err1; - } - - /* set sysfs for firmware */ - firmware_class = class_create(THIS_MODULE, "ms-touchscreen-msg20xx"); //client->name - if (IS_ERR(firmware_class)) - pr_err("Failed to create class(firmware)!\n"); - - firmware_cmd_dev = device_create(firmware_class, NULL, 0, NULL, "device"); - if (IS_ERR(firmware_cmd_dev)) - pr_err("Failed to create device(firmware_cmd_dev)!\n"); - - // version - if (device_create_file(firmware_cmd_dev, &dev_attr_version) < 0) - pr_err("Failed to create device file(%s)!\n", dev_attr_version.attr.name); - // update - if (device_create_file(firmware_cmd_dev, &dev_attr_update) < 0) - pr_err("Failed to create device file(%s)!\n", dev_attr_update.attr.name); - // data - if (device_create_file(firmware_cmd_dev, &dev_attr_data) < 0) - pr_err("Failed to create device file(%s)!\n", dev_attr_data.attr.name); - -#ifdef TP_PRINT - tp_print_create_entry(); -#endif - - dev_set_drvdata(firmware_cmd_dev, NULL); - - /* initialize the work queue */ - INIT_WORK(&msg21xx_wk, touch_driver_do_work); - - ret = gpio_request(MS_TS_MSG21XX_GPIO_INT, "interrupt"); - if (ret < 0) - { - pr_err("*** Failed to request GPIO %d, error %d ***\n", MS_TS_MSG21XX_GPIO_INT, ret); - goto err2; - } - gpio_direction_input(MS_TS_MSG21XX_GPIO_INT); - gpio_set_value(MS_TS_MSG21XX_GPIO_INT, 1); - - irq_msg21xx = gpio_to_irq(MS_TS_MSG21XX_GPIO_INT); - - /* request an irq and register the isr */ - ret = request_irq(irq_msg21xx, touch_driver_isr, IRQF_TRIGGER_RISING, "msg21xx", NULL); - if (ret != 0) - { - pr_err("*** Unable to claim irq %d; error %d ***\n", MS_TS_MSG21XX_GPIO_INT, ret); - goto err3; - } - - disable_irq(irq_msg21xx); - -#if defined(CONFIG_FB) - msg21xx_fb_notif.notifier_call = fb_notifier_callback; - ret = fb_register_client(&msg21xx_fb_notif); -#elif defined (CONFIG_HAS_EARLYSUSPEND) - mstar_ts_early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN; - mstar_ts_early_suspend.suspend = touch_driver_early_suspend; - mstar_ts_early_suspend.resume = touch_driver_early_resume; - register_early_suspend(&mstar_ts_early_suspend); -#endif - -#ifdef CONFIG_TOUCHSCREEN_PROXIMITY_SENSOR - tsps_assist_register_callback("msg21xx", &tsps_msg21xx_enable, &tsps_msg21xx_data); -#endif - -#ifdef FIRMWARE_AUTOUPDATE - get_customer_firmware_version(); - _ReadBinConfig(); - - if (main_sw_id == info_sw_id) - { - if (_CalMainCRC32() == bin_conf_crc32) - { - if ((main_sw_id >= SWID_START) && (main_sw_id < SWID_NULL)) - { - update_bin_major= (MSG_FIRMWARE[main_sw_id-SWID_START][0x7f4f] << 8) + MSG_FIRMWARE[main_sw_id-SWID_START][0x7f4e]; - update_bin_minor= (MSG_FIRMWARE[main_sw_id-SWID_START][0x7f51] << 8) + MSG_FIRMWARE[main_sw_id-SWID_START][0x7f50]; - - //check upgrading - if ((update_bin_major == fw_version_major) && (update_bin_minor > fw_version_minor)) - { - update_flag = 1; - } - } - DBG("MAIN sw_id=%d,update_flag=%d,update_bin_major=%d,update_bin_minor=%d\n",main_sw_id,update_flag,update_bin_major,update_bin_minor); - } - else - { - if ((info_sw_id >= SWID_START) && (info_sw_id < SWID_NULL)) - { - update_bin_major= (MSG_FIRMWARE[info_sw_id-SWID_START][0x7f4f] << 8) + MSG_FIRMWARE[info_sw_id-SWID_START][0x7f4e]; - update_bin_minor= (MSG_FIRMWARE[info_sw_id-SWID_START][0x7f51] << 8) + MSG_FIRMWARE[info_sw_id-SWID_START][0x7f50]; - update_flag = 1; - } - DBG("INFO1 sw_id=%d,update_flag=%d,update_bin_major=%d,update_bin_minor=%d\n",info_sw_id,update_flag,update_bin_major,update_bin_minor); - } - } - else - { - if ((info_sw_id >= SWID_START) && (info_sw_id < SWID_NULL)) - { - update_bin_major= (MSG_FIRMWARE[info_sw_id-SWID_START][0x7f4f] << 8) + MSG_FIRMWARE[info_sw_id-SWID_START][0x7f4e]; - update_bin_minor= (MSG_FIRMWARE[info_sw_id-SWID_START][0x7f51] << 8) + MSG_FIRMWARE[info_sw_id-SWID_START][0x7f50]; - update_flag = 1; - } - DBG("INFO2 sw_id=%d,update_flag=%d,update_bin_major=%d,update_bin_minor=%d\n",info_sw_id,update_flag,update_bin_major,update_bin_minor); - } - - if (update_flag == 1) - { - DBG("MSG21XX_fw_auto_update begin....\n"); - //transfer data - for (i = 0; i < 33; i++) - { - firmware_data_store(NULL, NULL, &(MSG_FIRMWARE[info_sw_id-SWID_START][i*1024]), 1024); - } - - kthread_run(fwAutoUpdate, 0, "MSG21XX_fw_auto_update"); - DBG("*** mstar touch screen registered ***\n"); - return 0; - } - - reset_hw(); -#endif - - DBG("*** mstar touch screen registered ***\n"); - enable_irq(irq_msg21xx); - return 0; - -err3: - free_irq(irq_msg21xx, input_dev); - -err2: - gpio_free(MS_TS_MSG21XX_GPIO_INT); - -err1: - mutex_destroy(&msg21xx_mutex); - input_unregister_device(input_dev); - input_free_device(input_dev); - input_dev = NULL; - -err0: - gpio_free(MS_TS_MSG21XX_GPIO_RST); - - return ret; -} - -/* remove function is triggered when the input device is removed from input sub-system */ -static int touch_driver_remove(struct i2c_client *client) -{ - DBG("touch_driver_remove()\n"); - - free_irq(irq_msg21xx, input_dev); - gpio_free(MS_TS_MSG21XX_GPIO_INT); - gpio_free(MS_TS_MSG21XX_GPIO_RST); - input_unregister_device(input_dev); - mutex_destroy(&msg21xx_mutex); - - return 0; -} - -/* The I2C device list is used for matching I2C device and I2C device driver. */ -static const struct i2c_device_id touch_device_id[] = -{ - {"msg21xx", 0}, - {}, /* should not omitted */ -}; - -MODULE_DEVICE_TABLE(i2c, touch_device_id); - -static struct i2c_driver touch_device_driver = -{ - .driver = { - .name = "msg21xx", - .owner = THIS_MODULE, - }, - .probe = touch_driver_probe, - .remove = touch_driver_remove, - .id_table = touch_device_id, -}; - -static int __init touch_driver_init(void) -{ - int ret; - - /* register driver */ - ret = i2c_add_driver(&touch_device_driver); - if (ret < 0) - { - DBG("add touch_device_driver i2c driver failed.\n"); - return -ENODEV; - } - DBG("add touch_device_driver i2c driver.\n"); - - return ret; -} - -static void __exit touch_driver_exit(void) -{ - DBG("remove touch_device_driver i2c driver.\n"); - - i2c_del_driver(&touch_device_driver); -} - -#ifdef TP_PRINT -#include <linux/proc_fs.h> - -static U16 InfoAddr = 0x0F, PoolAddr = 0x10, TransLen = 256; -static U8 row, units, cnt; - -static int tp_print_proc_read(void) -{ - U16 i, j; - U16 left, offset = 0; - U8 dbbus_tx_data[3] = {0}; - U8 u8Data; - S16 s16Data; - S32 s32Data; - char *buf = NULL; - - left = cnt*row*units; - if ((bTpInSuspend == 0) && (InfoAddr != 0x0F) && (PoolAddr != 0x10) && (left > 0)) - { - buf = kmalloc(left, GFP_KERNEL); - if (buf != NULL) - { - printk("tpp: \n"); - - while (left > 0) - { - dbbus_tx_data[0] = 0x53; - dbbus_tx_data[1] = ((PoolAddr + offset) >> 8) & 0xFF; - dbbus_tx_data[2] = (PoolAddr + offset) & 0xFF; - mutex_lock(&msg21xx_mutex); - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_tx_data[0], 3); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &buf[offset], left > TransLen ? TransLen : left); - mutex_unlock(&msg21xx_mutex); - - if (left > TransLen) - { - left -= TransLen; - offset += TransLen; - } - else - { - left = 0; - } - } - - for (i = 0; i < cnt; i++) - { - printk("tpp: "); - for (j = 0; j < row; j++) - { - if (units == 1) - { - u8Data = buf[i*row*units + j*units]; - printk("%d\t", u8Data); - } - else if (units == 2) - { - s16Data = buf[i*row*units + j*units] + (buf[i*row*units + j*units + 1] << 8); - printk("%d\t", s16Data); - } - else if (units == 4) - { - s32Data = buf[i*row*units + j*units] + (buf[i*row*units + j*units + 1] << 8) + (buf[i*row*units + j*units + 2] << 16) + (buf[i*row*units + j*units + 3] << 24); - printk("%d\t", s32Data); - } - } - printk("\n"); - } - - kfree(buf); - } - } - - return 0; -} - -static void tp_print_create_entry(void) -{ - U8 dbbus_tx_data[3] = {0}; - U8 dbbus_rx_data[8] = {0}; - - dbbus_tx_data[0] = 0x53; - dbbus_tx_data[1] = 0x00; - dbbus_tx_data[2] = 0x58; - mutex_lock(&msg21xx_mutex); - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_tx_data[0], 3); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_rx_data[0], 4); - mutex_unlock(&msg21xx_mutex); - InfoAddr = (dbbus_rx_data[1]<<8) + dbbus_rx_data[0]; - PoolAddr = (dbbus_rx_data[3]<<8) + dbbus_rx_data[2]; - printk("InfoAddr=0x%X\n", InfoAddr); - printk("PoolAddr=0x%X\n", PoolAddr); - - if ((InfoAddr != 0x0F) && (PoolAddr != 0x10)) - { - msleep(10); - dbbus_tx_data[0] = 0x53; - dbbus_tx_data[1] = (InfoAddr >> 8) & 0xFF; - dbbus_tx_data[2] = InfoAddr & 0xFF; - mutex_lock(&msg21xx_mutex); - write_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_tx_data[0], 3); - read_i2c_seq(SLAVE_I2C_ID_DWI2C, &dbbus_rx_data[0], 8); - mutex_unlock(&msg21xx_mutex); - - units = dbbus_rx_data[0]; - row = dbbus_rx_data[1]; - cnt = dbbus_rx_data[2]; - TransLen = (dbbus_rx_data[7]<<8) + dbbus_rx_data[6]; - printk("tpp: row=%d, units=%d\n", row, units); - printk("tpp: cnt=%d, TransLen=%d\n", cnt, TransLen); - - // tpp - if (device_create_file(firmware_cmd_dev, &dev_attr_tpp) < 0) - { - pr_err("Failed to create device file(%s)!\n", dev_attr_tpp.attr.name); - } - } -} -#endif - -module_init(touch_driver_init); -module_exit(touch_driver_exit); -MODULE_AUTHOR("MStar Semiconductor, Inc."); -MODULE_LICENSE("GPL v2"); - diff --git a/kernel/events/core.c b/kernel/events/core.c index 1cb22d44ccbb..96100cc046c5 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -1584,14 +1584,14 @@ event_sched_out(struct perf_event *event, perf_pmu_disable(event->pmu); + event->tstamp_stopped = tstamp; + event->pmu->del(event, 0); + event->oncpu = -1; event->state = PERF_EVENT_STATE_INACTIVE; if (event->pending_disable) { event->pending_disable = 0; event->state = PERF_EVENT_STATE_OFF; } - event->tstamp_stopped = tstamp; - event->pmu->del(event, 0); - event->oncpu = -1; if (!is_software_event(event)) cpuctx->active_oncpu--; @@ -8032,6 +8032,9 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu, } } + /* symmetric to unaccount_event() in _free_event() */ + account_event(event); + return event; err_per_task: @@ -8398,8 +8401,6 @@ SYSCALL_DEFINE5(perf_event_open, } } - account_event(event); - /* * Special case software events and allow them to be part of * any hardware group. @@ -8638,7 +8639,12 @@ err_context: perf_unpin_context(ctx); put_ctx(ctx); err_alloc: - free_event(event); + /* + * If event_file is set, the fput() above will have called ->release() + * and that will take care of freeing the event. + */ + if (!event_file) + free_event(event); err_cpus: put_online_cpus(); err_task: @@ -8682,8 +8688,6 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, /* Mark owner so we could distinguish it from user events. */ event->owner = EVENT_OWNER_KERNEL; - account_event(event); - ctx = find_get_context(event->pmu, task, event); if (IS_ERR(ctx)) { err = PTR_ERR(ctx); diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index b7342a24f559..b7dd5718836e 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -339,6 +339,7 @@ int hibernation_snapshot(int platform_mode) pm_message_t msg; int error; + pm_suspend_clear_flags(); error = platform_begin(platform_mode); if (error) goto Close; diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f640c0e3c7ea..58303b3dc356 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8986,6 +8986,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) set_window_start(rq); raw_spin_unlock_irqrestore(&rq->lock, flags); rq->calc_load_update = calc_load_update; + account_reset_rq(rq); break; case CPU_ONLINE: diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 647f184f8aec..f29b132a9f8b 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c @@ -270,21 +270,21 @@ static __always_inline bool steal_account_process_tick(void) #ifdef CONFIG_PARAVIRT if (static_key_false(¶virt_steal_enabled)) { u64 steal; - cputime_t steal_ct; + unsigned long steal_jiffies; steal = paravirt_steal_clock(smp_processor_id()); steal -= this_rq()->prev_steal_time; /* - * cputime_t may be less precise than nsecs (eg: if it's - * based on jiffies). Lets cast the result to cputime + * steal is in nsecs but our caller is expecting steal + * time in jiffies. Lets cast the result to jiffies * granularity and account the rest on the next rounds. */ - steal_ct = nsecs_to_cputime(steal); - this_rq()->prev_steal_time += cputime_to_nsecs(steal_ct); + steal_jiffies = nsecs_to_jiffies(steal); + this_rq()->prev_steal_time += jiffies_to_nsecs(steal_jiffies); - account_steal_time(steal_ct); - return steal_ct; + account_steal_time(jiffies_to_cputime(steal_jiffies)); + return steal_jiffies; } #endif return false; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 45b76cfff1ec..b9566cf3ad37 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2363,3 +2363,16 @@ static inline u64 irq_time_read(int cpu) } #endif /* CONFIG_64BIT */ #endif /* CONFIG_IRQ_TIME_ACCOUNTING */ + +static inline void account_reset_rq(struct rq *rq) +{ +#ifdef CONFIG_IRQ_TIME_ACCOUNTING + rq->prev_irq_time = 0; +#endif +#ifdef CONFIG_PARAVIRT + rq->prev_steal_time = 0; +#endif +#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING + rq->prev_steal_time_rq = 0; +#endif +} diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c index b65c78c15ab3..4a816bab38a2 100644 --- a/kernel/sysctl_binary.c +++ b/kernel/sysctl_binary.c @@ -1324,7 +1324,7 @@ static ssize_t binary_sysctl(const int *name, int nlen, } mnt = task_active_pid_ns(current)->proc_mnt; - file = file_open_root(mnt->mnt_root, mnt, pathname, flags); + file = file_open_root(mnt->mnt_root, mnt, pathname, flags, 0); result = PTR_ERR(file); if (IS_ERR(file)) goto out_putname; diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 530bbc44082c..ae68222c5a74 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5044,7 +5044,10 @@ static ssize_t tracing_splice_read_pipe(struct file *filp, spd.nr_pages = i; - ret = splice_to_pipe(pipe, &spd); + if (i) + ret = splice_to_pipe(pipe, &spd); + else + ret = 0; out: splice_shrink_spd(&spd); return ret; diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index e4e56589ec1d..be3222b7d72e 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c @@ -109,8 +109,12 @@ static int func_prolog_dec(struct trace_array *tr, return 0; local_save_flags(*flags); - /* slight chance to get a false positive on tracing_cpu */ - if (!irqs_disabled_flags(*flags)) + /* + * Slight chance to get a false positive on tracing_cpu, + * although I'm starting to think there isn't a chance. + * Leave this for now just to be paranoid. + */ + if (!irqs_disabled_flags(*flags) && !preempt_count()) return 0; *data = per_cpu_ptr(tr->trace_buffer.data, cpu); diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index 060df67dbdd1..f96f0383f6c6 100644 --- a/kernel/trace/trace_printk.c +++ b/kernel/trace/trace_printk.c @@ -296,6 +296,9 @@ static int t_show(struct seq_file *m, void *v) const char *str = *fmt; int i; + if (!*fmt) + return 0; + seq_printf(m, "0x%lx : \"", *(unsigned long *)fmt); /* diff --git a/kernel/watchdog.c b/kernel/watchdog.c index b40f7f35413d..9472691c1eb0 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -1038,6 +1038,9 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, * both lockup detectors are disabled if proc_watchdog_update() * returns an error. */ + if (old == new) + goto out; + err = proc_watchdog_update(); } out: @@ -1082,7 +1085,7 @@ int proc_soft_watchdog(struct ctl_table *table, int write, int proc_watchdog_thresh(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - int err, old; + int err, old, new; get_online_cpus(); mutex_lock(&watchdog_proc_mutex); @@ -1102,6 +1105,10 @@ int proc_watchdog_thresh(struct ctl_table *table, int write, /* * Update the sample period. Restore on failure. */ + new = ACCESS_ONCE(watchdog_thresh); + if (old == new) + goto out; + set_sample_period(); err = proc_watchdog_update(); if (err) { |
