02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
17 Mar, 2017
1 commit
-
Add kernel-doc comments to the VME driver API and structures. This
documentation will be integrated into the RST documentation in a later
patch.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
25 Jan, 2017
1 commit
-
Commit 050c3d52cc7810d9d17b8cd231708609af6876ae ("vme: make core
vme support explicitly non-modular") dropped the remove function
because it appeared as if it was for removal of the bus, which is
not supported.However, vme_bus_remove() is called when a VME device is removed
from the bus and not when the bus is removed; as it calls the VME
device driver's cleanup function. Without this function, the
remove() in the VME device driver is never called and VME device
drivers cannot be reloaded again.Here we restore the remove function that was deleted in that
commit, and the reference to the function in the bus structure.Fixes: 050c3d52cc78 ("vme: make core vme support explicitly non-modular")
Cc: Manohar Vanga
Acked-by: Martyn Welch
Cc: devel@driverdev.osuosl.org
Signed-off-by: Stefano Babic
Signed-off-by: Paul Gortmaker
Cc: stable # 4.9
Signed-off-by: Greg Kroah-Hartman
11 Jan, 2017
1 commit
-
In ca91cx42_slave_get function, the value pointed by vme_base pointer is
set through:*vme_base = ioread32(bridge->base + CA91CX42_VSI_BS[i]);
So it must be dereferenced to be used in calculation of pci_base:
*pci_base = (dma_addr_t)*vme_base + pci_offset;
This bug was caught thanks to the following gcc warning:
drivers/vme/bridges/vme_ca91cx42.c: In function ‘ca91cx42_slave_get’:
drivers/vme/bridges/vme_ca91cx42.c:467:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
*pci_base = (dma_addr_t)vme_base + pci_offset;Signed-off-by: Augusto Mecking Caringi
Acked-By: Martyn Welch
Cc: stable
Signed-off-by: Greg Kroah-Hartman
28 Oct, 2016
1 commit
-
The function vme_get_size returns the size of the window to the caller,
however it doesn't check the return value of the call to vme_master_get.Return 0 on failure rather than anything else.
Suggested-by: Dan Carpenter
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
27 Sep, 2016
2 commits
-
image->lock is unlocked in some error handling path without take the
lock, so remove those unexpected unlock.Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver")
Signed-off-by: Wei Yongjun
Signed-off-by: Greg Kroah-Hartman -
We get 4 warnings when building kernel with W=1:
drivers/vme/bridges/vme_fake.c:384:6: warning: no previous prototype for 'fake_lm_check' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:619:6: warning: no previous prototype for 'fake_vmewrite8' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:649:6: warning: no previous prototype for 'fake_vmewrite16' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:679:6: warning: no previous prototype for 'fake_vmewrite32' [-Wmissing-prototypes]In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.Signed-off-by: Baoyou Xie
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
13 Sep, 2016
1 commit
-
casting between dma_addr_t and a pointer is generally tricky,
as they might not be the same size and almost never point into
the same address space. With 32-bit ARM systems and LPAE, we
get this warning for the vme_fake driver that stores a pointer
in a dma_addr_t variable:drivers/vme/bridges/vme_fake.c: In function 'fake_slave_set':
drivers/vme/bridges/vme_fake.c:204:29: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]To make this clearer while fixing the warning, I'm adding
a set of helper functions for the type conversion.Signed-off-by: Arnd Bergmann
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
31 Aug, 2016
4 commits
-
This patch introduces a fake VME bridge driver. This driver currently
emulates a subset of the VME bridge functionality. This allows some VME
subsystem development and even some VME device driver development to be
carried out in the absence of a proper VME bus.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
The Kconfig currently controlling compilation of this code is:
drivers/vme/Kconfig:menuconfig VME_BUS
drivers/vme/Kconfig: bool "VME bridge support"...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 replace module.h and moduleparam.h (unused) with init.h and also
export.h ; the latter since this file does export some syms.Since this is a struct bus_type and not a platform_driver, we don't
have any ".suppress_bind_attrs" to be concerned about when we
drop the ".remove" code from this file.Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.Cc: Manohar Vanga
Signed-off-by: Paul Gortmaker
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
These drivers have a PCI device ID table but the PCI module
alias information is not created so module autoloading won't work.Signed-off-by: Alessio Igor Bogani
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Make the location monitor callback function prototype more useful by
changing the argument from an integer to a void pointer.All VME bridge drivers were simply passing the location monitor index
(e.g. 0-3) as the argument to these callbacks. It is much more useful
to pass back a pointer to data that the callback-registering driver
cares about.There appear to be no in-kernel callers of vme_lm_attach (or
vme_lme_request for that matter), so this change only affects the VME
subsystem and bridge drivers.This has been tested with Tsi148 hardware, but the CA91Cx42 changes
have only been compiled.Signed-off-by: Aaron Sierra
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
02 May, 2016
2 commits
-
Consolidate vme_bridge structure setup that every bridge was required
to do itself. This came about because .irq_mtx is only used within the
VME core, but was required to be setup externally.This returns the structure passed in to support shorthand like this:
bridge = vme_init_bridge(&priv->bridge);
Signed-off-by: Aaron Sierra
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Fix a typo in the spurious interrupt warning and consistently capitalize
VME, PCI, and DMA acronyms.Signed-off-by: Aaron Sierra
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
08 Feb, 2016
1 commit
-
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
05 Nov, 2015
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc driver update for 4.4-rc1. Lots of
different driver and subsystem updates, hwtracing being the largest
with the addition of some new platforms that are now supported. Full
details in the shortlog.All of these have been in linux-next for a long time with no reported
issues"* tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (181 commits)
fpga: socfpga: Fix check of return value of devm_request_irq
lkdtm: fix ACCESS_USERSPACE test
mcb: Destroy IDA on module unload
mcb: Do not return zero on error path in mcb_pci_probe()
mei: bus: set the device name before running fixup
mei: bus: use correct lock ordering
mei: Fix debugfs filename in error output
char: ipmi: ipmi_ssif: Replace timeval with timespec64
fpga: zynq-fpga: Fix issue with drvdata being overwritten.
fpga manager: remove unnecessary null pointer checks
fpga manager: ensure lifetime with of_fpga_mgr_get
fpga: zynq-fpga: Change fw format to handle bin instead of bit.
fpga: zynq-fpga: Fix unbalanced clock handling
misc: sram: partition base address belongs to __iomem space
coresight: etm3x: adding documentation for sysFS's cpu interface
vme: 8-bit status/id takes 256 values, not 255
fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000
ARM: zynq: dt: Updated devicetree for Zynq 7000 platform.
ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager.
ver_linux: proc/modules, limit text processing to 'sed'
...
18 Oct, 2015
1 commit
-
Fixes an off by one array size.
Signed-off-by: Dmitry Kalinkin
Signed-off-by: Greg Kroah-Hartman
05 Oct, 2015
6 commits
-
The warning is a false positive.
drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_write':
drivers/vme/bridges/vme_tsi148.c:1358:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
vme_unregister_error_handler(handler);
^
drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_read':
drivers/vme/bridges/vme_tsi148.c:1260:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
vme_unregister_error_handler(handler);
^Fixes: 0b0496625715 ("vme: change bus error handling scheme")
Signed-off-by: Dmitry Kalinkin
Signed-off-by: Greg Kroah-Hartman -
This will enable error messages for accesses done through mmap.
Signed-off-by: Dmitry Kalinkin
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
The current VME bus error handler adds errors to the bridge error list.
vme_master_{read,write} then traverses that list to look for relevant
errors.Such scheme didn't work well for accesses going through vme_master_mmap
because they would also allocate a vme_bus_error, but have no way to do
vme_clear_errors call to free that memory.This changes the error handling process to be other way around: now
vme_master_{read,write} defines a window in VME address space that will
catch possible errors. VME bus error interrupt only traverses these
windows and marks those that had errors in them.Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Also changes vme_bus_error_handler to take generic address modifier code
instead of raw contents of a device-specific attribute register.Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Error handling code found in tsi148 is not device specific. In fact it
already relies on shared vme_bus_error struct and vme_bridge.vme_errors
field. The other bridge driver could reuse this code if it is shared.This introduces a slight behavior change: vme error message won't be
triggered in a rare case when err_chk=1 and kmalloc fails.Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Universe II allows PCI address grannularity of 4K or 64K depending on
the window id. tsi148 only supports 64K. Existing driver implementations
are validating window size against this grannularity and then use that
very size as alignment parameter to pci_bus_alloc_resource. This
constraint is excessive, alignment by granularity should be enough.This changes alignment constraint from size to a fixed constraint of
64K.Signed-off-by: Dmitry Kalinkin
Signed-off-by: Greg Kroah-Hartman
13 Jun, 2015
8 commits
-
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Universe II datasheet defines following address space values
for LM_CTL[16:18]000=A16
001=A24
010=A32
011,100,101=Reserved
110=User1
111=User2Mask 5<<
Cc: Igor Alekseev
Reported-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
This moves DMA mapping of the first list element to vme_list_add, the
same place where other elements mappings occur. This prevents extra
mapping or over-unmapping in the cases when vme_list_exec is called more
or less than one time respectively.Also adds dma_mapping_error check.
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
DMA lists on tsi148 weren't processed further than the first item
because of the broken logic. This regression was introduced in:ac1a4f2caf7b071 "Staging: VME: Ensure TSI148 link list descriptors..."
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman
07 Mar, 2015
2 commits
-
The tsi148 driver is registering the slave images as supporting the "USER"
access modes and CR/CSR access mode rather than the master images as it
should.Remove the incorrect case entries for these modes from the
tsi148_slave_set() function, stop registering slave_images as supporting
these modes and instead register master windows as supporting these modes.Signed-off-by: Martyn Welch
Acked-by: Dmitry Kalinkin
Signed-off-by: Greg Kroah-Hartman -
We also make sure that user won't be able to reconfigure the window while it is
mmap'ed.Signed-off-by: Dmitry Kalinkin
Cc: Martyn Welch
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman
12 Jan, 2015
1 commit
-
Replace a misspelled function name by %s and then __func__.
This is the get function, not the set function, as was indicated by the
string.This was done using Coccinelle, including the use of Levenshtein distance,
as proposed by Rasmus Villemoes.Signed-off-by: Julia Lawall
Signed-off-by: Greg Kroah-Hartman
09 Aug, 2014
1 commit
-
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches
Cc: Martyn Welch
Cc: Manohar Vanga
Acked-by: Greg Kroah-Hartman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Jul, 2014
1 commit
-
The CA91CX42_DCTL_VDW_M define is cut and pasted twice so we can delete
the second instance.Signed-off-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman
17 Apr, 2014
3 commits
-
Save some characters by using to_pci_dev() instead of container_of().
Signed-off-by: Aaron Sierra
Signed-off-by: Greg Kroah-Hartman -
Previously, tsi148_master_set() assumed the address contained in its
PCI bus resource represented the actual PCI bus address. This is a fine
assumption on some platforms. However, on platforms that don't use a
1:1 (CPU:PCI) mapping this results in the tsi148 driver configuring an
invalid master window translation.This patch updates the vme_tsi148 driver to first convert the address
contained in the PCI bus resource into a PCI bus address before using
it.[asierra: account for pcibios_resource_to_bus() prototype change]
Signed-off-by: Joe Schultz
Signed-off-by: Aaron Sierra
Signed-off-by: Greg Kroah-Hartman -
This patch corrects a typo where "vme_base" was used instead of
"*vme_base". The typo resulted in an incorrect value being returned
to userspace (via vme_user).It also removes the following compile warning on some platforms:
warning: cast from pointer to integer of different size
[asierra: commit title/log rewording]
Signed-off-by: Joe Schultz
Signed-off-by: Aaron Sierra
Signed-off-by: Greg Kroah-Hartman
19 Feb, 2014
1 commit
-
We need the fixes here for future mei and other patches.
Signed-off-by: Greg Kroah-Hartman