aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-03-01NTB: Correctly handle receive buffers of the minimal sizentb/standard/common-pc-64/jasperforestnitin/ntbJon Mason
The ring logic of the NTB receive buffer/transmit memory window requires there to be at least 2 payload sized allotments. For the minimal size case, split the buffer into two and set the transport_mtu to the appropriate size. Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01NTB: reset tx_index on link toggleJon Mason
If the NTB link toggles, the driver could stop receiving due to the tx_index not being set to 0 on the transmitting size on a link-up event. This is due to the driver expecting the incoming data to start at the beginning of the receive buffer and not at a random place. Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01NTB: Link toggle memory leakJon Mason
Each link-up will allocate a new NTB receive buffer when the NTB properties are negotiated with the remote system. These allocations did not check for existing buffers and thus did not free them. Now, the driver will check for an existing buffer and free it if not of the correct size, before trying to alloc a new one. Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01NTB: Handle 64bit BAR sizesJon Mason
64bit BAR sizes are permissible with an NTB device. To support them various modifications and clean-ups were required, most significantly using 2 32bit scratch pad registers for each BAR. Also, modify the driver to allow more than 2 Memory Windows. Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01NTB: fix pointer math issuesDan Carpenter
->remote_rx_info and ->rx_info are struct ntb_rx_info pointers. If we add sizeof(struct ntb_rx_info) then it goes too far. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01ntb: off by one sanity checksDan Carpenter
These tests are off by one. If "mw" is equal to NTB_NUM_MW then we would go beyond the end of the ndev->mw[] array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01NTB: variable dereferenced before checkJon Mason
Correct instances of variable dereferencing before checking its value on the functions exported to the client drivers. Also, add sanity checks for all exported functions. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01NTB: Fix Sparse WarningsJon Mason
Address the sparse warnings and resulting fallout Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01NTB: disable x86_32 supportJon Mason
Atomic readq and writeq do not exist by default on some 32bit architectures, thus causing compile errors due to non-existent symbols. Since NTB has not been tested 32bit, disable x86_32 support until such time as this and any other issues can be properly discovered. Signed-off-by: Jon Mason <jon.mason@intel.com>
2013-03-01ntb_netdev: Update VersionJon Mason
Update NTB netdev version to 0.7 Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01ntb_netdev: improve loggingJon Mason
Improve driver logging to be more helpful Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01ntb_netdev: remove tx timeoutJon Mason
There is a race between disabling and enabling the tx queue, resulting in tx timeouts. Since all the tx timeout does is re-enable the tx queue, simple remove the start/stop of the queue and the tx timeout routine. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01ntb_netdev: correct skb leakJon Mason
If ntb_netdev is unable to pass a new skb to the ntb transport for future rx packets, it should free the newly alloc'ed skb in the error case. Found by Kernel memory leak detector. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01ntb_netdev: remove init/exit from probe/removeJon Mason
Remove init/exit from probe/remove routines to correct warnings of "Section mismatch". Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: Update VersionJon Mason
Update NTB version to 0.25 Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: Out of free receive entries issueJon Mason
If the NTB client driver enqueues the maximum number of rx buffers, it will not be able to re-enqueue another in its callback handler due to a lack of free entries. This can be avoided by adding the current entry to the free queue prior to calling the client callback handler. With this change, ntb_netdev will no longer encounter a rx error on its first packet. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: Remove reads across NTBJon Mason
CPU reads across NTB are slow(er) and can hang the local system if an ECC error is encountered on the remote. To work around the need for a read, have the remote side write its current position in the rx buffer to the local system's buffer and use that to see if there is room when transmitting. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: correct stack usage warning in debugfs_readJon Mason
Correct gcc warning of using too much stack debugfs_read. This is done by kmallocing the buffer instead of using the char array on stack. Also, shrinking the buffer to something closer to what is currently being used. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: whitespace cleanupsJon Mason
Whitespace cleanups found via `indent` Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: namespacecheck cleanupsJon Mason
Declare ntb_bus_type static to remove it from name space, and remove unused ntb_get_max_spads function. Found via `make namespacecheck`. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: use simple_open for debugfsJon Mason
Use simple_open for debugfs instead of recreating it in the NTB driver. Caught by coccicheck. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: No sleeping in interrupt contextJon Mason
Move all cancel_delayed_work_sync to a work thread to prevent sleeping in interrupt context (when the NTB link goes down). Caught via 'Sleep inside atomic section checking' Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: separate transmit and receive windowsJon Mason
Since it is possible for the memory windows on the two NTB connected systems to be different sizes, the divergent sizes must be accounted for in the segmentation of the MW's on each side. Create separate size variables and initialization as necessary. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: correct memory barrierJon Mason
mmiowb is not sufficient to flush the data and is causing data corruption. Change to wmb and the data corruption is no more. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01NTB: Handle ntb client device probes without present hardwareJon Mason
Attempts to probe client ntb drivers without ntb hardware present will result in null pointer dereference due to the lack of the ntb bus device being registers. Check to see if this is the case, and fail all calls by the clients registering their drivers. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01ntb: remove __dev* markingsGreg Kroah-Hartman
These are now gone from the kernel, so remove them from the newly-added drivers before they start to cause build errors for people. Cc: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01net: Add support for NTB virtual ethernet deviceJon Mason
A virtual ethernet device that uses the NTB transport API to send/receive data. Signed-off-by: Jon Mason <jon.mason@intel.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-01PCI-Express Non-Transparent Bridge SupportJon Mason
A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two subsystems. A non-transparent bridge is functionally similar to a transparent bridge except that both sides of the bridge have their own independent address domains. The host on one side of the bridge will not have the visibility of the complete memory or I/O space on the other side of the bridge. To communicate across the non-transparent bridge, each NTB endpoint has one (or more) apertures exposed to the local system. Writes to these apertures are mirrored to memory on the remote system. Communications can also occur through the use of doorbell registers that initiate interrupts to the alternate domain, and scratch-pad registers accessible from both sides. The NTB device driver is needed to configure these memory windows, doorbell, and scratch-pad registers as well as use them in such a way as they can be turned into a viable communication channel to the remote system. ntb_hw.[ch] determines the usage model (NTB to NTB or NTB to Root Port) and abstracts away the underlying hardware to provide access and a common interface to the doorbell registers, scratch pads, and memory windows. These hardware interfaces are exported so that other, non-mainlined kernel drivers can access these. ntb_transport.[ch] also uses the exported interfaces in ntb_hw.[ch] to setup a communication channel(s) and provide a reliable way of transferring data from one side to the other, which it then exports so that "client" drivers can access them. These client drivers are used to provide a standard kernel interface (i.e., Ethernet device) to NTB, such that Linux can transfer data from one system to the other in a standard way. Signed-off-by: Jon Mason <jon.mason@intel.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-24perf annotate: replace 'expand' with equivalent sed expressionTom Zanussi
We don't have 'expand' in our userspace so we need to accomplish the same thing using 'sed', which we do have. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2013-02-24perf: temporary gcc 4.7 build fixesBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24perf: add SLANG_INC for slang.hLiang Li
CFLAGS was previously hard coded to contain "-I/usr/include/slang" to work with hosts that have "/usr/include/slang/slang.h" as well as hosts that have "/usr/include/slang.h". This path can cause compile warnings like: cc1: warning: '/usr/include/slang' doesn't exists. or cc1: warning: include location "/usr/include/slang" is unsafe for cross-compilation [-Wpoison-system-directories] Then in some cases warnings become errors if WERROR is enabled hence build errors. To fix this issue, we can use -idirafter to downgrade the priority of the default hard coded path. We can also make the slang include directory a variable, to allow the user to specify SLANG_INC and set their own include location. And add a '=' prefix to indicate better compatibility with sysroot/cross compile cases. Signed-off-by: Liang Li <liang.li@windriver.com>
2013-02-24perf: add sgidefs.h to for mips buildsTom Zanussi
Allow Python.h to find the definitions it needs on mips i.e. get rid of the error: "_ABIN32" is not defined. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2013-02-24perf: change --root to --prefix for python installTom Zanussi
Otherwise we get the sysroot path appended to the build path, not what we want. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2013-02-24perf: add 'libperl not found' warningTom Zanussi
If libperl isn't found, display a message to that effect along with some hints on how to fix it. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2013-02-24perf: use pkg-config instead of python-configTom Zanussi
Python has build flags available via pkg-config, use those at build-time instead. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2013-02-24perf: force include of <stdbool.h>Bruce Ashfield
Large parts of perf use bool variables and assignments. Rather than depending on transient includes, we force it by including <stdbool.h> directly in perf.h Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24uptime: allow the optional limiting of kernel runtimeBruce Ashfield
Introduce the ability to limit the limit the uptime of a kernel. When enabled, these options set a maximum uptime on the kernel, and (optionally) trigger a clean reboot at expiration. This functionality may appear to be very close to the softdog watchdog implementation. It is. But can't be the softdog for several reasons: - The soft watchdog should be available while this functionality is active - The duration range is different between this and the softdog. The timeout available here is potentially quite a bit longer. - At expiration, there are different expiration requirements and actions. - This functionality is specific to a particular use case and should not impact mainline functionality To cleanly restart the kernel after one minute of uptime, the following config items would be required: CONFIG_UPTIME_LIMITED_KERNEL=y CONFIG_UPTIME_LIMIT_DURATION=1 CONFIG_UPTIME_LIMIT_KERNEL_REBOOT=y Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24FAT: Added FAT_NO_83NAMEAndrew Tridgell
This patch adds a new flag field 'FAT_NO_83NAME' for FAT files. When this flag is set on an 8.3 FAT entry, both the MSDOS and VFAT filesystems will skip the entry. For MSDOS this makes the file inaccessible. For VFAT it makes the file only accessible by the long filename. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2013-02-24FAT: Add CONFIG_VFAT_NO_CREATE_WITH_LONGNAMES optionAndrew Tridgell
When this option is enabled this will refuse to create new files with long names. Accessing existing files with long names will continue to work. File names to be created must conform to the 8.3 format. Mixed case is not allowed in either the prefix or the suffix. Signed-off-by: Andrew Tridgell <tridge@samba.org> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
2013-02-24FAT: Add CONFIG_VFAT_FS_NO_DUALNAMES optionAndrew Tridgell
This patch adds a new config option VFAT_FS_NO_DUALNAMES. When VFAT_FS_NO_DUALNAMES is enabled, VFAT will never create a file with both a long and a short filename. If a long filename is needed, then dummy bytes are stored in the 8.3 entry, and the 8.3 entry is marked as having no short name using the FAT_NO_83NAME flag. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2013-02-24yaffs2: update to yaffs 2013-01-18Bruce Ashfield
Importing yaffs2 from: git://www.aleph1.co.uk/yaffs2 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24initramfs: allow an optional wrapper script around initramfs generationBruce Ashfield
It is sometimes useful to have a secondary script call the gen_initramfs_list.sh script. This allows special interpretation of the initramfs root filesystem or other manipulations to be injected. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24compiler.h: Undef before redefining __attribute_const__Khem Raj
This is required to avoid warnings like util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] Signed-off-by: Khem Raj <raj.khem@gmail.com>
2013-02-24vmware: include jiffies.hBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24Resolve jiffies wrapping about arpLi Wang
When jiffies wraps, it must be larger than the value of "updated". The solution will enhance the condition of "time_after". Signed-off-by: Li Wang <li.wang@windriver.com>
2013-02-24efi: Add patch to fix 32bit EFI service mapping (rhbz 726701)Tom Zanussi
From fedora kernel: commit 6f3e186bc7721c5b24ad90d4a751cccfccd445e6 Author: Josh Boyer <jwboyer@redhat.com> Date: Fri Aug 5 08:47:23 2011 -0400 Add patch to fix 32bit EFI service mapping (rhbz 726701) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2013-02-24powerpc/boot: remove -Os from BOOTFLAGSBruce Ashfield
Some variants of gcc 4.5 have issues with -Os and will throw: cc1: error: Do not use -Os option if --enable-target-optspace is not set. -Os is not required to build a valid boot environment, so the easiest solution is to simply remove the boot flag. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24nfs: Allow default io size to be configured.Jim Somerville
Some boards need a smaller size here for performance reasons, so let's make the value configurable for those boards. Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2013-02-24check console device file on fs when bootingBruce Ashfield
If a root filesystem is generated as non-root, one of the tell tale signs is /dev/console not being a character file. To save a whole class of questions, let's just test for the condition and let the user know. Signed-off-by: Richard Laroque <rlarocqu@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-24mount_root: clarify error messages for when no rootfs foundPaul Gortmaker
To an end user who doesn't really know linux that well, a message like: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) may just look like cryptic computer speak indicating some deep and complex problem, instead of the reality that they have a simple local configuration problem. Ideally it would be nice to not use the misleading "panic" at all, but since various panic notifiers are historically expecting to be called when there is no valid rootfs, we can't change that. So instead, this tries to make it 100% clear to folks of any background that it is an end user configuration issue. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>