Sheng Li [Thu, 24 Mar 2016 11:08:04 +0000 (19:08 +0800)]
net: hns: optimizate irq proccess for HNS V2
In hns V1, common_poll should check and clean fbd pkts, because it
can not pend irq to clean them if there is no new pkt comes in.
But hns V2 hw fixes this bug, and will pend irq itself to do this.
So, for hns V2, we set ring_data->fini_process to NULL.
Signed-off-by: Sheng Li <lisheng011@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Qianqian Xie [Thu, 24 Mar 2016 11:08:03 +0000 (19:08 +0800)]
net: hns: remove useless variable assignment and comment
The variable head in hns_nic_tx_fini_pro has read a value, but it is
obviously no use. The patch will fix it.
And the comment is nothing to do with the routine, so it has to be removed
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Qianqian Xie [Thu, 24 Mar 2016 11:08:02 +0000 (19:08 +0800)]
net: hns: bug fix for return values
The return values in the first two functions mdiobus_write()
are ignored. The patch will fix it.
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Qianqian Xie [Thu, 24 Mar 2016 11:08:01 +0000 (19:08 +0800)]
net: hns: optimizate fmt of snprintf()
It misses string format in function snprintf(), as below:
snprintf(buff, ETH_GSTRING_LEN, g_gmac_stats_string[i].desc);
It needs to add "%s" to fix it as below:
snprintf(buff, ETH_GSTRING_LEN, "%s", g_gmac_stats_string[i].desc);
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Kejian Yan <yankejian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Qianqian Xie [Thu, 24 Mar 2016 11:08:00 +0000 (19:08 +0800)]
net: hns: fix a bug for cycle index
The cycle index should be varied while the variable j is a fixed value.
The patch will fix this bug.
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
xfrm: Fix crash observed during device unregistration and decryption
A crash is observed when a decrypted packet is processed in receive
path. get_rps_cpus() tries to dereference the skb->dev fields but it
appears that the device is freed from the poison pattern.
-013|get_rps_cpu(
| dev = 0xFFFFFFC08B688000,
| skb = 0xFFFFFFC0C76AAC00 -> (
| dev = 0xFFFFFFC08B688000 -> (
| name =
"......................................................
| name_hlist = (next = 0xAAAAAAAAAAAAAAAA, pprev =
0xAAAAAAAAAAA
Following are the sequence of events observed -
- Encrypted packet in receive path from netdevice is queued
- Encrypted packet queued for decryption (asynchronous)
- Netdevice brought down and freed
- Packet is decrypted and returned through callback in esp_input_done
- Packet is queued again for process in network stack using netif_rx
Since the device appears to have been freed, the dereference of
skb->dev in get_rps_cpus() leads to an unhandled page fault
exception.
Fix this by holding on to device reference when queueing packets
asynchronously and releasing the reference on call back return.
v2: Make the change generic to xfrm as mentioned by Steffen and
update the title to xfrm
Suggested-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Jerome Stanislaus <jeromes@codeaurora.org> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Thu, 24 Mar 2016 17:52:25 +0000 (10:52 -0700)]
Merge tag 'trace-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt:
"Nothing major this round. Mostly small clean ups and fixes.
Some visible changes:
- A new flag was added to distinguish traces done in NMI context.
- Preempt tracer now shows functions where preemption is disabled but
interrupts are still enabled.
Other notes:
- Updates were done to function tracing to allow better performance
with perf.
- Infrastructure code has been added to allow for a new histogram
feature for recording live trace event histograms that can be
configured by simple user commands. The feature itself was just
finished, but needs a round in linux-next before being pulled.
This only includes some infrastructure changes that will be needed"
* tag 'trace-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (22 commits)
tracing: Record and show NMI state
tracing: Fix trace_printk() to print when not using bprintk()
tracing: Remove redundant reset per-CPU buff in irqsoff tracer
x86: ftrace: Fix the misleading comment for arch/x86/kernel/ftrace.c
tracing: Fix crash from reading trace_pipe with sendfile
tracing: Have preempt(irqs)off trace preempt disabled functions
tracing: Fix return while holding a lock in register_tracer()
ftrace: Use kasprintf() in ftrace_profile_tracefs()
ftrace: Update dynamic ftrace calls only if necessary
ftrace: Make ftrace_hash_rec_enable return update bool
tracing: Fix typoes in code comment and printk in trace_nop.c
tracing, writeback: Replace cgroup path to cgroup ino
tracing: Use flags instead of bool in trigger structure
tracing: Add an unreg_all() callback to trigger commands
tracing: Add needs_rec flag to event triggers
tracing: Add a per-event-trigger 'paused' field
tracing: Add get_syscall_name()
tracing: Add event record param to trigger_ops.func()
tracing: Make event trigger functions available
tracing: Make ftrace_event_field checking functions available
...
Linus Torvalds [Thu, 24 Mar 2016 17:45:59 +0000 (10:45 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal updates from Zhang Rui:
- Fix a regression where bogus trip points on some Lenovo laptops start
to screw up thermal control after commit 81ad4276b505 ("Thermal:
initialize thermal zone device correctly").
On these Lenovo laptops, a bogus passive trip point is reported,
which is 0 degree Celsius. Without commit 81ad4276b505, thermal zone
fails to set cooling devices to proper cooling state, which is a bug.
But with commit 81ad4276b505 applied, the processors are always
throttled on these Lenovo laptops because the current temperature is
always higher than the passive trip point.
Fix things to ignore such bogus trip points. (Zhang Rui)
- Introduce devm_ versions of OF thermal sensor register API. (Laxman
Dewangan)
- Changes in Kconfigs to allow compile test on UM arch. (Krzysztof
Kozlowski)
- Introduce Skylake support in intel_pch_thermal driver. (Srinivas
Pandruvada)
- Several small fixes on Rockchip, TI-SoC, Tegra, RCar, and Exynos
thermal drivers.
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (26 commits)
Thermal: Ignore invalid trip points
thermal: trace: migrating thermal traces to use TRACE_DEFINE_ENUM() macros
thermal: intel_pch_thermal: Enable Skylake PCH thermal
thermal: doc: Add details of devm_thermal_zone_of_sensor_{register,unregister}
thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register
thermal: doc: Add details of thermal_zone_of_sensor_{register,unregister}
thermal: exynos: Defer probe if vtmu is present but not registered
thermal: exynos: Use devm_regulator_get_optional() for vtmu
thermal: exynos: List vtmu-supply as optional property in DT binding
thermal: exynos: Print a message about exceeded number of supported trip-points
thermal: exynos: Document number of supported trip-points
thermal: exynos: Document compatible for Exynos5433 TMU
thermal: mtk: allow compile testing on UM
thermal: tegra_soctherm: fix sign bit of temperature
thermal: Fix build error of missing devm_ioremap_resource on UM
thermal: ti-soc-thermal: clean up the error handling a bit
thermal: rcar: Use ARCH_RENESAS
thermal: rcar_thermal: don't open code of_device_get_match_data()
thermal: db8500_cpufreq_cooling: Compile with COMPILE_TEST
thermal: rockchip: fix the tsadc sequence output on rk3228/rk3399
...
Linus Torvalds [Thu, 24 Mar 2016 17:41:00 +0000 (10:41 -0700)]
Merge tag 'nfsd-4.6' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Various bugfixes, a RDMA update from Chuck Lever, and support for a
new pnfs layout type from Christoph Hellwig. The new layout type is a
variant of the block layout which uses SCSI features to offer improved
fencing and device identification.
(Also: note this pull request also includes the client side of SCSI
layout, with Trond's permission.)"
* tag 'nfsd-4.6' of git://linux-nfs.org/~bfields/linux:
sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race
nfsd: recover: fix memory leak
nfsd: fix deadlock secinfo+readdir compound
nfsd4: resfh unused in nfsd4_secinfo
svcrdma: Use new CQ API for RPC-over-RDMA server send CQs
svcrdma: Use new CQ API for RPC-over-RDMA server receive CQs
svcrdma: Remove close_out exit path
svcrdma: Hook up the logic to return ERR_CHUNK
svcrdma: Use correct XID in error replies
svcrdma: Make RDMA_ERROR messages work
rpcrdma: Add RPCRDMA_HDRLEN_ERR
svcrdma: svc_rdma_post_recv() should close connection on error
svcrdma: Close connection when a send error occurs
nfsd: Lower NFSv4.1 callback message size limit
svcrdma: Do not send Write chunk XDR pad with inline content
svcrdma: Do not write xdr_buf::tail in a Write chunk
svcrdma: Find client-provided write and reply chunks once per reply
nfsd: Update NFS server comments related to RDMA support
nfsd: Fix a memory leak when meeting unsupported state_protect_how4
nfsd4: fix bad bounds checking
Linus Torvalds [Thu, 24 Mar 2016 17:36:16 +0000 (10:36 -0700)]
Merge tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are some fixes that poped up due to the big staging tree merge,
as well as the removal of a staging driver that now is covered by a
"real" driver.
All of these have been in linux-next for a few days with no reported
issues"
* tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: delete STE RMI4 hackish driver
staging: android: ion_test: fix check of platform_device_register_simple() error code
staging: wilc1000: fix a couple of memory leaks
staging: fsl-mc: fix incorrect type passed to dev_err macros
staging: fsl-mc: fix incorrect type passed to dev_dbg macros
staging: wilc1000: fixed kernel panic when firmware is not started
staging: comedi: ni_mio_common: fix the ni_write[blw]() functions
staging: most: hdm-dim2: Remove possible dereference error
staging: lustre: checking for NULL instead of IS_ERR
staging: lustre: really make lustre dependent on LNet
staging: refresh TODO for rtl8712
staging: refresh TODO for rtl8723au
Linus Torvalds [Thu, 24 Mar 2016 17:32:42 +0000 (10:32 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Thomas Gleixner:
"A single fix to the pistachio clocksource driver using the proper
signedness in the error print format"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/pistachio: Correct output format of PTR_ERR()
Linus Torvalds [Thu, 24 Mar 2016 17:29:44 +0000 (10:29 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
"A small set of fixes for the usual ARM/SOC irqchip drivers
- A set of fixes for mbigen to handle multiple devices in a hardware
module proper
- A cleanup for the mbigen config option which was pointlessly user
configurable.
- A cleanup for tegra replacing open coded functionality by the
proper core function
The config cleanup touches arch/arm64/Kconfig.platforms to select the
irq chip for the related platform"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/mbigen: Make CONFIG_HISILICON_IRQ_MBIGEN a hidden option
ARM64: Kconfig: Select mbigen interrupt controller on Hisilicon platform
irqchip/mbigen: Handle multiple device nodes in a mbigen module
irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module
irqchip/tegra: Switch to use irq_domain_free_irqs_common
Linus Torvalds [Thu, 24 Mar 2016 17:02:14 +0000 (10:02 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"This tree contains various perf fixes on the kernel side, plus three
hw/event-enablement late additions:
- Intel Memory Bandwidth Monitoring events and handling
- the AMD Accumulated Power Mechanism reporting facility
- more IOMMU events
... and a final round of perf tooling updates/fixes"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits)
perf llvm: Use strerror_r instead of the thread unsafe strerror one
perf llvm: Use realpath to canonicalize paths
perf tools: Unexport some methods unused outside strbuf.c
perf probe: No need to use formatting strbuf method
perf help: Use asprintf instead of adhoc equivalents
perf tools: Remove unused perf_pathdup, xstrdup functions
perf tools: Do not include stringify.h from the kernel sources
tools include: Copy linux/stringify.h from the kernel
tools lib traceevent: Remove redundant CPU output
perf tools: Remove needless 'extern' from function prototypes
perf tools: Simplify die() mechanism
perf tools: Remove unused DIE_IF macro
perf script: Remove lots of unused arguments
perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve
perf machine: Rename perf_event__preprocess_sample to machine__resolve
perf tools: Add cpumode to struct perf_sample
perf tests: Forward the perf_sample in the dwarf unwind test
perf tools: Remove misplaced __maybe_unused
perf list: Fix documentation of :ppp
perf bench numa: Fix assertion for nodes bitfield
...
Linus Torvalds [Thu, 24 Mar 2016 16:42:50 +0000 (09:42 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar:
"Misc fixes: a cgroup fix, a fair-scheduler migration accounting fix, a
cputime fix and two cpuacct cleanups"
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/cpuacct: Simplify the cpuacct code
sched/cpuacct: Rename parameter in cpuusage_write() for readability
sched/fair: Add comments to explain select_idle_sibling()
sched/fair: Fix fairness issue on migration
sched/cgroup: Fix/cleanup cgroup teardown/init
sched/cputime: Fix steal time accounting vs. CPU hotplug
Linus Torvalds [Thu, 24 Mar 2016 16:36:18 +0000 (09:36 -0700)]
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Ingo Molnar:
"Documentation updates and a bitops ordering fix"
* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
bitops: Do not default to __clear_bit() for __clear_bit_unlock()
documentation: Clarify compiler store-fusion example
documentation: Transitivity is not cumulativity
documentation: Add alternative release-acquire outcome
documentation: Distinguish between local and global transitivity
documentation: Subsequent writes ordered by rcu_dereference()
documentation: Remove obsolete reference to RCU-protected indexes
documentation: Fix memory-barriers.txt section references
documentation: Fix control dependency and identical stores
- Remove redundant CPU output in libtraceevent (Steven Rostedt)
- Remove 'core_id' check in topology 'perf test' (Sukadev Bhattiprolu)
Infrastructure changes/fixes:
- Record text offset in dso to calculate objdump address, to use with
modules in addition to vDSO symbol address calculations (Wang Nan)
- Move utilities.mak from perf to tools/scripts/ (Arnaldo Carvalho de Melo)
- Add cpumode to the perf_sample struct, this way we don't need to pass
the union event to the machine and thread resolving routines, shortening
function signatures and allowing the future introduction of a way
to use tracepoint events instead of the unavailable HW cycles counter on
powerpc guests in perf kvm by just hooking on perf_evsel__parse_sample,
at the end (Arnaldo Carvalho de Melo)
- Remove/unexport die() related infrastructure, that at some point will
finally be removed (Arnaldo Carvalho de Melo)
- Adopt linux/stringify.h from the kernel sources, not to touch this
kernel header from tools/ (Arnaldo Carvalho de Melo)
- Stop using strbuf for things we can instead trivially use libc's asprintf()
(Arnaldo Carvalho de Melo)
- Ditch tools/lib/util/abspath.c, its only exported function was used at just
one place and can be replaced by libc's realpath() (Arnaldo Carvalho de Melo)
- Use strerror_r() in the llvm infrastructure, tread safe, its what is used
elsewhere in tools/perf/ (Arnaldo Carvalho de Melo)
Cleanups:
- Removed misplaced or needless __maybe_unused/export (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Pull networking bugfixes from David Miller:
"Several bug fixes rolling in, some for changes introduced in this
merge window, and some for problems that have existed for some time:
1) Fix prepare_to_wait() handling in AF_VSOCK, from Claudio Imbrenda.
2) The new DST_CACHE should be a silent config option, from Dave
Jones.
3) inet_current_timestamp() unintentionally truncates timestamps to
16-bit, from Deepa Dinamani.
4) Missing reference to netns in ppp, from Guillaume Nault.
5) Free memory reference in hv_netvsc driver, from Haiyang Zhang.
6) Missing kernel doc documentation for function arguments in various
spots around the networking, from Luis de Bethencourt.
7) UDP stopped receiving broadcast packets properly, due to
overzealous multicast checks, fix from Paolo Abeni"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits)
net: ping: make ping_v6_sendmsg static
hv_netvsc: Fix the order of num_sc_offered decrement
net: Fix typos and whitespace.
hv_netvsc: Fix the array sizes to be max supported channels
hv_netvsc: Fix accessing freed memory in netvsc_change_mtu()
ppp: take reference on channels netns
net: Reset encap_level to avoid resetting features on inner IP headers
net: mediatek: fix checking for NULL instead of IS_ERR() in .probe
net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY
at803x: fix reset handling
AF_VSOCK: Shrink the area influenced by prepare_to_wait
Revert "vsock: Fix blocking ops call in prepare_to_wait"
macb: fix PHY reset
ipv4: initialize flowi4_flags before calling fib_lookup()
fsl/fman: Workaround for Errata A-007273
ipv4: fix broadcast packets reception
net: hns: bug fix about the overflow of mss
net: hns: adds limitation for debug port mtu
net: hns: fix the bug about mtu setting
net: hns: fixes a bug of RSS
...
Haiyang Zhang [Wed, 23 Mar 2016 21:54:48 +0000 (14:54 -0700)]
hv_netvsc: Fix the order of num_sc_offered decrement
Reorder the code in netvsc_sc_open(), so num_sc_offered is only decremented
after vmbus_open() is called. This avoid pontential race of removing device
before all channels are setup.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Thu, 24 Mar 2016 00:20:59 +0000 (17:20 -0700)]
Merge tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
Pull x86 platform driver updates from Darren Hart:
"Significant refactoring of Dell laptop drivers, modularizing the
smbios code. Multiple new platforms added for ideapad, asus, dell,
and alienware using existing quirks. A few fixes and cleanups.
hp-wmi:
- Remove GPS rfkill support via pre-2009 interface
- fix unregister order in hp_wmi_rfkill_setup() once again
ideapad-laptop:
- Add ideapad Y700 (15) to the no_hw_rfkill DMI list
fujitsu-laptop:
- Support radio toggle button
intel-hid:
- allocate correct amount of memory for private struct
platform/x86:
- Make intel_scu_ipc explicitly non-modular
intel_pmc_ipc:
- Avoid pending IPC1 command during legacy suspend
- Fix GCR register base address and length
asus-nb-wmi:
- add wapf=4 quirk for ASUS X75VD
intel_telemetry_pltdrv:
- Change verbosity control bits
dell-rbtn:
- Add a comment about the XPS 13 9350
dell-wmi, dell-laptop:
- depends DMI
dell-wmi:
- support Dell Inspiron M5110
- properly process Dell Instant Launch hotkey
- enable receiving WMI events on Dell Vostro V131
- Support new hotkeys on the XPS 13 9350 (Skylake)
- Clean up hotkey table size check
- Stop storing pointers to DMI tables
dell-laptop:
- move dell_smi_error() to dell-smbios
- use dell_smbios_find_token() instead of find_token_location()
- use dell_smbios_find_token() instead of find_token_id()
- extract SMBIOS-related code to a separate module
dell-smbios:
- rename dell_smi_error() to dell_smbios_error()
- make da_tokens static
- remove find_token_{id,location}()
- implement new function for finding DMI table 0xDA tokens
- make the SMBIOS buffer static
- return the SMBIOS buffer from dell_smbios_get_buffer()
- don't return an SMBIOS buffer from dell_smbios_send_request()
- don't pass an SMBIOS buffer to dell_smbios_send_request()
- rename dell_send_request() to dell_smbios_send_request()
- rename release_buffer() to dell_smbios_release_buffer()
- rename clear_buffer() to dell_smbios_clear_buffer()
- rename get_buffer() to dell_smbios_get_buffer()
dell-led:
- use dell_smbios_send_request() for performing SMBIOS calls
- use dell_smbios_find_token() for finding mic DMI tokens
toshiba_acpi:
- Add a module parameter to disable hotkeys registration
- Add sysfs entries for the Cooling Method feature
- Add support for cooling method feature
thinkpad_acpi:
- Remove ambiguous logging for "Unsupported brightness interface"
alienware-wmi:
- whitespace improvements
- Add support for two new systems: ASM200 and ASM201.
- Add support for deep sleep control.
- Add initial support for alienware graphics amplifier.
- Add support for new platform: X51-R3
- Clean up whitespace for ASM100 platform"
* tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (47 commits)
hp-wmi: Remove GPS rfkill support via pre-2009 interface
hp-wmi: fix unregister order in hp_wmi_rfkill_setup() once again
dell-wmi: support Dell Inspiron M5110
dell-wmi: properly process Dell Instant Launch hotkey
dell-wmi: enable receiving WMI events on Dell Vostro V131
dell-smbios: rename dell_smi_error() to dell_smbios_error()
dell-laptop: move dell_smi_error() to dell-smbios
ideapad-laptop: Add ideapad Y700 (15) to the no_hw_rfkill DMI list
fujitsu-laptop: Support radio toggle button
intel-hid: allocate correct amount of memory for private struct
platform/x86: Make intel_scu_ipc explicitly non-modular
intel_pmc_ipc: Avoid pending IPC1 command during legacy suspend
intel_pmc_ipc: Fix GCR register base address and length
asus-nb-wmi: add wapf=4 quirk for ASUS X75VD
intel_telemetry_pltdrv: Change verbosity control bits
dell-rbtn: Add a comment about the XPS 13 9350
dell-wmi: Support new hotkeys on the XPS 13 9350 (Skylake)
dell-wmi: Clean up hotkey table size check
dell-wmi, dell-laptop: depends DMI
dell-wmi: Stop storing pointers to DMI tables
...
Linus Torvalds [Thu, 24 Mar 2016 00:14:09 +0000 (17:14 -0700)]
Merge tag 'pwm/for-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm updates from Thierry Reding:
"No new drivers this time around, but a handful of cleanups and fixes"
* tag 'pwm/for-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
pwm: omap-dmtimer: Add debug message for effective period and duty cycle
pwm: omap-dmtimer: Round load and match values rather than truncate
pwm: omap-dmtimer: Add sanity checking for load and match values
pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations
pwm: brcmstb: Fix check of devm_ioremap_resource() return code
pwm: rcar: Depend on ARCH_RENESAS instead of ARCH_SHMOBILE
pwm: lpc18xx-sct: Test clock rate to avoid division by 0
pwm: img: Test clock rate to avoid division by 0
Linus Torvalds [Wed, 23 Mar 2016 22:57:39 +0000 (15:57 -0700)]
Merge branch 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull more SCSI target updates from Nicholas Bellinger:
"This series contains cxgb4 driver prerequisites for supporting iscsi
segmentation offload (ISO), that will be utilized for a number of
future v4.7 developments in iscsi-target for supporting generic hw
offloads"
* 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
cxgb4: update Kconfig and Makefile
cxgb4: add iSCSI DDP page pod manager
cxgb4, iw_cxgb4: move delayed ack macro definitions
cxgb4: move VLAN_NONE macro definition
cxgb4: update struct cxgb4_lld_info definition
cxgb4: add definitions for iSCSI target ULD
cxgb4, cxgb4i: move struct cpl_rx_data_ddp definition
cxgb4, iw_cxgb4, cxgb4i: remove duplicate definitions
cxgb4, iw_cxgb4: move definitions to common header file
cxgb4: large receive offload support
cxgb4: allocate resources for CXGB4_ULD_ISCSIT
cxgb4: add new ULD type CXGB4_ULD_ISCSIT
perf llvm: Use strerror_r instead of the thread unsafe strerror one
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-5njrq9dltckgm624omw9ljgu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
To kill the last user of make_nonrelative_path(), that gets ditched,
one more panicking function killed.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-3hu56rvyh4q5gxogovb6ko8a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf tools: Unexport some methods unused outside strbuf.c
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-nq1wvtky4mpu0nupjyar7sbw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf probe: No need to use formatting strbuf method
We have addch() for chars, add() for fixed size data, and addstr() for
variable length strings, use them.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-0ap02fn2xtvpduj2j6b2o1j4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf help: Use asprintf instead of adhoc equivalents
That doesn't chekcs malloc return and that, when using strbuf, if it
can't grow, just explodes away via die().
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-vr8qsjbwub7e892hpa9msz95@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Haiyang Zhang [Wed, 23 Mar 2016 16:43:10 +0000 (09:43 -0700)]
hv_netvsc: Fix the array sizes to be max supported channels
The VRSS_CHANNEL_MAX is the max number of channels supported by Hyper-V
hosts. We use it for the related array sizes instead of using NR_CPUS,
which may be set to several thousands.
This patch reduces possible memory allocation failures.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Haiyang Zhang [Wed, 23 Mar 2016 16:43:09 +0000 (09:43 -0700)]
hv_netvsc: Fix accessing freed memory in netvsc_change_mtu()
struct netvsc_device is freed in rndis_filter_device_remove(). So we save
the nvdev->num_chn into a temp variable for later usage.
(Please also include this patch into stable branch.)
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Guillaume Nault [Wed, 23 Mar 2016 15:38:55 +0000 (16:38 +0100)]
ppp: take reference on channels netns
Let channels hold a reference on their network namespace.
Some channel types, like ppp_async and ppp_synctty, can have their
userspace controller running in a different namespace. Therefore they
can't rely on them to preclude their netns from being removed from
under them.
==================================================================
BUG: KASAN: use-after-free in ppp_unregister_channel+0x372/0x3a0 at
addr ffff880064e217e0
Read of size 8 by task syz-executor/11581
=============================================================================
BUG net_namespace (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-s87zi5d03m6rz622y1z6rlsa@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf tools: Do not include stringify.h from the kernel sources
Use instead the copy just made to tools/include/linux/.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-q736w12nwy98x5ox2hamp5ow@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Alexander Duyck [Tue, 22 Mar 2016 23:18:07 +0000 (16:18 -0700)]
net: Reset encap_level to avoid resetting features on inner IP headers
This patch corrects an oversight in which we were allowing the encap_level
value to pass from the outer headers to the inner headers. As a result we
were incorrectly identifying UDP or GRE tunnels as also making use of ipip
or sit when the second header actually represented a tunnel encapsulated in
either a UDP or GRE tunnel which already had the features masked.
Fixes: 76443456227097179c1482 ("net: Move GSO csum into SKB_GSO_CB") Reported-by: Tom Herbert <tom@herbertland.com> Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
tools include: Copy linux/stringify.h from the kernel
There is code in tools/ that is directly including this file from the
kernel, and this is verboten for a while, copy it so that the next csets
can fix this situation.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-e0r3nks2uai020ndghvxv5qw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Steven Rostedt [Wed, 23 Mar 2016 14:16:28 +0000 (10:16 -0400)]
tools lib traceevent: Remove redundant CPU output
Commit a6745330789f ("tools lib traceevent: Split pevent_print_event()
into specific functionality functions") broke apart the function
pevent_print_event() into three functions.
The first function prints the comm, pid and CPU, the second prints the
timestamp.
But that commit added the printing of the CPU in the timestamp function,
which now causes pevent_print_event() to duplicate the CPU output.
Remove the redundant printing of the record's CPU from the timestamp
function.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Namhyung Kim <namhyung@kernel.org> Fixes: a6745330789f ("tools lib traceevent: Split pevent_print_event() into specific functionality functions") Link: http://lkml.kernel.org/r/20160323101628.459375d2@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf tools: Remove needless 'extern' from function prototypes
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-w246stf7ponfamclsai6b9zo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
net: mediatek: fix checking for NULL instead of IS_ERR() in .probe
devm_ioremap_resource() returns ERR_PTR() value on error, it never
returns NULL, fix it and propagate the returned error upwards.
Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet") Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Acked-by: John Crispin <blogic@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Frias [Wed, 23 Mar 2016 10:49:09 +0000 (11:49 +0100)]
net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY
This removes the dependency on GPIOLIB for non faulty PHYs.
Indeed, without this patch, if GPIOLIB is not selected
devm_gpiod_get_optional() will return -ENOSYS and the driver probe
call will fail, regardless of the actual PHY hardware.
Out of the 3 PHYs supported by this driver (AT8030, AT8031, AT8035),
only AT8030 presents the issues that commit 13a56b449325 ("net: phy:
at803x: Add support for hardware reset") attempts to work-around by
using a 'reset' GPIO line.
Hence, only AT8030 should depend on GPIOLIB operating properly.
Fixes: 13a56b449325 ("net: phy: at803x: Add support for hardware reset") Signed-off-by: Sebastian Frias <sf84@laposte.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Sergei Shtylyov [Tue, 22 Mar 2016 21:44:40 +0000 (00:44 +0300)]
at803x: fix reset handling
The driver of course "knows" that the chip's reset signal is active low,
so it drives the GPIO to 0 to reset the PHY and to 1 otherwise; however
all this will only work iff the GPIO is specified as active-high in the
device tree! I think both the driver and the device trees (if there are
any -- I was unable to find them) need to be fixed in this case...
Fixes: 13a56b449325 ("net: phy: at803x: Add support for hardware reset") Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
hp-wmi: Remove GPS rfkill support via pre-2009 interface
GPS rfkill support via pre-2009 WMI interface uses hp_wmi_get_sw_state()
and hp_wmi_get_hw_state() to query its current hard and soft block state,
respectively.
In hp_wmi_get_sw_state() a mask is calculated which bit should be checked
in an int value returned by firmware to get current block state: 0x200 <<
(r * 8) which with r being 3 for GPS results in overflow and mask of zero.
The same goes for hp_wmi_get_hw_state().
This effectively means that GPS rfkill on this WMI interface is considered
always both hard and soft blocked.
Unfortunately, later when rfkill subsystem calls hp_wmi_set_block() to sync
this block to hardware firmware at least on my old nc6400 gets confused and
sets both hard and soft blocks on WiFi and BT.
This happens for example on hp-wmi module load.
Since due to overflow described above it is dubious that this ever worked
correctly and HP laptops with modems having GPS support seem to all have
been released well past year 2009 let's just remove GPS rfkill support via
pre-2009 WMI interface.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
hp-wmi: fix unregister order in hp_wmi_rfkill_setup() once again
rfkill registration order in hp_wmi_rfkill_setup() is:
1) WiFi,
2) BT,
3) WWAN,
5) GPS.
Unregistration when cleaning up on error return should happen in reverse
order.
This means that: If BT rfkill fails to be allocated we possibly need to
first unregister WiFi rfkill before destroying it.
The same goes with (WWAN, BT) and (GPS, WWAN) pairs.
Also, if WWAN rfkill fails to register we need to (possibly) unregister BT
not the GPS one. And if GPS rfkill fails to register we need to unregister
WWAN not the BT one.
We never need to unregister GPS rfkill here since if GPS rfkill
registration succeeds this function returns without error so no cleanup is
necessary.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 4 Mar 2016 13:09:10 +0000 (14:09 +0100)]
dell-wmi: support Dell Inspiron M5110
Similarly to Dell Vostro V131, Dell Inspiron M5110 also requires an
SMBIOS request to be issued in order for WMI events to be generated and
does not raise an i8042 interrupt when the Dell Instant Launch hotkey is
pressed. However, the event code for that hotkey on this machine is
0xe029, so add it to the legacy keymap.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Tested-by: Darek Stojaczyk <darek.stojaczyk@gmail.com> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 4 Mar 2016 13:09:09 +0000 (14:09 +0100)]
dell-wmi: properly process Dell Instant Launch hotkey
On models on which an SMBIOS request needs to be issued in order for WMI
events to be generated, pressing the Dell Instant Launch hotkey does not
raise an i8042 interrupt - only a WMI event is generated (0xe025 on Dell
Vostro V131). As that WMI event is the only way the kernel will be
notified about pressing the Dell Instant Launch hotkey on such machines,
the relevant keymap entry has to be changed to a KE_KEY one. However,
the same WMI event should still be ignored on machines which do not
require an SMBIOS request for enabling WMI, so filter it conditionally
in dell_wmi_process_key().
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 4 Mar 2016 13:09:08 +0000 (14:09 +0100)]
dell-wmi: enable receiving WMI events on Dell Vostro V131
On some laptop models (e.g. Dell Vostro V131), WMI events are not
generated until a specific SMBIOS request is issued to register an event
listener [1]. As there seems to be no ACPI method or SMBIOS request to
determine without possible side effects whether a given machine needs to
issue this SMBIOS request in order to receive WMI events, DMI matching
is used to whitelist the models which need it.
Michał Kępień [Fri, 4 Mar 2016 13:09:07 +0000 (14:09 +0100)]
dell-smbios: rename dell_smi_error() to dell_smbios_error()
As dell_smi_error() is exported by dell-smbios, its prefix should be
consistent with other exported symbols, so change function name to
dell_smbios_error().
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 4 Mar 2016 13:09:06 +0000 (14:09 +0100)]
dell-laptop: move dell_smi_error() to dell-smbios
The dell_smi_error() method could be used by modules other than
dell-laptop for convenient translation of SMBIOS request errors into
errno values. Thus, move it to dell-smbios.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
John Dahlstrom [Sat, 27 Feb 2016 06:09:58 +0000 (00:09 -0600)]
ideapad-laptop: Add ideapad Y700 (15) to the no_hw_rfkill DMI list
Some Lenovo ideapad models lack a physical rfkill switch.
On Lenovo models ideapad Y700 Touch-15ISK and ideapad Y700-15ISK,
ideapad-laptop would wrongly report all radios as blocked by
hardware which caused wireless network connections to fail.
Add these models without an rfkill switch to the no_hw_rfkill list.
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
Since module_pci_driver() uses the same init level priority as
builtin_pci_driver() the init ordering remains unchanged with
this commit.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
We don't replace module.h with init.h since the file already has that.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
intel_telemetry_pltdrv: Change verbosity control bits
Due to a recent fix in the firmware, the Punit verbosity control bits
now adhere to the correct pattern. Hence remove the workaround and
do a read-modify-write of the register.
Signed-off-by: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Andy Lutomirski [Mon, 15 Feb 2016 16:32:37 +0000 (08:32 -0800)]
dell-rbtn: Add a comment about the XPS 13 9350
On the XPS 13 9350, the dell-rbtn mechanism has a new device id, and
the DSDT turns it off if a new enough _OSI is supported. Add a
comment about why we don't bother supporting it.
Signed-off-by: Andy Lutomirski <luto@kernel.org> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Andy Lutomirski [Mon, 15 Feb 2016 16:32:36 +0000 (08:32 -0800)]
dell-wmi: Support new hotkeys on the XPS 13 9350 (Skylake)
The XPS 13 9350 sends WMI keypress events that aren't enumerated in
the DMI table. Add a table listing them. To avoid breaking things
that worked before, these un-enumerated hotkeys won't be used if the
DMI table maps them to something else.
FWIW, it appears that the DMI table may be a legacy thing and we
might want to rethink how we handle events in general. As an
example, a whole lot of things map to KEY_PROG3 via the DMI table.
This doesn't send keypress events for any of the new events. They
appear to all be handled by other means (keyboard illumination is
handled automatically and rfkill is handled by intel-hid).
Signed-off-by: Andy Lutomirski <luto@kernel.org> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Andy Lutomirski [Mon, 15 Feb 2016 16:32:35 +0000 (08:32 -0800)]
dell-wmi: Clean up hotkey table size check
Checking the table for a minimum size of 7 bytes makes no sense: any valid
hotkey table has a size that's a multiple of 4.
Clean this up: replace the hardcoded header length with a sizeof and
change the check to ignore an empty hotkey table. The only behavior
change is that a 7-byte table (which is nonsensical) will now be
treated as absent instead of as valid but empty.
Reported-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Andy Lutomirski <luto@kernel.org> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Andy Lutomirski [Mon, 15 Feb 2016 16:32:34 +0000 (08:32 -0800)]
dell-wmi, dell-laptop: depends DMI
dell-wmi and dell-laptop will compile but won't work right if DMI
isn't selected.
Signed-off-by: Andy Lutomirski <luto@kernel.org> Acked-by: Pali Rohár <pali.rohar@gmail.com>
[arnd: Use depends instead of selects to avoid recursive dependencies]
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Andy Lutomirski [Mon, 15 Feb 2016 16:32:33 +0000 (08:32 -0800)]
dell-wmi: Stop storing pointers to DMI tables
The dmi_walk function maps the DMI table, walks it, and unmaps it.
This means that the dell_bios_hotkey_table that find_hk_type stores
points to unmapped memory by the time it gets read.
I've been able to trigger crashes caused by the stale pointer a
couple of times, but never on a stock kernel.
Fix it by generating the keymap in the dmi_walk callback instead of
storing a pointer.
Signed-off-by: Andy Lutomirski <luto@kernel.org> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:28 +0000 (15:27 +0100)]
dell-led: use dell_smbios_send_request() for performing SMBIOS calls
Instead of using the WMI wrapper, dell-led can take advantage of
dell_smbios_send_request() for performing the SMBIOS calls required to
change the state of the microphone LED.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:27 +0000 (15:27 +0100)]
dell-led: use dell_smbios_find_token() for finding mic DMI tokens
With the advent of dell_smbios_find_token(), dell-led does not need to
perform any DMI walking on its own, but it can rather ask dell-smbios to
look up the DMI tokens it needs for changing the state of the microphone
LED.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:26 +0000 (15:27 +0100)]
dell-smbios: make da_tokens static
As dell-laptop has been changed to use dell_smbios_find_token() instead
of directly accessing members of the da_tokens table, the latter can be
marked static.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:25 +0000 (15:27 +0100)]
dell-smbios: remove find_token_{id,location}()
As dell-laptop has been changed to use dell_smbios_find_token() instead
of find_token_id() and find_token_location(), these functions can be
safely removed.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:22 +0000 (15:27 +0100)]
dell-smbios: implement new function for finding DMI table 0xDA tokens
Ultimately, the da_tokens table should not be exported from dell-smbios.
Currently, in some cases, dell-laptop accesses that table's members
directly, so implement a new function, dell_smbios_find_token(), which
returns a pointer to an entry inside the da_tokens table with the given
token ID (or NULL if it is not found).
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:21 +0000 (15:27 +0100)]
dell-smbios: make the SMBIOS buffer static
As dell-laptop has been changed to always retrieve a pointer to the
SMBIOS buffer using dell_smbios_get_buffer(), the SMBIOS buffer can be
marked static.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:20 +0000 (15:27 +0100)]
dell-smbios: return the SMBIOS buffer from dell_smbios_get_buffer()
Ultimately, the SMBIOS buffer should not be exported from dell-smbios.
Currently, dell-laptop accesses it directly using a global variable, so
make dell_smbios_get_buffer() return a pointer to the SMBIOS buffer and
replace all uses of the global variable with local variables.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:19 +0000 (15:27 +0100)]
dell-smbios: don't return an SMBIOS buffer from dell_smbios_send_request()
An SMBIOS buffer pointer does not need to be returned by
dell_smbios_send_request(), because SMBIOS call results are stored in
the buffer exported by the module.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:17 +0000 (15:27 +0100)]
dell-smbios: rename dell_send_request() to dell_smbios_send_request()
As dell_send_request() is exported from the module, its prefix should be
consistent with other exported symbols, so change function name to
dell_smbios_send_request().
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Michał Kępień [Fri, 22 Jan 2016 14:27:13 +0000 (15:27 +0100)]
dell-laptop: extract SMBIOS-related code to a separate module
Extract SMBIOS-related code from dell-laptop to a new kernel module,
dell-smbios. The static specifier is removed from exported symbols,
otherwise code is just moved around.
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
[dvhart: Include linux/io.h in dell-smbios.c as caught by lkp] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Azael Avalos [Mon, 25 Jan 2016 18:29:10 +0000 (11:29 -0700)]
toshiba_acpi: Add support for cooling method feature
This patch adds support to query and set the "Cooling Method" feature,
which basically changes how the system fan behaves, depending on the
supported cooling methods.
Depending on the laptop model, these are the (so far...) available
cooling methods:
- Maximum Performance
- Performance
- Battery Optimized
Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Eric Curtin [Sat, 30 Jan 2016 16:55:59 +0000 (16:55 +0000)]
thinkpad_acpi: Remove ambiguous logging for "Unsupported brightness interface"
"Unsupported brightness interface" message gets logged on
machines that are well supported.
Signed-off-by: Eric Curtin <ericcurtin17@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
David Rivshin [Sat, 30 Jan 2016 04:26:54 +0000 (23:26 -0500)]
pwm: omap-dmtimer: Add debug message for effective period and duty cycle
After going through the math and constraints checking to compute load
and match values, it is helpful to know what the resultant period and
duty cycle are.
Signed-off-by: David Rivshin <drivshin@allworx.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
David Rivshin [Sat, 30 Jan 2016 04:26:53 +0000 (23:26 -0500)]
pwm: omap-dmtimer: Round load and match values rather than truncate
When converting period and duty_cycle from nanoseconds to fclk cycles,
the error introduced by the integer division can be appreciable, especially
in the case of slow fclk or short period. Use DIV_ROUND_CLOSEST_ULL() so
that the error is kept to +/- 0.5 clock cycles.
Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: David Rivshin <drivshin@allworx.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
David Rivshin [Sat, 30 Jan 2016 04:26:52 +0000 (23:26 -0500)]
pwm: omap-dmtimer: Add sanity checking for load and match values
Add sanity checking to ensure that we do not program load or match values
that are out of range if a user requests period or duty_cycle values which
are not achievable. The match value cannot be less than the load value (but
can be equal), and neither can be 0xffffffff. This means that there must be
at least one fclk cycle between load and match, and another between match
and overflow.
Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: David Rivshin <drivshin@allworx.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
[thierry.reding@gmail.com: minor coding style cleanups] Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
David Rivshin [Sat, 30 Jan 2016 04:26:51 +0000 (23:26 -0500)]
pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations
Fix the calculation of load_value and match_value. Currently they
are slightly too low, which produces a noticeably wrong PWM rate with
sufficiently short periods (i.e. when 1/period approaches clk_rate/2).
Example:
clk_rate=32768Hz, period=122070ns, duty_cycle=61035ns (8192Hz/50% PWM)
Correct values: load = 0xfffffffc, match = 0xfffffffd
Current values: load = 0xfffffffa, match = 0xfffffffc
effective PWM: period=183105ns, duty_cycle=91553ns (5461Hz/50% PWM)
Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: David Rivshin <drivshin@allworx.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Simon Horman [Thu, 25 Feb 2016 01:03:23 +0000 (10:03 +0900)]
pwm: rcar: Depend on ARCH_RENESAS instead of ARCH_SHMOBILE
This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a
more appropriate name than SHMOBILE for the majority of Renesas ARM
based SoCs.
This should die altogether, but for now lets remove a bit of this stuff,
as it is not used at all.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-ade3n99xscldhg5mx2vzd8p3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-elxg25jd4dhwod4wqbko87qh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve
Since none of the perf_event fields are used anymore, just the
perf_sample ones, and since this resolves to (map, symbol) from data
structures within struct thread, rename it to thread__resolve and make
the argument ordering similar to the one in machine__resolve().
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-2b33hs9bp550tezzlhl4kejh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf machine: Rename perf_event__preprocess_sample to machine__resolve
Since we only deal with fields in the passed struct perf_sample move
this method to struct machine, that is where the perf_sample fields
will be resolved to a struct addr_location, i.e. thread, map, symbol,
etc.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-a1ww2lbm2vbuqsv4p7ilubu9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
To avoid parsing event->header.misc in many locations.
This will also allow setting perf.sample.{ip,cpumode} in a single place,
from tracepoint fields, as needed by 'perf kvm' with PPC guests, where
the guest hardware counters is not available at the host.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-qp3yradhyt6q3wl895b1aat0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf tests: Forward the perf_sample in the dwarf unwind test
It _will_ be used, no sense in receiving it and nor fowarding it along.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-ht8v5et209wuoh5o6nh9pzyq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Link: http://lkml.kernel.org/n/tip-8nzhnokxyp8y4v7gf0j00oyb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Linus Torvalds [Wed, 23 Mar 2016 13:12:39 +0000 (06:12 -0700)]
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
"This fixes the following issues:
API:
- Fix kzalloc error path crash in ecryptfs added by skcipher
conversion. Note the subject of the commit is screwed up and the
correct subject is actually in the body.
Drivers:
- A number of fixes to the marvell cesa hashing code.
- Remove bogus nested irqsave that clobbers the saved flags in ccp"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: marvell/cesa - forward devm_ioremap_resource() error code
crypto: marvell/cesa - initialize hash states
crypto: marvell/cesa - fix memory leak
crypto: ccp - fix lock acquisition code
eCryptfs: Use skcipher and shash