aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-08-22kconfig: improve the recursive dependency reportMasahiro Yamada2-17/+37
This commit improves the messages of the recursive dependency. Currently, sym->dir_dep.expr is not checked. Hence, any dependency in property visibility is regarded as the dependency of the symbol. [Test Code 1] config A bool "a" depends on B config B bool "b" depends on A [Test Code 2] config A bool "a" if B config B bool "b" depends on A For both cases above, the same message is displayed: symbol B depends on A symbol A depends on B This commit changes the message for the latter, like this: symbol B depends on A symbol A prompt is visible depending on B Also, 'select' and 'imply' are distinguished. Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Dirk Gouders <[email protected]>
2018-08-22kconfig: report recursive dependency involving 'imply'Masahiro Yamada4-20/+33
Currently, Kconfig does not complain about the recursive dependency where 'imply' keywords are involved. [Test Code] config A bool "a" config B bool "b" imply A depends on A In the code above, Kconfig cannot calculate the symbol values correctly due to the circular dependency. For example, allyesconfig followed by syncconfig results in an odd behavior because CONFIG_B becomes visible in syncconfig. $ make allyesconfig scripts/kconfig/conf --allyesconfig Kconfig # # configuration written to .config # $ cat .config # # Automatically generated file; DO NOT EDIT. # Main menu # CONFIG_A=y $ make syncconfig scripts/kconfig/conf --syncconfig Kconfig * * Restart config... * * * Main menu * a (A) [Y/n/?] y b (B) [N/y/?] (NEW) To detect this correctly, sym_check_expr_deps() should recurse to not only sym->rev_dep.expr but also sym->implied.expr . At this moment, sym_check_print_recursive() cannot distinguish 'select' and 'imply' since it does not know the precise context where the recursive dependency has been hit. This will be solved by the next commit. In fact, even the document and the unit-test are confused. Using 'imply' does not solve recursive dependency since 'imply' addresses the unmet direct dependency, which 'select' could cause. Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Dirk Gouders <[email protected]>
2018-08-22kconfig: error out when seeing recursive dependencyMasahiro Yamada5-12/+10
Originally, recursive dependency was a fatal error for Kconfig because Kconfig cannot compute symbol values in such a situation. Commit d595cea62403 ("kconfig: print more info when we see a recursive dependency") changed it to a warning, which I guess was not intentional. Get it back to an error again. Also, rename the unit test directory "warn_recursive_dep" to "err_recursive_dep" so that it matches to the behavior. Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Dirk Gouders <[email protected]>
2018-08-22kconfig: add build-only configurator targetsRandy Dunlap1-1/+10
Add build-only targets for build_menuconfig, build_nconfig, build_xconfig, and build_gconfig. (targets must end in "config" to qualify in top-level Makefile) This allows these target to be built without execution (e.g., to look for errors or warnings) and/or to be built and checked by sparse. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
2018-08-22scripts/dtc: consolidate include path options in MakefileMasahiro Yamada1-14/+4
It is tedious to specify extra compiler options for every file. HOST_EXTRACFLAGS is useful to add options to all files in a directory. -I$(src)/libfdt is needed for all the files in this directory to include libfdt_env.h etc. from scripts/dtc/libfdt/. On the other hand, -I$(src) is used to include check-in headers from generated C files. Thus, I added it only to dtc-lexer.lex.o and dtc-parser.tab.o . Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2018-08-22Merge tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linuxLinus Torvalds9-53/+31
Pull arch/h8300 updates from Yoshinori Sato. * tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux: h8300: fix IRQ no arch/h8300: add a defconfig target arch/h8300: eliminate kgbd.c warning arch/h8300: eliminate ptrace.h warnings h8300:let the checker know that size_t is ulong h8300: Don't include linux/kernel.h in asm/atomic.h h8300: remove unnecessary of_platform_populate call h8300: Correct signature of test_bit() h8300: irqchip: fix warning h8300: switch to NO_BOOTMEM h8300: gcc-8.1 fix h8300: Add missing output register.
2018-08-22y2038: Provide aliases for compat helpersArnd Bergmann1-0/+15
As part of the system call rework for 64-bit time_t, we are restructuring the way that compat syscalls deal with 32-bit time_t, reusing the implementation for 32-bit architectures. Christoph Hellwig suggested a rename of the associated types and interfaces to avoid the confusing usage of the 'compat' prefix for 32-bit architectures. To prepare for doing that in linux-4.20, add a set of macros that allows to convert subsystems separately to the new names and avoids some of the nastier merge conflicts. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Christoph Hellwig <[email protected]> Cc: [email protected] Cc: John Stultz <[email protected]> Cc: Deepa Dinamani <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2018-08-22KVM: Documentation: rename the capability of KVM_CAP_ARM_SET_SERROR_ESRDongjiu Geng1-3/+3
In the documentation description, this capability's name is KVM_CAP_ARM_SET_SERROR_ESR, but in the header file this capability's name is KVM_CAP_ARM_INJECT_SERROR_ESR, so change the documentation description to make it same. Signed-off-by: Dongjiu Geng <[email protected]> Reported-by: Andrew Jones <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
2018-08-22Merge tag 'kvmarm-for-v4.19' of ↵Paolo Bonzini43-173/+834
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm updates for 4.19 - Support for Group0 interrupts in guests - Cache management optimizations for ARMv8.4 systems - Userspace interface for RAS, allowing error retrival and injection - Fault path optimization - Emulated physical timer fixes - Random cleanups
2018-08-22platform/x86: acer-wmi: Silence "unsupported" message a bitBenjamin Herrenschmidt1-1/+1
This driver prints that "Unsupported machine..." message on every boot on ThinkPad X1 Carbon laptops (and I assume a number of other systems), which causes graphical boots to "glitch" a bit and is rather annoying ... Make it a pr_debug instead. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2018-08-22h8300: fix IRQ noYoshinori Sato1-1/+1
Old timer handler use 24 (Compare match A). But current timer handler use 26 (Overflow). Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22arch/h8300: add a defconfig targetRandy Dunlap1-0/+2
Make the "defconfig" target valid for arch/h8300. Currently "make ARCH=h8300 defconfig" produces: *** Can't find default configuration "arch/h8300/defconfig"! ../scripts/kconfig/Makefile:87: recipe for target 'defconfig' failed By adding a value for KBUILD_DEFCONFIG, "make ARCH=h8300 defconfig" successfully produces a kernel .config file: *** Default configuration is based on 'edosk2674_defconfig' This is useful for Kconfig editing/testing. Signed-off-by: Randy Dunlap <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: [email protected] (moderated for non-subscribers) Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22arch/h8300: eliminate kgbd.c warningRandy Dunlap1-1/+1
Drop the "const" qualifier from arch_kgdb_ops to eliminate the gcc warning (gcc version is 8.1.0). arch/h8300/kernel/kgdb.c:132:24: error: conflicting type qualifiers for 'arch_kgdb_ops' const struct kgdb_arch arch_kgdb_ops = { In file included from ../arch/h8300/kernel/kgdb.c:12: ../include/linux/kgdb.h:284:26: note: previous declaration of 'arch_kgdb_ops' was here extern struct kgdb_arch arch_kgdb_ops; Signed-off-by: Randy Dunlap <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: [email protected] Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22arch/h8300: eliminate ptrace.h warningsRandy Dunlap1-0/+2
Add a "struct task_struct;" stub to arch/h8300's ptrace.h header to eliminate gcc warnings (gcc version is 8.1.0). ../arch/h8300/include/asm/ptrace.h:32:34: warning: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration extern long h8300_get_reg(struct task_struct *task, int regno); ../arch/h8300/include/asm/ptrace.h:33:33: warning: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration extern int h8300_put_reg(struct task_struct *task, int regno, Signed-off-by: Randy Dunlap <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: [email protected] Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300:let the checker know that size_t is ulongLuc Van Oostenryck1-0/+2
All 64bit archs use unsigned long for size_t and most 32bit archs use 'unsigned int'. By default, this is what is assumed by sparse. However, on h8300 (a 32bit arch) size_t is unsigned long which can led sparse to emit wrong warnings. Fix this by passing to sparse the flag -msize-long, telling it that size_t is unsigned long. Signed-off-by: Luc Van Oostenryck <[email protected]> Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300: Don't include linux/kernel.h in asm/atomic.hWill Deacon1-2/+2
linux/kernel.h isn't needed by asm/atomic.h and will result in circular dependencies when the asm-generic atomic bitops are built around the tomic_long_t interface. Remove the broad include and replace it with linux/compiler.h for READ_ONCE etc and asm/irqflags.h for arch_local_irq_save etc. Cc: Yoshinori Sato <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300: remove unnecessary of_platform_populate callRob Herring1-10/+0
The DT core will call of_platform_populate, so it is not necessary for arch specific code to call it unless there are custom match entries, auxdata or parent device. Neither of those apply here, so remove the call. Cc: Yoshinori Sato <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300: Correct signature of test_bit()Geert Uytterhoeven1-1/+1
mm/filemap.c: In function 'clear_bit_unlock_is_negative_byte': mm/filemap.c:1181:30: warning: passing argument 2 of 'test_bit' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] return test_bit(PG_waiters, mem); ^~~ In file included from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/wait.h:7, from include/linux/wait_bit.h:8, from include/linux/fs.h:6, from include/linux/dax.h:5, from mm/filemap.c:14: arch/h8300/include/asm/bitops.h:69:57: note: expected 'const long unsigned int *' but argument is of type 'volatile void *' static inline int test_bit(int nr, const unsigned long *addr) ~~~~~~~~~~~~~~~~~~~~~^~~~ Make the bitmask pointed to by the "addr" parameter volatile to fix this, like is done on other architectures. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300: irqchip: fix warningYoshinori Sato1-3/+3
Var "addr" type incorrect. It have interrupt controler register address. Type of void __iomem is correct. Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300: switch to NO_BOOTMEMRob Herring2-28/+9
Commit 0fa1c579349f ("of/fdt: use memblock_virt_alloc for early alloc") inadvertently switched the DT unflattening allocations from memblock to bootmem which doesn't work because the unflattening happens before bootmem is initialized. Swapping the order of bootmem init and unflattening could also fix this, but removing bootmem is desired. So enable NO_BOOTMEM on h8300 like other architectures have done. Fixes: 0fa1c579349f ("of/fdt: use memblock_virt_alloc for early alloc") Cc: Yoshinori Sato <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300: gcc-8.1 fixYoshinori Sato1-3/+4
Since gcc 8.1 does not generate an assignment statement to er 0, we had to explicitly write it. Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-22h8300: Add missing output register.Yoshinori Sato1-6/+6
Signed-off-by: Yoshinori Sato <[email protected]>
2018-08-21ida: Change ida_get_new_above to return the idMatthew Wilcox1-18/+12
This calling convention makes more sense for the implementation as well as the callers. It even shaves 32 bytes off the compiled code size. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21ida: Remove old APIMatthew Wilcox3-67/+11
Delete ida_pre_get(), ida_get_new(), ida_get_new_above() and ida_remove() from the public API. Some of these functions still exist as internal helpers, but they should not be called by consumers. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21test_ida: check_ida_destroy and check_ida_allocMatthew Wilcox2-66/+58
Move these tests from the userspace test-suite to the kernel test-suite. Also convert check_ida_random to the new API. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21test_ida: Convert check_ida_conv to new APIMatthew Wilcox2-46/+40
Move as much as possible to kernel space; leave the parts in user space that rely on checking memory allocation failures to detect the transition between an exceptional entry and a bitmap. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21test_ida: Move ida_check_maxMatthew Wilcox2-28/+23
Convert to new API and move to kernel space. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21test_ida: Move ida_check_leafMatthew Wilcox2-27/+25
Convert to new API and move to kernel space. Take the opportunity to test the situation a little more thoroughly (ie at different offsets). Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21idr-test: Convert ida_check_nomem to new APIMatthew Wilcox1-6/+7
We can't move this test to kernel space because there's no way to force kmalloc to fail. But we can use the new API and check this works when the test is in userspace. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21ida: Start new test_ida moduleMatthew Wilcox7-7/+71
Start transitioning the IDA tests into kernel space. Framework heavily cribbed from test_xarray.c. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21target/iscsi: Allocate session IDs from an IDAMatthew Wilcox3-30/+10
Since the session is never looked up by ID, we can use the more space-efficient IDA instead of the IDR. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21iscsi target: fix session creation failure handlingMike Christie1-14/+21
The problem is that iscsi_login_zero_tsih_s1 sets conn->sess early in iscsi_login_set_conn_values. If the function fails later like when we alloc the idr it does kfree(sess) and leaves the conn->sess pointer set. iscsi_login_zero_tsih_s1 then returns -Exyz and we then call iscsi_target_login_sess_out and access the freed memory. This patch has iscsi_login_zero_tsih_s1 either completely setup the session or completely tear it down, so later in iscsi_target_login_sess_out we can just check for it being set to the connection. Cc: [email protected] Fixes: 0957627a9960 ("iscsi-target: Fix sess allocation leak in...") Signed-off-by: Mike Christie <[email protected]> Acked-by: Martin K. Petersen <[email protected]> Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21drm/vmwgfx: Convert to new IDA APIMatthew Wilcox1-29/+12
Reorder allocation to avoid an awkward lock/unlock/lock sequence. Simpler code due to being able to use ida_alloc_max(), even if we can't eliminate the driver's spinlock. Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
2018-08-21dmaengine: Convert to new IDA APIMatthew Wilcox1-16/+7
Simpler and shorter code. Signed-off-by: Matthew Wilcox <[email protected]> Acked-by: Vinod Koul <[email protected]>
2018-08-21ppc: Convert vas ID allocation to new IDA APIMatthew Wilcox1-22/+4
Removes a custom spinlock and simplifies the code. Also fix an error where we could allocate one ID too many. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21media: Convert entity ID allocation to new IDA APIMatthew Wilcox1-11/+5
Removes a call to ida_pre_get(). Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]>
2018-08-21ppc: Convert mmu context allocation to new IDA APIMatthew Wilcox1-40/+4
ida_alloc_range is the perfect fit for this use case. Eliminates a custom spinlock, a call to ida_pre_get and a local check for the allocated ID exceeding a maximum. Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Nicholas Piggin <[email protected]>
2018-08-21Convert net_namespace to new IDA APIMatthew Wilcox1-10/+6
Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21cb710: Convert to new IDA APIMatthew Wilcox1-18/+5
Eliminates the custom spinlock and the call to ida_pre_get. Signed-off-by: Matthew Wilcox <[email protected]> Acked-by: Michał Mirosław <[email protected]>
2018-08-21rsxx: Convert to new IDA APIMatthew Wilcox1-16/+5
Eliminate the custom spinlock and the call to ida_pre_get. Also add a call to ida_free() in the card remove routine, which I believe fixes a bug in this driver. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21osd: Convert to new IDA APIMatthew Wilcox1-15/+7
Slightly simpler code. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21sd: Convert to new IDA APIMatthew Wilcox1-17/+4
Allows us to remove an explicit spinlock. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21devpts: Convert to new IDA APIMatthew Wilcox1-34/+13
ida_alloc_max() matches what this driver wants to do. Also removes a call to ida_pre_get(). We no longer need the protection of the mutex, so convert pty_count to an atomic_t and remove the mutex entirely. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21fs: Convert namespace IDAs to new APIMatthew Wilcox1-38/+12
We don't need to keep track of the starting value; the IDA is efficient. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21fs: Convert unnamed_dev_ida to new APIMatthew Wilcox1-43/+24
The new API is much easier for this user. Also add kerneldoc for get_anon_bdev(). Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21mtip32xx: Convert to new IDA APIMatthew Wilcox1-23/+6
Removes a use of ida_pre_get() and a personalised spinlock. Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]>
2018-08-21ida: Add new APIMatthew Wilcox2-42/+87
Add ida_alloc(), ida_alloc_min(), ida_alloc_max(), ida_alloc_range() and ida_free(). The ida_alloc_max() and ida_alloc_range() functions differ from ida_simple_get() in that they take an inclusive 'max' parameter instead of an exclusive 'end' parameter. Callers are about evenly split whether they'd like inclusive or exclusive parameters and 'max' is easier to document than 'end'. Change the IDA allocation to first attempt to allocate a bit using existing memory, and only allocate memory afterwards. Also change the behaviour of 'min' > INT_MAX from being a BUG() to returning -ENOSPC. Leave compatibility wrappers in place for ida_simple_get() and ida_simple_remove() to avoid changing all callers. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21ida: Lock the IDA in ida_destroyMatthew Wilcox1-6/+11
The user has no need to handle locking between ida_simple_get() and ida_simple_remove(). They shouldn't be forced to think about whether ida_destroy() might be called at the same time as any of their other IDA manipulation calls. Improve the documnetation while I'm in here. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21radix-tree: Fix UBSAN warningMatthew Wilcox1-1/+1
get_slot_offset() can be called with a NULL 'parent' argument. In this case, the calculated value will not be used, but calculating it is undefined. Rather than fixing the caller (__radix_tree_delete) to not call get_slot_offset(), make get_slot_offset() robust against being called with a NULL parent. Signed-off-by: Matthew Wilcox <[email protected]>
2018-08-21radix tree test suite: Enable ubsanMatthew Wilcox2-11/+14
Add support for the undefined behaviour sanitizer and fix the bugs that ubsan pointed out. Nothing major, and all in the test suite, not the code. Signed-off-by: Matthew Wilcox <[email protected]>