03 Apr, 2015
15 commits
-
Keeping drivers related to HW tracing on ARM, i.e coresight,
under "drivers/coresight" doesn't make sense when other
architectures start rolling out technologies of the same
nature.As such creating a new "drivers/hwtracing" directory where all
drivers of the same kind can reside, reducing namespace
pollution under "drivers/".Signed-off-by: Mathieu Poirier
Signed-off-by: Greg Kroah-Hartman -
Knowing the state of various control register is always
useful for degging and tuning. As such add an entry in
sysfs that expose to userspace the most important registers.Signed-off-by: Mathieu Poirier
Signed-off-by: Greg Kroah-Hartman -
The coresight-default-sink configuration option has been
removed from the framework. As such remove it from DT and bindings.Signed-off-by: Kaixu Xia
Signed-off-by: Mathieu Poirier
Signed-off-by: Greg Kroah-Hartman -
>From the TMC TRM, the ETF can be configured as buffer mode, so ETF can
be a sink type.Signed-off-by: Xia Kaixu
Signed-off-by: Mathieu Poirier
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Mathieu Poirier
Signed-off-by: Greg Kroah-Hartman -
Most CoreSight blocks are 64-bit ready. As such move configuration
entries from "arch/arm/Kconfig.config" to the driver's subdirectory
and source the newly created Kconfig from architecture specific
Kconfig.debug files.Signed-off-by: Mathieu Poirier
Acked-by: Catalin Marinas
Signed-off-by: Greg Kroah-Hartman -
Compiling coresight drivers with a 64-bit compiler highlights a couple
of formatting issues, which are fixed by this patch.Signed-off-by: Mathieu Poirier
Signed-off-by: Greg Kroah-Hartman -
Function "get_logical_index()" is not available on arm64.
Instead of adding the function simply using "of_get_cpu_node()" and
comparing the return value with cpu handles yields the same
result.Signed-off-by: Mathieu Poirier
Signed-off-by: Greg Kroah-Hartman -
The code here is checking for IS_ERR() when request_mem_region() only
returns NULL on error and never an ERR_PTR.Signed-off-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
The API allows the application to flush a host-to-FPGA stream by calling
write() with the data count set to zero. Before this patch, copy_from_user()
was called with a non-zero byte count, which possibly made it attempt to read
from unmapped user memory. Such attempts caused the driver to return -EFAULT
instead of 0, even though the desired operation went through fine.This patch ensures the driver returns 0 on a successful flush.
Signed-off-by: Eli Billauer
Signed-off-by: Greg Kroah-Hartman -
pci core now disables msi on probe automatically,
drop this from device-specific code.Cc: Bjorn Helgaas
Cc: linux-pci@vger.kernel.org
Signed-off-by: Michael S. Tsirkin
Signed-off-by: Greg Kroah-Hartman -
Qualcomm PMIC arbiter driver already depends on ARCH_QCOM,
which could be either ARM or ARM64. New version of the PMIC
arbiter controller is available on 64 bit platforms.
Remove ARM dependency to allow driver to be build for 64 bit
platforms.Signed-off-by: Ivan T. Ivanov
Signed-off-by: Greg Kroah-Hartman -
Use the normal return values for bool functions
Signed-off-by: Joe Perches
Reviewed-by: Amit Shah
Signed-off-by: Greg Kroah-Hartman -
Make the miscdevice accessible through the file's private_data.
Previously, this was done only when an open() file operation had been
registered. If no custom open() file operation was defined,
private_data was set to NULL.This subtle quirk was confusing, to the point where kernel code
registered *empty* file open operations to have private_data point to
the misc device structure and avoid duplicating that logic.And it could easily lead to bugs, where the addition or removal of a
custom open() file operation surprisingly changes the initial value of
a file's private_data structure.To resolve this, we now place the miscdevice in the file's private_data
member unconditionally when open() is called.Signed-off-by: Tom Van Braeckel
Signed-off-by: Greg Kroah-Hartman -
This reverts commit 4d8beff2ae07fad85d723b4cdf704b05f0ed4794.
It causes build warnings, and it's incorrect as we do write to this
structure.Reported-by: Stephen Rothwell
Cc: Fabian Frederick
Signed-off-by: Greg Kroah-Hartman
01 Apr, 2015
1 commit
-
…/chanwoo/extcon into char-misc-next
Chanwoo writes:
Update extcon for v4.1
This patchset include two new extcon driver and fix minor issue of extcon
driver.Detailed description for patchset:
1. new extcon-max77843.c and extcon-usb-gpio.c extcon driver
- extcon-max77843.c driver support the MAXIM MAX77843 MUIC (Micor-USB Interface
Controller) device which handles the various external connectors such as TA/USB
/USB-HOST/JIG and so on.
- extcon-usb-gpio.c driver support the USB and USB-HOST cable detection by
using the GPIO pin which is connected to USB ID pin. This GPIO pin updates the
USB cable states.2. Rename the filename of extcon core driver and add missing locking mechanism
- Rename the previous extcon-class driver.c as extcon.c because '-class'
postfix is not necessary word.
- extcon core driver (extcon.c) used the raw_notifier_chain. It must be
protected by locking mechanism to avoid the list changing while
extcon_update_state() is executed.3. Fix minor issue of extcon drviers
- Fix cable name by using the capital letter instead of small letter on
extcon-max77693.c driver.
- Clean-up code of extcon-arizona.c to detect headphone cable.
- Fix the wrong return type and variable type on extcon-max77843.c.
- Fix the checkpatch warning of all extcon drivers.
27 Mar, 2015
7 commits
-
Add a driver for the NAND/External Memory Controller (NEMC) on JZ4780
and later SoCs.The primary function of this driver is to configure parameters, such
as timings, for external memory devices using data supplied in the
device tree. Devices connected to the NEMC are represented in the DT
as children of the NEMC node, the driver uses optional properties
specified in these child nodes to configure the parameters of each
bank.Signed-off-by: Alex Smith
Signed-off-by: Zubair Lutfullah Kakakhel
Signed-off-by: Greg Kroah-Hartman -
Add device tree bindings for the NAND/External Memory Controller (NEMC)
on Ingenic JZ4780Signed-off-by: Alex Smith
Signed-off-by: Zubair Lutfullah Kakakhel
Signed-off-by: Greg Kroah-Hartman -
Qualcomm PMIC Arbiter version-2 changes from version-1 are:
- Some different register offsets.
- New channel register space, one per PMIC peripheral (ppid).
All tx traffic uses these channels.
- New observer register space. All rx trafic uses this space.
- Different command format for spmi command registers.Reviewed-by: Sagar Dharia
Signed-off-by: Gilad Avidov
Tested-by: Ivan T. Ivanov
Signed-off-by: Greg Kroah-Hartman -
According to spmi spec a slave powers up into startup state and then
transitions into active state. Thus, the wakeup command is not required
before calling the slave's probe. The wakeup command is only needed for
slaves that are in sleep state after receiving the sleep command.Cc: galak@codeaurora.org
Reviewed-by: Stephen Boyd
Reviewed-by: Sagar Dharia
Acked-by: Josh Cartwright
Signed-off-by: Gilad Avidov
Tested-by: Ivan T. Ivanov
Signed-off-by: Greg Kroah-Hartman -
I take over the maintainship from Voice.
Signed-off-by: Nicolas Ferre
Cc: Mark Brown
Cc: Arnd Bergmann
Acked-by: Bo Shen
Signed-off-by: Greg Kroah-Hartman -
Don't wait after sending request for offers to the host. This wait is
unnecessary and simply adds 5 seconds to the boot time.Signed-off-by: K. Y. Srinivasan
Cc:
Signed-off-by: Greg Kroah-Hartman -
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)Signed-off-by: Fabian Frederick
Signed-off-by: Greg Kroah-Hartman
25 Mar, 2015
17 commits
-
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")Signed-off-by: Joe Perches
Acked-by: Guenter Roeck
Signed-off-by: Greg Kroah-Hartman -
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)Signed-off-by: Fabian Frederick
Signed-off-by: Greg Kroah-Hartman -
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)Signed-off-by: Fabian Frederick
Signed-off-by: Greg Kroah-Hartman -
Handle the case when the write to the ringbuffer fails. In this case,
unconditionally signal the host. Since we may have deferred signalling
the host based on the kick_q parameter, signalling the host
unconditionally in this case deals with the issue.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Export the vmbus_sendpacket_pagebuffer_ctl() interface. This export will be
used by the netvsc driver.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
If freeze fails, vss_operate will re-enter itself to thaw. But it forgets
to call endmntent() before it recalls setmntent() again.Signed-off-by: Vaughan Cao
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
When a channel has been rescinded, the close operation is a noop.
Restructure the code so we deal with the rescind condition after
we properly cleanup the channel. I would like to thank
Dexuan Cui for observing this problem.
The current code leaks memory when the channel is rescinded.The current char-next branch is broken and this patch fixes
the bug.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Without this patch, hv_fcopy_daemon's hv_copy_data() -> pwrite()
will fail for >2GB file offset.The current char-next branch is broken and this patch fixes
the bug.Signed-off-by: Alex Ng
Signed-off-by: Dexuan Cui
Cc: K. Y. Srinivasan
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
The indenting makes it clear that there were curly braces intended here.
Fixes: 2dd37cb81580 ('Drivers: hv: vmbus: Handle both rescind and offer messages in the same context')
Signed-off-by: Dan Carpenter
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
HV_CRASH_CTL_CRASH_NOTIFY is a 64 bit number. Depending on the usage context,
the value may be truncated. This patch is in response from the following
email from Wu Fengguang :From: Wu Fengguang
Subject: [char-misc:char-misc-testing 25/45] drivers/hv/vmbus_drv.c:67:9: sparse:
constant 0x8000000000000000 is so big it is unsigned longtree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing
head: b3de8e3719e582f3182bb504295e4a8e43c8c96f
commit: 96c1d0581d00f7abe033350edb021a9d947d8d81 [25/45] Drivers: hv: vmbus: Add support for VMBus panic notifier handler
reproduce:
# apt-get install sparse
git checkout 96c1d0581d00f7abe033350edb021a9d947d8d81
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__sparse warnings: (new ones prefixed by >>)
drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000000000000000 is so big it is unsigned long
...Signed-off-by: Nick Meier
Reported-by: Wu Fengguang
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Memory blocks can be onlined in random order. When this order is not natural
some memory pages are not onlined because of the redundant check in
hv_online_page().Here is a real world scenario:
1) Host tries to hot-add the following (process_hot_add):
pg_start=rg_start=0x48000, pfn_cnt=111616, rg_size=2621442) This results in adding 4 memory blocks:
[ 109.057866] init_memory_mapping: [mem 0x48000000-0x4fffffff]
[ 114.102698] init_memory_mapping: [mem 0x50000000-0x57ffffff]
[ 119.168039] init_memory_mapping: [mem 0x58000000-0x5fffffff]
[ 124.233053] init_memory_mapping: [mem 0x60000000-0x67ffffff]
The last one is incomplete but we have special has->covered_end_pfn counter to
avoid onlining non-backed frames and hv_bring_pgs_online() function to bring
them online later on.3) Now we have 4 offline memory blocks: /sys/devices/system/memory/memory9-12
$ for f in /sys/devices/system/memory/memory*/state; do echo $f `cat $f`; done | grep -v onlin
/sys/devices/system/memory/memory10/state offline
/sys/devices/system/memory/memory11/state offline
/sys/devices/system/memory/memory12/state offline
/sys/devices/system/memory/memory9/state offline4) We bring them online in non-natural order:
$grep MemTotal /proc/meminfo
MemTotal: 966348 kB
$echo online > /sys/devices/system/memory/memory12/state && grep MemTotal /proc/meminfo
MemTotal: 1019596 kB
$echo online > /sys/devices/system/memory/memory11/state && grep MemTotal /proc/meminfo
MemTotal: 1150668 kB
$echo online > /sys/devices/system/memory/memory9/state && grep MemTotal /proc/meminfo
MemTotal: 1150668 kBAs you can see memory9 block gives us zero additional memory. We can also
observe a huge discrepancy between host- and guest-reported memory sizes.The root cause of the issue is the redundant pg >= covered_start_pfn check (and
covered_start_pfn advancing) in hv_online_page(). When upper memory block in
being onlined before the lower one (memory12 and memory11 in the above case) we
advance the covered_start_pfn pointer and all memory9 pages do not pass the
check. If the assumption that host always gives us requests in sequential order
and pg_start always equals rg_start when the first request for the new HA
region is received (that's the case in my testing) is correct than we can get
rid of covered_start_pfn and pg >= start_pfn check in hv_online_page() is
sufficient.The current char-next branch is broken and this patch fixes
the bug.Signed-off-by: Vitaly Kuznetsov
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
When add_memory() fails the following BUG is observed:
[ 743.646107] hv_balloon: hot_add memory failed error is -17
[ 743.679973]
[ 743.680930] =====================================
[ 743.680930] [ BUG: bad unlock balance detected! ]
[ 743.680930] 3.19.0-rc5_bug1131426+ #552 Not tainted
[ 743.680930] -------------------------------------
[ 743.680930] kworker/0:2/255 is trying to release lock (&dm_device.ha_region_mutex) at:
[ 743.680930] [] mutex_unlock+0xe/0x10
[ 743.680930] but there are no more locks to release!This happens as we don't acquire ha_region_mutex and hot_add_req() expects us
to as it does unconditional mutex_unlock(). Acquire the lock on the error path.The current char-next branch is broken and this patch fixes
the bug.Signed-off-by: Vitaly Kuznetsov
Acked-by: Jason Wang
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
This patch is a continuation of the rescind handling cleanup work. We cannot
block in the global message handling work context especially if we are blocking
waiting for the host to wake us up. I would like to thank
Dexuan Cui for observing this problem.The current char-next branch is broken and this patch fixes
the bug.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Use the new group field of struct miscdevice for managing the sysfs
entries instead of manually adding/removing via device_create_file()
and device_remove_file(). This simplifies the code a lot and fixes
the possible races.Signed-off-by: Takashi Iwai
Signed-off-by: Greg Kroah-Hartman -
Add groups field to struct miscdevice for passing the attribute groups
at device creation. In this way, the driver can avoid the manual call
of device_create_file() after the device registration, which is
basically a racy operation, in addition to the reduction of manual
device_remove_file() calls.Signed-off-by: Takashi Iwai
Signed-off-by: Greg Kroah-Hartman -
return type of wait_for_completion_timeout is unsigned long not int. The
rc variable is renamed timeout to reflect its use and the type adjusted to
unsigned long.Signed-off-by: Nicholas Mc Guire
Acked-by: Sudeep Dutt
Signed-off-by: Greg Kroah-Hartman -
return type of wait_for_completion_timeout is unsigned long not int. The
rc variable is renamed timeout to reflect its use and the type adjusted to
unsigned long.Signed-off-by: Nicholas Mc Guire
Signed-off-by: Greg Kroah-Hartman