summaryrefslogtreecommitdiffstats
path: root/include/linux
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/net-switch-mv88e6xxx'Sascha Hauer2018-11-093-0/+24
|\
| * include: linux: ethtool: Add missing *_UNKNOWN constantsAndrey Smirnov2018-10-181-0/+3
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * include: linux: phy: Add missing PHY_INTERFACE_* constantsAndrey Smirnov2018-10-181-0/+9
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * linux: string: Port kbasename()Andrey Smirnov2018-10-181-0/+12
| | | | | | | | | | | | | | | | Port kbasename() from Linux and use it to implement basename() we already have. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-11-091-0/+101
|\ \
| * | lib: Port CRC8 implementation from Linux kernelAndrey Smirnov2018-11-061-0/+101
| |/ | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gpio'Sascha Hauer2018-11-093-0/+106
|\ \
| * | lib: Port kstrtox.c from Linux kernelAndrey Smirnov2018-10-292-0/+97
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | linux/ctype.h: Port _tolower()Andrey Smirnov2018-10-291-0/+9
| |/ | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / fs: implement d_revalidateSascha Hauer2018-10-291-0/+3
|/ | | | | | | d_revalidate is useful when filesystems change under the hood of the fs layer. This can happen with network filesystems or with devfs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* compiler: Update to v4.19-rc6Sascha Hauer2018-10-085-457/+535
| | | | | | | | This updates include/linux/compiler* to Linux-4.19-rc6. Among other things this gives us __printf Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement clear_nlink and set_nlinkSascha Hauer2018-10-081-0/+2
| | | | | | | Implement clear_nlink and set_nlink and remove the private versions from UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement iget_locked and iget_failedSascha Hauer2018-10-081-0/+2
| | | | | | Implement in fs core rather than using a private version in UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement file_inodeSascha Hauer2018-10-081-0/+5
| | | | | | To ease code porting from Linux Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Add SB_* flagsSascha Hauer2018-10-081-0/+19
| | | | | | | Newer Kernel fs code uses SB_* flags rather than the same MS_* flags. Add them to barebox to make porting code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Add fscrypt no-op headersSascha Hauer2018-10-082-0/+378
| | | | | | Newer versions of UBIFS use fscrypt, so add no-op headers here. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: let dir_emit_dots return intSascha Hauer2018-10-081-1/+2
| | | | | | | Change to the same prototype as the kernel to make code porting easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add more mutex no-opsSascha Hauer2018-10-081-0/+3
| | | | | | | Add mutex_lock_nested, mutex_unlock_nested and mutex_is_locked to include/linux/mutex.h and remove them from UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add kmemdupSascha Hauer2018-10-081-0/+7
| | | | | | | | We have kmemdup as a UBIFS specific variant, put it into the correct header files. Instead of reimplementing it just use memdup we already have. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add linux/slab.hSascha Hauer2018-10-083-12/+108
| | | | | | | | | Move stuff we already have in include/linux/barebox-wrapper.h that really belongs to include/linux/slab.h to there. Also add kmem_cache_* functions. UBIFS uses them in there own implementation, so we have to remove it there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: rave-sp: Add mapping for legacy EEPROM commandAndrey Smirnov2018-08-311-0/+1
| | | | | | | | | | | | This is needed to make rave-sp-eeprom driver work on "legacy" firmware. This is a backport of Linux kernel patch [1] [1] https://lore.kernel.org/lkml/20180707024108.32373-5-andrew.smirnov@gmail.com/T/#mae2272763ae092b5b11ab128f5c22039d55557cb Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scsi: ilog2: create truly constant version for sparseMartin Wilck2018-08-241-11/+24
| | | | | | | | | | | | | | | | | | Sparse emits errors about ilog2() in array indices because of the use of __ilog2_32() and __ilog2_64(), rightly so (https://www.spinics.net/lists/linux-sparse/msg03471.html). Create a const_ilog2() variant that works with sparse for this scenario. (Note: checkpatch.pl complains about missing parentheses, but that appears to be a false positive. I can get rid of the warning simply by inserting whitespace, making checkpatch "see" the whole macro). Signed-off-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> [andrew.smirnov@gmail.com: Applied kernel patch to Barebox as-is] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* linux/log2.h: fix kernel-doc notationRandy Dunlap2018-08-241-19/+23
| | | | | | | | | | | | Fix <linux/log2.h> kernel-doc: - Add kernel-doc notation to some functions. - Fix kernel-doc notation in function parameters. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> [andrew.smirnov@gmail.com: Applied kernel patch to Barebox as-is] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* log2: Use fls_long() in __roundup_pow_of_two()Andrey Smirnov2018-08-241-1/+1
| | | | | | | | | Convert __roundup_pow_of_two() to use fls_long() instead of fls() so the code would be identical to that found in Linux. This fix also allowed next patch(taken from Linux kernel verbatim) to apply cleanly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* give up on gcc ilog2() constant optimizationsLinus Torvalds2018-08-241-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc-7 has an "optimization" pass that completely screws up, and generates the code expansion for the (impossible) case of calling ilog2() with a zero constant, even when the code gcc compiles does not actually have a zero constant. And we try to generate a compile-time error for anybody doing ilog2() on a constant where that doesn't make sense (be it zero or negative). So now gcc7 will fail the build due to our sanity checking, because it created that constant-zero case that didn't actually exist in the source code. There's a whole long discussion on the kernel mailing about how to work around this gcc bug. The gcc people themselevs have discussed their "feature" in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 but it's all water under the bridge, because while it looked at one point like it would be solved by the time gcc7 was released, that was not to be. So now we have to deal with this compiler braindamage. And the only simple approach seems to be to just delete the code that tries to warn about bad uses of ilog2(). So now "ilog2()" will just return 0 not just for the value 1, but for any non-positive value too. It's not like I can recall anybody having ever actually tried to use this function on any invalid value, but maybe the sanity check just meant that such code never made it out in public. Reported-by: Laura Abbott <labbott@redhat.com> Cc: John Stultz <john.stultz@linaro.org>, Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> [andrew.smirnov@gmail.com: Applied kernel patch to Barebox as-is, but specifying --exclude=tools/include/linux/log2.h] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* log2: make order_base_2() behave correctly on const input value zeroArd Biesheuvel2018-08-241-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function order_base_2() is defined (according to the comment block) as returning zero on input zero, but subsequently passes the input into roundup_pow_of_two(), which is explicitly undefined for input zero. This has gone unnoticed until now, but optimization passes in GCC 7 may produce constant folded function instances where a constant value of zero is passed into order_base_2(), resulting in link errors against the deliberately undefined '____ilog2_NaN'. So update order_base_2() to adhere to its own documented interface. [ See http://marc.info/?l=linux-kernel&m=147672952517795&w=2 and follow-up discussion for more background. The gcc "optimization pass" is really just broken, but now the GCC trunk problem seems to have escaped out of just specially built daily images, so we need to work around it in mainline. - Linus ] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> [andrew.smirnov@gmail.com: Applied kernel patch to Barebox as-is] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pci'Sascha Hauer2018-08-131-0/+54
|\
| * pci: add quirk infrastructureLucas Stach2018-08-081-0/+54
| | | | | | | | | | | | | | | | | | This is a cut down version of the Linux kernel PCI quirk infrastructure, which allows to register and execute some fixups before the driver is loaded. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-08-131-0/+135
|\ \
| * | ARM: Add code to support SMCCC on AArch64Andrey Smirnov2018-08-081-0/+135
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Port SMCCC code from Linux kernel. To accomodate that: - Introduce CONFIG_ARM_SMCCC, to allow enabling the code independent of CONFIG_ARM_SECURE_MONITOR - Bring <linux/arm-smccc.h> in - Add necessary constants to arch/arm/asm-offsets.c Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / fs: dentry cache implementationSascha Hauer2018-07-115-41/+256
|/ | | | | | | | | | | | | | | | | | | | | | | This adds the Linux dentry cache implementation to barebox. Until now every filesystem driver resolves the full path to a file for itself. This leads to code duplication and is error prone since resolving paths is a complicated task. Also it can narrow down the lookup performance since barebox only knows ASCII paths and has no way of caching lookups. With this patch we get the Linux dcache implementation. The path resolving code from fs/namei.c is nearly taken as-is, minus the RCU and locking code. Dcaching is made simple as of now: We simply cache everything and never release any dentries. Although we do reference counting for inodes and dentries it is effectively not used yet. We never free anything until a fs is unmounted in which case we free everything no matter if references are taken or not. This patch also contains a wrapper in fs/legacy.c to support filesystems with the old API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx8mq'Sascha Hauer2018-07-091-0/+75
|\
| * Port <linux/iopoll.h> from U-BootAndrey Smirnov2018-06-151-0/+75
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | nvmem: Introduce nvmem_cell_get_and_read()Andrey Smirnov2018-06-291-0/+10
|/ | | | | | | | | Introduce nvmem_cell_get_and_read() that combines getting a NVMEM cell by name and reading its contents. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sizes.h: Sync with Linux 4.16Andrey Smirnov2018-05-181-0/+4
| | | | | | | Sync with Linux 4.16 to get SZ_4G. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2018-05-091-0/+78
|\
| * mfd: Port RAVE SP driver from Linux kernelAndrey Smirnov2018-05-041-0/+78
| | | | | | | | | | | | | | Port MFD driver for RAVE SP from Linux kernel. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | include: Port linux/bitfield.h from Linux kernelAndrey Smirnov2018-04-171-0/+152
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | include: Port linux/build_bug.h from Linux kernelAndrey Smirnov2018-04-172-24/+84
|/ | | | | | | Port linux/build_bug.h needed by some of more recent kernel code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2018-04-061-0/+1
|\
| * mtd: nand: Add Winbond manufacturer IDStefan Riedmueller2018-03-221-0/+1
| | | | | | | | | | | | | | | | Add Winbond 0xef manufacturer ID for NAND flashes to support Winbond as an additional manufacturer. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-04-061-0/+23
|\ \
| * | lib: Port CRC-CCITT functions from Linux kernelAndrey Smirnov2018-04-031-0/+23
| |/ | | | | | | | | | | | | | | Port CRC-CCITT implemenation in order to support porting MFD driver for RAVE SP. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-04-061-0/+1
|\ \
| * | clk: Forward declare struct of_device_id in linux/clk.hAndrey Smirnov2018-04-031-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Forward declare struct of_device_id in linux/clk.h in order to avoid warnings like the following: warning: 'struct of_device_id' declared inside parameter list will not be visible outside of this definition or declaration int of_clk_init(struct device_node *root, const struct of_device_id *matches); ^~~~~~~~~~~~ Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / fs: Add super_operationsSascha Hauer2018-04-061-0/+5
|/ | | | | | | | Add a struct super_operations we can use later when we get a fs implementation closer to Linux. Only add the functions we'll likely need though. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: Add zstd decompression modulePhilipp Zabel2018-02-051-0/+1157
| | | | | | | Based on kernel commit 73f3d1b48f50 ("lib: Add zstd modules"). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: Add xxhash modulePhilipp Zabel2018-02-051-0/+236
| | | | | | | Based on kernel commit 5d2405227a9e ("lib: Add xxhash module"). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include linux/compiler.h in linux/unaligned/generic.hPhilipp Zabel2018-02-051-0/+2
| | | | | | | | Without this include, the __force macro used in this header may be undefined. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: add missing stub for reset_control_getLucas Stach2018-02-051-0/+7
| | | | | | Fixes: 45b95b50cd0b (reset: add reset controller framework) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>