summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radix tree test suite: Add performance test for radix_tree_split()Rehas Sachdeva2017-03-071-0/+44
| | | | | Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
* radix tree test suite: Add performance benchmarksRehas Sachdeva2017-03-071-7/+75
| | | | | | | Add performance benchmarks for radix tree insertion, tagging and deletion. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
* radix tree test suite: Add test for radix_tree_clear_tags()Rehas Sachdeva2017-03-071-0/+29
| | | | | | | | | Assert that radix_tree_clear_tags() clears the tags on the passed node and slot. Assert that the case where the radix tree has only one entry at index zero and the node is NULL, is also handled. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
* radix tree test suite: Add tests for ida_simple_get() and ida_simple_remove()Rehas Sachdeva2017-03-071-0/+19
| | | | | | | | Assert that ida_simple_get() allocates an id in the passed range or returns error on failure, and ida_simple_remove() releases an allocated id. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
* radix tree test suite: Add test for idr_get_next()Rehas Sachdeva2017-03-071-0/+25
| | | | | | | | Assert that idr_get_next() returns the next populated entry in the tree with an ID greater than or equal to the value pointed to by @nextid argument. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
* Merge tag 'for-linus-4.11' of git://git.code.sf.net/p/openipmi/linux-ipmiLinus Torvalds2017-02-289-30/+69
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull IPMI updates from Corey Minyard: "This is a few small fixes to the main IPMI driver, make some things const, fix typos, etc. The last patch came in about a week ago, but IMHO it's best to go in now. It is not for the main driver, it's for the bt-bmc driver, which runs on the managment controller side, not on the host side, so the scope is limited and the change is necessary" * tag 'for-linus-4.11' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: bt-bmc: Use a regmap for register access char: ipmi: constify ipmi_smi_handlers structures acpi:ipmi: Make IPMI user handler const ipmi: make ipmi_usr_hndl const Documentation: Fix a typo in IPMI.txt.
| * ipmi: bt-bmc: Use a regmap for register accessAndrew Jeffery2017-02-202-22/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registers for the bt-bmc device live under the Aspeed LPC controller. Devicetree bindings have recently been introduced for the LPC controller where the "host" portion of the LPC register space is described as a syscon device. Future devicetrees describing the bt-bmc device should nest its node under the appropriate "simple-mfd", "syscon" compatible node. This change allows the bt-bmc driver to function with both syscon and non-syscon- based devicetree descriptions by always using a regmap for register access, either retrieved from the parent syscon device or instantiated if none exists. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
| * char: ipmi: constify ipmi_smi_handlers structuresBhumika Goyal2017-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare ipmi_smi_handlers structures as const as they are only passed as an argument to the function ipmi_register_smi. This argument is of type const, so ipmi_smi_handlers structures having similar properties can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct ipmi_smi_handlers i@p={...}; @ok1@ identifier r1.i; position p; @@ ipmi_register_smi(&i@p,...) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct ipmi_smi_handlers i; Size details after cross compiling the .o file for powerpc architecture File size before: text data bss dec hex filename 2777 288 0 3065 bf9 drivers/char/ipmi/ipmi_powernv.o File size after: text data bss dec hex filename 2873 192 0 3065 bf9 drivers/char/ipmi/ipmi_powernv.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
| * acpi:ipmi: Make IPMI user handler constCorey Minyard2017-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | ipmi_create_user() now takes the user handlers as const, make it const in the ACPI IPMI code. Cc: linux-acpi@vger.kernel.org Cc: Zhao Yakui <yakui.zhao@intel.com> Cc: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
| * ipmi: make ipmi_usr_hndl constCorey Minyard2017-01-054-5/+5
| | | | | | | | | | | | It's only function pointers. Signed-off-by: Corey Minyard <cminyard@mvista.com>
| * Documentation: Fix a typo in IPMI.txt.Rami Rosen2017-01-051-1/+1
| | | | | | | | | | | | | | This patch fixes a trivial type in IPMI.txt. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | Merge branch 'idr-4.11' of git://git.infradead.org/users/willy/linux-daxLinus Torvalds2017-02-2856-2077/+1703
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull IDR rewrite from Matthew Wilcox: "The most significant part of the following is the patch to rewrite the IDR & IDA to be clients of the radix tree. But there's much more, including an enhancement of the IDA to be significantly more space efficient, an IDR & IDA test suite, some improvements to the IDR API (and driver changes to take advantage of those improvements), several improvements to the radix tree test suite and RCU annotations. The IDR & IDA rewrite had a good spin in linux-next and Andrew's tree for most of the last cycle. Coupled with the IDR test suite, I feel pretty confident that any remaining bugs are quite hard to hit. 0-day did a great job of watching my git tree and pointing out problems; as it hit them, I added new test-cases to be sure not to be caught the same way twice" Willy goes on to expand a bit on the IDR rewrite rationale: "The radix tree and the IDR use very similar data structures. Merging the two codebases lets us share the memory allocation pools, and results in a net deletion of 500 lines of code. It also opens up the possibility of exposing more of the features of the radix tree to users of the IDR (and I have some interesting patches along those lines waiting for 4.12) It also shrinks the size of the 'struct idr' from 40 bytes to 24 which will shrink a fair few data structures that embed an IDR" * 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax: (32 commits) radix tree test suite: Add config option for map shift idr: Add missing __rcu annotations radix-tree: Fix __rcu annotations radix-tree: Add rcu_dereference and rcu_assign_pointer calls radix tree test suite: Run iteration tests for longer radix tree test suite: Fix split/join memory leaks radix tree test suite: Fix leaks in regression2.c radix tree test suite: Fix leaky tests radix tree test suite: Enable address sanitizer radix_tree_iter_resume: Fix out of bounds error radix-tree: Store a pointer to the root in each node radix-tree: Chain preallocated nodes through ->parent radix tree test suite: Dial down verbosity with -v radix tree test suite: Introduce kmalloc_verbose idr: Return the deleted entry from idr_remove radix tree test suite: Build separate binaries for some tests ida: Use exceptional entries for small IDAs ida: Move ida_bitmap to a percpu variable Reimplement IDR and IDA using the radix tree radix-tree: Add radix_tree_iter_delete ...
| * | radix tree test suite: Add config option for map shiftRehas Sachdeva2017-02-134-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add config option "SHIFT=<value>" to Makefile for building test suite with any value of RADIX_TREE_MAP_SHIFT between 3 and 7 inclusive. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> [mawilcox@microsoft.com: .gitignore, quieten grep, remove on clean] Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | idr: Add missing __rcu annotationsMatthew Wilcox2017-02-132-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | Where we use the radix tree iteration macros, we need to annotate 'slot' with __rcu. Make sure we don't forget any new places in the future with the same CFLAGS check used for radix-tree.c. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix-tree: Fix __rcu annotationsMatthew Wilcox2017-02-133-115/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | Many places were missing __rcu annotations. A few places needed a few lines of explanation about why it was safe to not use RCU accessors. Add a custom CFLAGS setting to the Makefile to ensure that new patches don't miss RCU annotations. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix-tree: Add rcu_dereference and rcu_assign_pointer callsMatthew Wilcox2017-02-132-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | Some of these have been missing for many years. Others were recently introduced by me. Fortunately, we have tools that help us find such things. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Run iteration tests for longerMatthew Wilcox2017-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | If the -l flag is set, run the tests for 100 seconds each instead of the normal 10 seconds. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Fix split/join memory leaksMatthew Wilcox2017-02-131-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The last of the memory leaks in the test suite was a couple of places in the split/join testing where I forgot to free the element being removed from the tree. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Fix leaks in regression2.cMatthew Wilcox2017-02-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | None of the malloc'ed data structures were ever being freed. Found with -fsanitize=address. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Fix leaky testsMatthew Wilcox2017-02-131-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If item_insert() or item_insert_order() failed to insert an item, they would leak the item they had just created. This was causing runaway memory consumption while running the iteration_check testcase, which proves that Ross has too much memory in his workstation ;-) Make sure to free the item on error. Found with -fsanitize=address. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Enable address sanitizerMatthew Wilcox2017-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I was looking for a memory scribble and instead found a pile of memory leaks. Ensure no more occur in future. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix_tree_iter_resume: Fix out of bounds errorMatthew Wilcox2017-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The address sanitizer occasionally finds an out of bounds error while running the test-suite. It turned out to be a read of the pointer immediately next to the tree root, but this out of bounds error could have occurred elsewhere. This happens because radix_tree_iter_resume() dereferences 'slot' before checking whether we've come to the end of the chunk. We can just delete this line; the value was never used. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix-tree: Store a pointer to the root in each nodeMatthew Wilcox2017-02-133-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having this mysterious private_data in each radix_tree_node, store a pointer to the root, which can be useful for debugging. This also relieves the mm code from the duty of updating it. Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix-tree: Chain preallocated nodes through ->parentMatthew Wilcox2017-02-132-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | Chaining through the ->private_data member means we have to zero ->private_data after removing preallocated nodes from the list. We're about to initialise ->parent anyway, so we can avoid zeroing it. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Dial down verbosity with -vRehas Sachdeva2017-02-1310-58/+77
| | | | | | | | | | | | | | | | | | | | | | | | Make the output of radix tree test suite less verbose by default and add -v and -vv command line options for increasing level of verbosity. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Introduce kmalloc_verboseMatthew Wilcox2017-02-132-0/+26
| | | | | | | | | | | | | | | | | | | | | To help track down where memory leaks may be, add the ability to turn on/off printing allocations, frees and delayed frees. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | idr: Return the deleted entry from idr_removeMatthew Wilcox2017-02-139-29/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a relatively common idiom (8 instances) to first look up an IDR entry, and then remove it from the tree if it is found, possibly doing further operations upon the entry afterwards. If we change idr_remove() to return the removed object, all of these users can save themselves a walk of the IDR tree. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Build separate binaries for some testsMatthew Wilcox2017-02-134-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | To allow developers to run a subset of tests, build separate multiorder and idr-test binaries which will run just the tests in those files. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | ida: Use exceptional entries for small IDAsMatthew Wilcox2017-02-133-7/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the root entry as a bitmap and save allocating a 128 byte bitmap for an IDA that contains only a few entries (30 on a 32-bit machine, 62 on a 64-bit machine). This costs about 300 bytes of kernel text on x86-64, so as long as 3 IDAs fall into this category, this is a net win for memory consumption. Thanks to Rasmus Villemoes for his work documenting the problem and collecting statistics on IDAs. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | ida: Move ida_bitmap to a percpu variableMatthew Wilcox2017-02-135-45/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we preload the IDA, we allocate an IDA bitmap. Instead of storing that preallocated bitmap in the IDA, we store it in a percpu variable. Generally there are more IDAs in the system than CPUs, so this cuts down on the number of preallocated bitmaps that are unused, and about half of the IDA users did not call ida_destroy() so they were leaking IDA bitmaps. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | Reimplement IDR and IDA using the radix treeMatthew Wilcox2017-02-1313-1126/+995
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IDR is very similar to the radix tree. It has some functionality that the radix tree did not have (alloc next free, cyclic allocation, a callback-based for_each, destroy tree), which is readily implementable on top of the radix tree. A few small changes were needed in order to use a tag to represent nodes with free space below them. More extensive changes were needed to support storing NULL as a valid entry in an IDR. Plain radix trees still interpret NULL as a not-present entry. The IDA is reimplemented as a client of the newly enhanced radix tree. As in the current implementation, it uses a bitmap at the last level of the tree. Signed-off-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
| * | radix-tree: Add radix_tree_iter_deleteMatthew Wilcox2017-02-132-31/+62
| | | | | | | | | | | | | | | | | | | | | | | | Factor the deletion code out into __radix_tree_delete() and provide a nice iterator-based wrapper around it. If we free the node, advance the iterator to avoid reading from freed memory. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix-tree: Add radix_tree_iter_tag_clear()Matthew Wilcox2017-02-132-29/+43
| | | | | | | | | | | | | | | | | | | | | The counterpart to radix_tree_iter_tag_set(), used by the IDR code Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Remove obsolete CONFIGMatthew Wilcox2017-02-131-2/+0
| | | | | | | | | | | | | | | | | | | | | radix-tree.c doesn't use these CONFIG options any more. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Use vpath to find lib filesMatthew Wilcox2017-02-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Instead of specifying how to build find_bit.o from lib/find_bit.o, use vpath to tell make where to find find_bit.c. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Reduce kernel.hMatthew Wilcox2017-02-133-39/+12
| | | | | | | | | | | | | | | | | | | | | | | | Many of the definitions in the radix-tree kernel.h are redundant with others in tools/include, or are no longer used, such as panic(). Move the definition of __init to init.h and in_interrupt() to preempt.h Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Remove export.hMatthew Wilcox2017-02-131-2/+0
| | | | | | | | | | | | | | | | | | The tools/include export.h contains everything we need. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Remove types.hMatthew Wilcox2017-02-135-23/+12
| | | | | | | | | | | | | | | | | | | | | Move the pieces we still need to tools/include and update a few implicit includes. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Remove mempoolMatthew Wilcox2017-02-132-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | The radix tree hasn't used a mempool since the beginning of git history. Remove the userspace mempool implementation. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | radix tree test suite: Depend on tools/include/asm filesMatthew Wilcox2017-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Changing tools/include/asm/bug.h showed a missing dependency in the Makefile. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
| * | tools: Provide a definition of WARN_ONMatthew Wilcox2017-01-272-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The definition of WARN_ON being used by the radix tree test suite was deficient in two ways: it did not provide a return value, and it stopped execution instead of continuing. This version of WARN_ON tells you which file & line the assertion was triggered in. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree test suite: Remove duplicate bitops codeMatthew Wilcox2017-01-2714-501/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | By adding __set_bit and __clear_bit to the tools include directory, we can share the bitops code. This reveals an include loop between kernel.h, log2.h, bitmap.h and bitops.h. Break it the same way as the kernel does; by moving the kernel.h include from bitops.h to bitmap.h. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree: constify some pointersMatthew Wilcox2017-01-272-37/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we're just getting the value of a tag, or looking up an entry, we won't modify the radix tree, so we can declare these functions as taking a const pointer. Mostly for documentation purposes, though it might help code generation. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
| * | radix tree: Add some implicit includesMatthew Wilcox2017-01-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | We were using spinlock_t and INIT_LIST_HEAD without including spinlock.h or list.h. They were being implicitly included through some other header file, but that's fragile. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
* | | Merge tag 'iommu-fix-v4.11-rc0-2' of ↵Linus Torvalds2017-02-283-8/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Fix an issue introduced this merge window into the AMD and Intel IOMMU drivers that causes an oops when the vendor-specific sysfs-entries are accessed. The reason for this issue is that I forgot to update the sysfs code in the drivers when moving the iommu 'struct device' to the iommu-core" * tag 'iommu-fix-v4.11-rc0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix crash when accessing AMD-Vi sysfs entries iommu/vt-d: Fix crash when accessing VT-d sysfs entries
| * | | iommu/amd: Fix crash when accessing AMD-Vi sysfs entriesJoerg Roedel2017-02-282-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The link between the iommu sysfs-device and the struct amd_iommu is no longer stored as driver-data. Update the code to the new correct way of getting from device to amd_iommu. Reported-by: Dave Jones <davej@codemonkey.org.uk> Fixes: 39ab9555c241 ('iommu: Add sysfs bindings for struct iommu_device') Signed-off-by: Joerg Roedel <jroedel@suse.de>
| * | | iommu/vt-d: Fix crash when accessing VT-d sysfs entriesJoerg Roedel2017-02-281-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The link between the iommu sysfs-device and the struct intel_iommu is no longer stored as driver-data. Update the code to use the new access method. Reported-by: Dave Jones <davej@codemonkey.org.uk> Fixes: 39ab9555c241 ('iommu: Add sysfs bindings for struct iommu_device') Signed-off-by: Joerg Roedel <jroedel@suse.de>
* | | | Merge tag 'nfsd-4.11' of git://linux-nfs.org/~bfields/linuxLinus Torvalds2017-02-2833-431/+510
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull nfsd updates from Bruce Fields: "The nfsd update this round is mainly a lot of miscellaneous cleanups and bugfixes. A couple changes could theoretically break working setups on upgrade. I don't expect complaints in practice, but they seem worth calling out just in case: - NFS security labels are now off by default; a new security_label export flag reenables it per export. But, having them on by default is a disaster, as it generally only makes sense if all your clients and servers have similar enough selinux policies. Thanks to Jason Tibbitts for pointing this out. - NFSv4/UDP support is off. It was never really supported, and the spec explicitly forbids it. We only ever left it on out of laziness; thanks to Jeff Layton for finally fixing that" * tag 'nfsd-4.11' of git://linux-nfs.org/~bfields/linux: (34 commits) nfsd: Fix display of the version string nfsd: fix configuration of supported minor versions sunrpc: don't register UDP port with rpcbind when version needs congestion control nfs/nfsd/sunrpc: enforce transport requirements for NFSv4 sunrpc: flag transports as having congestion control sunrpc: turn bitfield flags in svc_version into bools nfsd: remove superfluous KERN_INFO nfsd: special case truncates some more nfsd: minor nfsd_setattr cleanup NFSD: Reserve adequate space for LOCKT operation NFSD: Get response size before operation for all RPCs nfsd/callback: Drop a useless data copy when comparing sessionid nfsd/callback: skip the callback tag nfsd/callback: Cleanup callback cred on shutdown nfsd/idmap: return nfserr_inval for 0-length names SUNRPC/Cache: Always treat the invalid cache as unexpired SUNRPC: Drop all entries from cache_detail when cache_purge() svcrdma: Poll CQs in "workqueue" mode svcrdma: Combine list fields in struct svc_rdma_op_ctxt svcrdma: Remove unused sc_dto_q field ...
| * | | | nfsd: Fix display of the version stringTrond Myklebust2017-02-271-30/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current display code assumes that v4 minor version 0 is tracked by the call to nfsd_vers(). Now it is tracked by nfsd_minorversion(), and so we need to adjust the display code. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * | | | nfsd: fix configuration of supported minor versionsTrond Myklebust2017-02-272-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user turns off all minor versions of NFSv4, that should be equivalent to turning off NFSv4 support, so a mount attempt using NFSv4 should get RPC_PROG_MISMATCH, not NFSERR_MINOR_VERS_MISMATCH. Allow the user to use either '4.0' or '4' to enable or disable minor version 0. Other minor versions are still enabled or disabled using the '4.x' format. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>