Merge 4.9.223 into android-4.9-q
Linux 4.9.223
* mac80211: add ieee80211_is_any_nullfunc()
include/linux/ieee80211.h
ALSA: hda: Match both PCI ID and SSID for driver blacklist
sctp: Fix SHUTDOWN CTSN Ack in the peer restart case
MIPS: perf: Remove incorrect odd/even counter handling for I6400
xprtrdma: Fix backchannel allocation of extra rpcrdma_reps
net: systemport: suppress warnings on failed Rx SKB allocations
net: bcmgenet: suppress warnings on failed Rx SKB allocations
* lib/mpi: Fix building for powerpc with clang
lib/mpi/longlong.h
net: dsa: b53: Rework ARL bin logic
scripts/config: allow colons in option strings for sed
cifs: protect updating server->dstaddr with a spinlock
net: stmmac: Fix sub-second increment
wimax/i2400m: Fix potential urb refcnt leak
ASoC: sgtl5000: Fix VAG power-on handling
selftests/ipc: Fix test failure seen after initial test run
iio:ad7797: Use correct attribute_group
powerpc/pci/of: Parse unassigned resources
vhost: vsock: kick send_pkt worker once device is started
Merge 4.9.222 into android-4.9-q
Linux 4.9.222
drm/qxl: qxl_release use after free
* selinux: properly handle multiple messages in selinux_netlink_send()
security/selinux/hooks.c
dmaengine: dmatest: Fix iteration non-stop logic
nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl
ALSA: opti9xx: shut up gcc-10 range warning
iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system
vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn()
RDMA/mlx4: Initialize ib_spec on the stack
* dm verity fec: fix hash block number in verity_fec_decode
drivers/md/dm-verity-fec.c
PM: hibernate: Freeze kernel threads in software_resume()
PM: ACPI: Output correct message on target power state
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
ALSA: hda/hdmi: fix without unlocked before return
btrfs: fix block group leak when removing fails
drm/qxl: qxl_release leak in qxl_hw_surface_alloc()
drm/qxl: qxl_release leak in qxl_draw_dirty_fb()
* drm/edid: Fix off-by-one in DispID DTD pixel clock
drivers/gpu/drm/drm_edid.c
* ext4: fix special inode number checks in __ext4_iget()
fs/ext4/inode.c
Merge 4.9.221 into android-4.9-q
ANDROID: cuttlefish_defconfig: Fix dm-verity related options
Linux 4.9.221
* propagate_one(): mnt_set_mountpoint() needs mount_lock
fs/pnode.c
* ext4: check for non-zero journal inum in ext4_calculate_overhead
fs/ext4/super.c
* ext4: unsigned int compared against zero
fs/ext4/block_validity.c
* ext4: fix block validity checks for journal inodes using indirect blocks
fs/ext4/block_validity.c
* ext4: don't perform block validity checks on the journal inode
fs/ext4/extents.c
* ext4: protect journal inode's blocks using block_validity
fs/ext4/block_validity.c
fs/ext4/inode.c
* ext4: avoid declaring fs inconsistent due to invalid file handles
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/inode.c
fs/ext4/ioctl.c
fs/ext4/namei.c
fs/ext4/resize.c
fs/ext4/super.c
hwmon: (jc42) Fix name to have no illegal characters
* ext4: convert BUG_ON's to WARN_ON's in mballoc.c
fs/ext4/mballoc.c
xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status
objtool: Support Clang non-section symbols in ORC dump
objtool: Fix CONFIG_UBSAN_TRAP unreachable warnings
scsi: target: fix PR IN / READ FULL STATUS for FC
xfs: fix partially uninitialized structure in xfs_reflink_remap_extent
bpf, x86: Fix encoding for lower 8-bit registers in BPF_STX BPF_B
* perf/core: fix parent pid/tid in task exit events
kernel/events/core.c
net/cxgb4: Check the return from t4_query_params properly
nfsd: memory corruption in nfsd4_lock()
usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete
mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer
* fuse: fix possibly missed wake-up after abort
fs/fuse/dev.c
remoteproc: Fix wrong rvring index computation
* usb: f_fs: Clear OS Extended descriptor counts to zero in ffs_data_reset()
drivers/usb/gadget/function/f_fs.c
UAS: fix deadlock in error handling and PM flushing work
UAS: no use logging any details in case of ENODEV
staging: vt6656: Power save stop wake_up_count wrap around.
staging: vt6656: Fix drivers TBTT timing counter.
staging: comedi: Fix comedi_device refcnt leak in comedi_open
staging: comedi: dt2815: fix writing hi byte of analog output
ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
* ASoC: dapm: fixup dapm kcontrol widget
sound/soc/soc-dapm.c
* audit: check the length of userspace generated audit records
kernel/audit.c
* usb-storage: Add unusual_devs entry for JMicron JMS566
drivers/usb/storage/unusual_devs.h
tty: rocket, avoid OOB access
tty: hvc: fix buffer overflow during hvc_alloc().
KVM: VMX: Enable machine check support for 32bit targets
* KVM: Check validity of resolved slot when searching memslots
include/linux/kvm_host.h
tpm/tpm_tis: Free IRQ if probing fails
* ALSA: usb-audio: Filter out unsupported sample rates on Focusrite devices
sound/usb/format.c
* ALSA: usb-audio: Fix usb audio refcnt leak when getting spdif
sound/usb/mixer_quirks.c
ALSA: usx2y: Fix potential NULL dereference
* vmalloc: fix remap_vmalloc_range() bounds checks
include/linux/vmalloc.h
mm/vmalloc.c
* overflow.h: Add arithmetic shift helper
include/linux/overflow.h
* USB: hub: Fix handling of connect changes during sleep
drivers/usb/core/hub.c
* USB: core: Fix free-while-in-use bug in the USB S-Glibrary
drivers/usb/core/message.c
* USB: Add USB_QUIRK_DELAY_CTRL_MSG and USB_QUIRK_DELAY_INIT for Corsair K70 RGB RAPIDFIRE
drivers/usb/core/quirks.c
USB: sisusbvga: Change port variable from signed to unsigned
* fs/namespace.c: fix mountpoint reference counter race
fs/namespace.c
iio: xilinx-xadc: Fix sequencer configuration for aux channels in simultaneous mode
iio: xilinx-xadc: Fix clearing interrupt when enabling trigger
iio: xilinx-xadc: Fix ADC-B powerdown
ALSA: hda: Remove ASUS ROG Zenith from the blacklist
* xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish
net/ipv4/xfrm4_output.c
net/ipv6/xfrm6_output.c
net: dsa: b53: Fix ARL register definitions
team: fix hang in team_mode_get()
* tcp: cache line align MAX_TCP_HEADER
include/net/tcp.h
net/x25: Fix x25_neigh refcnt leak when receiving frame
net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node
macvlan: fix null dereference in macvlan_device_event()
macsec: avoid to set wrong mtu
* ipv6: fix restrict IPV6_ADDRFORM operation
net/ipv6/ipv6_sockglue.c
PCI/ASPM: Allow re-enabling Clock PM
pwm: bcm2835: Dynamically allocate base
pwm: renesas-tpu: Fix late Runtime PM enablement
s390/cio: avoid duplicated 'ADD' uevents
ipc/util.c: sysvipc_find_ipc() should increase position index
kernel/gcov/fs.c: gcov_seq_next() should increase position index
ASoC: Intel: atom: Take the drv->lock mutex before calling sst_send_slot_map()
scsi: iscsi: Report unbind session event when the target has been removed
pwm: rcar: Fix late Runtime PM enablement
ceph: don't skip updating wanted caps when cap is stale
ceph: return ceph_mdsc_do_request() errors from __get_parent()
scsi: lpfc: Fix kasan slab-out-of-bounds error in lpfc_unreg_login
* watchdog: reset last_hw_keepalive time at start
drivers/watchdog/watchdog_dev.c
* vti4: removed duplicate log message.
net/ipv4/ip_vti.c
crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static
* drm/msm: Use the correct dma_sync calls harder
drivers/gpu/drm/msm/msm_gem.c
* net: ipv4: avoid unused variable warning for sysctl
net/ipv4/route.c
* net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()
net/ipv4/raw.c
* ext4: fix extent_status fragmentation for plain files
fs/ext4/extents.c
* UPSTREAM: loop: Only freeze block queue when needed.
drivers/block/loop.c
* UPSTREAM: loop: Only change blocksize when needed.
drivers/block/loop.c
* BACKPORT: loop: change queue block size to match when using DIO
drivers/block/loop.c
Merge 4.9.220 into android-4.9-q
Linux 4.9.220
x86/vdso: Fix lsl operand order
x86/microcode/intel: replace sync_core() with native_cpuid_reg(eax)
x86/CPU: Add native CPUID variants returning a single datum
mtd: phram: fix a double free issue in error path
mtd: lpddr: Fix a double free in probe()
locktorture: Print ratio of acquisitions, not failures
tty: evh_bytechan: Fix out of bounds accesses
* fbdev: potential information leak in do_fb_ioctl()
drivers/video/fbdev/core/fbmem.c
iommu/amd: Fix the configuration of GCR3 table root pointer
libnvdimm: Out of bounds read in __nd_ioctl()
ext2: fix debug reference to ext2_xattr_cache
ext2: fix empty body warnings when -Wextra is used
NFS: Fix memory leaks in nfs_pageio_stop_mirroring()
KVM: s390: vsie: Fix possible race when shadowing region 3 tables
* compiler.h: fix error in BUILD_BUG_ON() reporting
include/linux/compiler.h
* percpu_counter: fix a data race at vm_committed_as
include/linux/percpu_counter.h
* ext4: do not commit super on read-only bdev
fs/ext4/super.c
powerpc/maple: Fix declaration made after definition
s390/cpuinfo: fix wrong output when CPU0 is offline
NFS: direct.c: Fix memory leak of dreq when nfs_get_lock_context fails
clk: tegra: Fix Tegra PMC clock out parents
power: supply: bq27xxx_battery: Silence deferred-probe error
clk: at91: usb: continue if clk_hw_round_rate() return zero
of: unittest: kmemleak in of_unittest_platform_populate()
* arm64: cpu_errata: include required headers
arch/arm64/kernel/cpu_errata.c
* of: fix missing kobject init for !SYSFS && OF_DYNAMIC config
drivers/of/base.c
soc: qcom: smem: Use le32_to_cpu for comparison
wil6210: fix length check in __wmi_send
rtc: pm8xxx: Fix issue in RTC write path
wil6210: rate limit wil_rx_refill error
* scsi: ufs: ufs-qcom: remove broken hci version quirk
drivers/scsi/ufs/ufs-qcom.c
* scsi: ufs: make sure all interrupts are processed
drivers/scsi/ufs/ufshcd.c
wil6210: fix temperature debugfs
wil6210: increase firmware ready timeout
* Revert "gpio: set up initial state from .get_direction()"
drivers/gpio/gpiolib.c
* drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
drivers/gpu/drm/drm_dp_mst_topology.c
video: fbdev: sis: Remove unnecessary parentheses and commented code
ALSA: hda: Don't release card at firmware loading error
* scsi: sg: add sg_remove_request in sg_common_write
drivers/scsi/sg.c
objtool: Fix switch table detection in .text.unlikely
* tracing: Fix the race between registering 'snapshot' event trigger and triggering 'snapshot' operation
kernel/trace/trace_events_trigger.c
scsi: target: fix hang when multiple threads try to destroy the same iscsi session
scsi: target: remove boilerplate code
kvm: x86: Host feature SSBD doesn't imply guest feature SPEC_CTRL_SSBD
dm flakey: check for null arg_name in parse_features()
* ext4: do not zeroout extents beyond i_disksize
fs/ext4/extents.c
mac80211_hwsim: Use kstrndup() in place of kasprintf()
btrfs: check commit root generation in should_ignore_root
* ALSA: usb-audio: Don't override ignore_ctl_error value from the map
sound/usb/mixer.c
ASoC: Intel: mrfld: return error codes when an error occurs
ASoC: Intel: mrfld: fix incorrect check on p->sink
* ext4: fix incorrect inodes per group in error message
fs/ext4/super.c
* ext4: fix incorrect group count in ext4_fill_super error message
fs/ext4/super.c
* jbd2: improve comments about freeing data buffers whose page mapping is NULL
fs/jbd2/commit.c
* scsi: ufs: Fix ufshcd_hold() caused scheduling while atomic
drivers/scsi/ufs/ufshcd.c
* net: ipv6: do not consider routes via gateways for anycast address check
include/net/ip6_route.h
net: qrtr: send msgs from local of same id as broadcast
* net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
net/ipv4/devinet.c
hsr: check protocol version in hsr_newlink()
mfd: dln2: Fix sanity checking for endpoints
misc: echo: Remove unnecessary parentheses and simplify check for zero
powerpc/fsl_booke: Avoid creating duplicate tlb1 entry
ipmi: fix hung processes in __get_guid()
* drm: Remove PageReserved manipulation from drm_pci_alloc
drivers/gpu/drm/drm_pci.c
* drm/dp_mst: Fix clearing payload state on topology disable
drivers/gpu/drm/drm_dp_mst_topology.c
Btrfs: fix crash during unmount due to race with delayed inode workers
powerpc/64/tm: Don't let userspace set regs->trap via sigreturn
libata: Return correct status in sata_pmp_eh_recover_pm() when ATA_DFLAG_DETACH is set
hfsplus: fix crash and filesystem corruption when deleting files
cpufreq: powernv: Fix use-after-free
* kmod: make request_module() return an error when autoloading is disabled
kernel/kmod.c
Input: i8042 - add Acer Aspire 5738z to nomux list
s390/diag: fix display of diagnose call statistics
ocfs2: no need try to truncate file beyond i_size
* ext4: fix a data race at inode->i_blocks
fs/ext4/inode.c
rtc: omap: Use define directive for PIN_CONFIG_ACTIVE_HIGH
* arm64: armv8_deprecated: Fix undef_hook mask for thumb setend
arch/arm64/kernel/armv8_deprecated.c
scsi: zfcp: fix missing erp_lock in port recovery trigger for point-to-point
* dm verity fec: fix memory leak in verity_fec_dtr
drivers/md/dm-verity-fec.c
* mm: Use fixed constant in page_frag_alloc instead of size + 1
mm/page_alloc.c
tools: gpio: Fix out-of-tree build regression
* x86/speculation: Remove redundant arch_smt_update() invocation
kernel/cpu.c
ALSA: hda: Initialize power_state field properly
crypto: mxs-dcp - fix scatterlist linearization for hash
btrfs: drop block from cache on error in relocation
KVM: VMX: fix crash cleanup when KVM wasn't used
KVM: VMX: Always VMCLEAR in-use VMCSes during crash with kexec support
KVM: x86: Allocate new rmap and large page tracking when moving memslot
KVM: s390: vsie: Fix delivery of addressing exceptions
KVM: s390: vsie: Fix region 1 ASCE sanity shadow address checks
x86/entry/32: Add missing ASM_CLAC to general_protection entry
* signal: Extend exec_id to 64bits
fs/exec.c
include/linux/sched.h
kernel/signal.c
ath9k: Handle txpower changes even when TPC is disabled
MIPS: OCTEON: irq: Fix potential NULL pointer dereference
irqchip/versatile-fpga: Apply clear-mask earlier
* KEYS: reaching the keys quotas correctly
security/keys/key.c
security/keys/keyctl.c
* thermal: devfreq_cooling: inline all stubs for CONFIG_DEVFREQ_THERMAL=n
include/linux/devfreq_cooling.h
acpi/x86: ignore unspecified bit positions in the ACPI global lock field
media: ti-vpe: cal: fix disable_irqs to only the intended target
ALSA: pcm: oss: Fix regression by buffer overflow fix
ALSA: ice1724: Fix invalid access for enumerated ctl items
ALSA: hda: Fix potential access overflow in beep helper
ALSA: hda: Add driver blacklist
* ALSA: usb-audio: Add mixer workaround for TRX40 and co
sound/usb/mixer_maps.c
* usb: gadget: composite: Inform controller driver of self-powered
drivers/usb/gadget/composite.c
* usb: gadget: f_fs: Fix use after free issue as part of queue failure
drivers/usb/gadget/function/f_fs.c
ASoC: topology: use name_prefix for new kcontrol
* ASoC: dpcm: allow start or stop during pause for backend
sound/soc/soc-pcm.c
* ASoC: dapm: connect virtual mux with default value
sound/soc/soc-dapm.c
* ASoC: fix regwmask
sound/soc/soc-ops.c
misc: rtsx: set correct pcr_ops for rts522A
btrfs: track reloc roots based on their commit root bytenr
btrfs: remove a BUG_ON() from merge_reloc_roots()
locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps()
x86/boot: Use unsigned comparison for addresses
gfs2: Don't demote a glock until its revokes are written
libata: Remove extra scsi_host_put() in ata_scsi_add_hosts()
selftests/x86/ptrace_syscall_32: Fix no-vDSO segfault
* sched: Avoid scale real weight down to zero
kernel/sched/sched.h
irqchip/versatile-fpga: Handle chained IRQs properly
i2c: st: fix missing struct parameter description
qlcnic: Fix bad kzalloc null test
net: vxge: fix wrong __VA_ARGS__ usage
bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
Change-Id: I8e3db9ae637c39f066fe40e5fd6c38be92390f19
Signed-off-by: lucaswei <lucaswei@google.com>
82 lines
2.6 KiB
C
82 lines
2.6 KiB
C
/*
|
|
* devfreq_cooling: Thermal cooling device implementation for devices using
|
|
* devfreq
|
|
*
|
|
* Copyright (C) 2014-2015 ARM Limited
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
|
|
* kind, whether express or implied; without even the implied warranty
|
|
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef __DEVFREQ_COOLING_H__
|
|
#define __DEVFREQ_COOLING_H__
|
|
|
|
#include <linux/devfreq.h>
|
|
#include <linux/thermal.h>
|
|
|
|
/**
|
|
* struct devfreq_cooling_power - Devfreq cooling power ops
|
|
* @get_static_power: Take voltage, in mV, and return the static power
|
|
* in mW. If NULL, the static power is assumed
|
|
* to be 0.
|
|
* @get_dynamic_power: Take voltage, in mV, and frequency, in HZ, and
|
|
* return the dynamic power draw in mW. If NULL,
|
|
* a simple power model is used.
|
|
* @dyn_power_coeff: Coefficient for the simple dynamic power model in
|
|
* mW/(MHz mV mV).
|
|
* If get_dynamic_power() is NULL, then the
|
|
* dynamic power is calculated as
|
|
* @dyn_power_coeff * frequency * voltage^2
|
|
*/
|
|
struct devfreq_cooling_power {
|
|
unsigned long (*get_static_power)(unsigned long voltage);
|
|
unsigned long (*get_dynamic_power)(unsigned long freq,
|
|
unsigned long voltage);
|
|
unsigned long dyn_power_coeff;
|
|
};
|
|
|
|
#ifdef CONFIG_DEVFREQ_THERMAL
|
|
|
|
struct thermal_cooling_device *
|
|
of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
|
|
struct devfreq_cooling_power *dfc_power);
|
|
struct thermal_cooling_device *
|
|
of_devfreq_cooling_register(struct device_node *np, struct devfreq *df);
|
|
struct thermal_cooling_device *devfreq_cooling_register(struct devfreq *df);
|
|
void devfreq_cooling_unregister(struct thermal_cooling_device *dfc);
|
|
|
|
#else /* !CONFIG_DEVFREQ_THERMAL */
|
|
|
|
static inline struct thermal_cooling_device *
|
|
of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
|
|
struct devfreq_cooling_power *dfc_power)
|
|
{
|
|
return ERR_PTR(-EINVAL);
|
|
}
|
|
|
|
static inline struct thermal_cooling_device *
|
|
of_devfreq_cooling_register(struct device_node *np, struct devfreq *df)
|
|
{
|
|
return ERR_PTR(-EINVAL);
|
|
}
|
|
|
|
static inline struct thermal_cooling_device *
|
|
devfreq_cooling_register(struct devfreq *df)
|
|
{
|
|
return ERR_PTR(-EINVAL);
|
|
}
|
|
|
|
static inline void
|
|
devfreq_cooling_unregister(struct thermal_cooling_device *dfc)
|
|
{
|
|
}
|
|
|
|
#endif /* CONFIG_DEVFREQ_THERMAL */
|
|
#endif /* __DEVFREQ_COOLING_H__ */
|