On 24/03/2021 03.04, Stephen Boyd wrote:
> @@ -2778,6 +2793,10 @@ static inline void layout_symtab(struct module *mod,
> struct load_info *info)
> static void add_kallsyms(struct module *mod, const struct load_info *info)
> {
> }
> +
> +static void init_build_id(struct module *mod, const struc
On 03/07/2020 14.29, Jonathan Corbet wrote:
[doing a bit of necromancy here]
> On Fri, 3 Jul 2020 00:31:43 -0700
> Danny Lin wrote:
>
>> EditorConfig is a standard for defining basic editor configuration in
>> projects. There is support available for 47 code editors as of writing,
>> including
On 23/03/2021 08.47, Peter Zijlstra wrote:
> On Mon, Mar 22, 2021 at 05:29:21PM -0400, Steven Rostedt wrote:
>> On Mon, 22 Mar 2021 22:18:17 +0100
>> Arnd Bergmann wrote:
>>
>>> I think the code works correctly on all architectures we support because
>>> both 'int' and 'long' are returned in a reg
-qualified argument 1 was declared here
> 464 | char set_link_str[SET_LINK_STR_MAX_LEN] = {0};
>
> Rewrite this to avoid the nested sprintf and instead use separate
> buffers, which is simpler.
>
This looks much better. Thanks.
> Cc: Rasmus Villemoes
> Signed-off-by: Arnd Be
On 24/03/2021 14.33, Arnd Bergmann wrote:
> On Tue, Mar 23, 2021 at 4:57 PM Rasmus Villemoes
> wrote:
>> On 23/03/2021 14.04, Arnd Bergmann wrote:
>>> if (securedisplay_cmd->status ==
>>> TA_SECUREDISPLAY_STATUS__SUCCESS) {
>>>
On 23/03/2021 21.39, Sami Tolvanen wrote:
> With CONFIG_CFI_CLANG, the compiler replaces a function address taken
> in C code with the address of a local jump table entry, which passes
> runtime indirect call checks. However, the compiler won't replace
> addresses taken in assembly code, which will
On 24/03/2021 17.01, Sami Tolvanen wrote:
> On Wed, Mar 24, 2021 at 5:46 AM Rasmus Villemoes
> wrote:
>>
>> On 23/03/2021 08.47, Peter Zijlstra wrote:
>>> On Mon, Mar 22, 2021 at 05:29:21PM -0400, Steven Rostedt wrote:
>>>> On Mon, 22 Mar 2021 2
On 24/03/2021 18.20, Joe Perches wrote:
> On Wed, 2021-03-24 at 09:52 -0700, Joe Perches wrote:
>> On Wed, 2021-03-24 at 17:42 +0100, Arnd Bergmann wrote:
>>> On Wed, Mar 24, 2021 at 3:20 PM Joe Perches wrote:
>> []
> diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
>
On 24/03/2021 20.24, Joe Perches wrote:
> On Wed, 2021-03-24 at 18:33 +0100, Rasmus Villemoes wrote:
>> On 24/03/2021 18.20, Joe Perches wrote:
>>
>>>
>>> Maybe it's better to output non PTR_ERR %pe uses as decimal so this
>>> sort of code would work
On 24/03/2021 18.33, Peter Zijlstra wrote:
> On Wed, Mar 24, 2021 at 05:45:52PM +0100, Rasmus Villemoes wrote:
>> Sorry, I think I misread the code. The static calls are indeed
>> initialized with a function with the right prototype. Try adding
>> "preempt=full"
On 24/03/2021 20.11, Stephen Boyd wrote:
> Quoting Rasmus Villemoes (2021-03-24 02:57:13)
>>
>> Is there any reason you didn't just make b an optional flag that could
>> be specified with or without R? I suppose the parsing is more difficult
>> with several orth
On 24/03/2021 23.18, Joe Perches wrote:
> On Wed, 2021-03-24 at 22:27 +0100, Rasmus Villemoes wrote:
>> On 24/03/2021 20.24, Joe Perches wrote:
>>> On Wed, 2021-03-24 at 18:33 +0100, Rasmus Villemoes wrote:
>>>> On 24/03/2021 18.20, Joe Perches wrote:
>>>&g
On 24/03/2021 23.34, Sami Tolvanen wrote:
> On Wed, Mar 24, 2021 at 2:51 PM Rasmus Villemoes
> wrote:
>>
>> On 24/03/2021 18.33, Peter Zijlstra wrote:
>>> On Wed, Mar 24, 2021 at 05:45:52PM +0100, Rasmus Villemoes wrote:
>>>> Sorry, I think I misrea
On 25/03/2021 00.40, Sami Tolvanen wrote:
> On Wed, Mar 24, 2021 at 3:53 PM Rasmus Villemoes
> wrote:
>>
>> On 24/03/2021 23.34, Sami Tolvanen wrote:
>>> On Wed, Mar 24, 2021 at 2:51 PM Rasmus Villemoes
>>> wrote:
>>>>
>>>> On 24/03/202
Use the enum names which are also what is used in the switch() in
sched_dynamic_update().
Signed-off-by: Rasmus Villemoes
---
kernel/sched/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 98191218d891..3959481261bb
-1 is -EPERM which is a somewhat odd error to return from
sched_dynamic_write(). No other callers care about which negative
value is used.
Signed-off-by: Rasmus Villemoes
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel
On 25/03/2021 08.42, Peter Zijlstra wrote:
> On Thu, Mar 25, 2021 at 01:42:41AM +0100, Rasmus Villemoes wrote:
>>> Actually, it looks like I can't select PREEMPT_DYNAMIC> and tweaking Kconfig
>>
>> Ah, there's no prompt on the "bool" line, so it
On 10/03/2021 00.59, Rasmus Villemoes wrote:
[quoting in full for context to the new CCs]
> With a little MacroMagic(tm), we can allow users to pass a pointer to
> a function that actually takes the type of the data argument, instead
> of forcing the function to have prototype void
On 18/03/2021 12.31, Peter Zijlstra wrote:
> The intent is to avoid writing init code after init (because the text
> might have been freed). The code is needlessly different between
> jump_label and static_call and not obviously correct.
>
> The existing code relies on the fact that the module loa
On 19/03/2021 15.13, Peter Zijlstra wrote:
>> Dunno, probably overkill, but perhaps we could have an atomic_t (or
>> refcount, whatever) init_ref inited to 1, with init_ref_get() doing an
>> inc_unless_zero, and iff you get a ref, you're free to call (/patch)
>> __init functions and access __initd
On 19/03/2021 15.40, Rasmus Villemoes wrote:
> On 19/03/2021 15.13, Peter Zijlstra wrote:
>
>>> Dunno, probably overkill, but perhaps we could have an atomic_t (or
>>> refcount, whatever) init_ref inited to 1, with init_ref_get() doing an
>>> inc_unless_zero, and
ea17c9d868c1 (sh: Use generic clkdev.h
header).
Signed-off-by: Rasmus Villemoes
---
drivers/clk/clkdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 0f2e3fcf0f19..d446c2c697d5 100644
--- a/drivers/clk/clkdev.c
+++ b
;usb:
gadget: remove incorrect __init/__exit annotations").
It really never makes sense for a function to be marked __ref unless
it (1) has some conditional that chooses whether to call an __init
function (or access __initdata) or not and (2) has a comment
explaining why the __ref is there and why
On 23/03/2021 08.45, Oliver Hartkopp wrote:
> IMO we facing a compiler problem here - and we should be very happy that
> the BUILD_BUG_ON() triggered an issue after years of silence.
>
> I do not have a good feeling about what kind of strange effects this
> compiler issue might have in other code
On 23/03/2021 14.14, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> overlapping input and output arguments to snprintf() are
> undefined behavior in C99:
>
Good luck:
https://lore.kernel.org/lkml/1457469654-17059-1-git-send-email-li...@rasmusvillemoes.dk/
At least 5 years ago the consensus fro
On 23/03/2021 13.49, Oliver Hartkopp wrote:
>
>
> On 23.03.21 12:36, Rasmus Villemoes wrote:
>>
>> and more directly from the horse's mouth:
>>
>> https://developer.arm.com/documentation/dui0067/d/arm-compiler-reference/c-and-c---implementation-details
xor%eax,%eax
332: c3 ret
333: 8d b4 26 00 00 00 00lea0x0(%esi,%eiz,1),%esi
33a: 8d b6 00 00 00 00 lea0x0(%esi),%esi
Signed-off-by: Rasmus Villemoes
---
kernel/printk/internal.h| 3 ---
kernel/printk/printk.c | 8 +---
On 23/03/2021 14.04, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> gcc warns about an sprintf() that uses the same buffer as source
> and destination, which is undefined behavior in C99:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c: In function
> 'amdgpu_securedisplay_debugfs_write':
On 23/03/2021 19.59, Oliver Hartkopp wrote:
>
>
> On 23.03.21 15:00, Rasmus Villemoes wrote:
>> Now what CONFIG_* knobs are responsible for putting -mabi=apcs-gnu in
>> CFLAGS is left as an exercise for the reader. Regardless, it is not a
>> bug in the compiler. The e
On 23/03/2021 13.56, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> With extra warnings enabled, gcc complains that snprintf should not
> take the same buffer as source and destination:
>
> drivers/net/ethernet/huawei/hinic/hinic_ethtool.c: In function
> 'hinic_set_settings_to_hw':
> drivers/ne
On 24/03/2021 03.04, Stephen Boyd wrote:
> Add vmlinux_build_id() so that callers can print a hex format string
> representation of the running kernel's build ID. This will be used in
> the kdump and dump_stack code so that developers can easily locate the
> vmlinux debug symbols for a crash/stackt
Add a managed wrapper for clk_prepare_enable().
Signed-off-by: Rasmus Villemoes
---
.../driver-api/driver-model/devres.rst| 1 +
drivers/clk/clk-devres.c | 29 +++
include/linux/clk.h | 13 +
3 files changed, 43
is enabled, and since
linux by default disables unused clocks, that effectively renders the
watchdog useless. So add an optional "delay" clock binding.
Suggested-by: Arnd Bergmann
Signed-off-by: Rasmus Villemoes
---
Documentation/devicetree/bindings/watchdog/gpio-wdt.txt | 6 +
is enabled, and since
linux by default disables unused clocks, that effectively renders the
watchdog useless.
Add driver support for an optional "delay" clock, as documented in the
preceding patch.
Signed-off-by: Rasmus Villemoes
---
drivers/watchdog/gpio_wdt.c | 9 +
1 file c
;s already above
what the spec says, and other random changes in the future might make
the gap even wider.
So I don't know. The hardware is obviously misdesigned, and I don't
know how far the mainline kernel should stretch to support this; OTOH
the kernel does contain lots of workarounds for
On 24/02/2021 11.52, Rasmus Villemoes wrote:
> It can be quite useful to have ld emit a link map file, in order to
> debug or verify that special sections end up where they are supposed
> to, and to see what LD_DEAD_CODE_DATA_ELIMINATION manages to get rid
> of.
>
> The only r
On 04/03/2021 20.15, Stephen Boyd wrote:
> Quoting Matthew Wilcox (2021-03-04 09:00:52)
>> On Mon, Mar 01, 2021 at 09:47:47AM -0800, Stephen Boyd wrote:
>>> Example:
>>>
>>> WARNING: CPU: 4 PID: 3255 at drivers/misc/lkdtm/bugs.c:83
>>> lkdtm_WARNING+0x28/0x30 [lkdtm] (ed5019fdf5e53be37cb1ba789929
Use clk_core_enable_lock() and clk_core_disable_lock() in a few places
rather than open-coding them.
Signed-off-by: Rasmus Villemoes
---
drivers/clk/clk.c | 18 +++---
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index
an be rather large (several MB), and that's a waste of
space when one isn't interested in these things. Also make it depend
on CONFIG_EXPERT.
Signed-off-by: Rasmus Villemoes
---
.gitignore | 1 +
Documentation/dontdiff | 1 +
lib/Kconfig.debug | 10 +
dependency.
To fix this, make link-vmlinux.sh emit a .vmlinux.d file in the same
format as the dependency files generated by gcc, and apply the fixdep
logic to that. I've tested that this correctly works with both in-tree
and out-of-tree builds.
Signed-off-by: Rasmus Villemoes
---
Mak
On 02/03/2021 18.42, Joe Perches wrote:
> Here is a possible opportunity to reduce data usage in the kernel.
>
> $ git grep -P -n '^static\s+(?!const|struct)(?:\w+\s+){1,3}\w+\s*\[\s*\]'
> drivers/ | \
> grep -v __initdata | \
> wc -l
> 3250
>
> Meaning there are ~3000 declarations of arrays
l_const_nbits(size)) {
+ unsigned long val = *addr & GENMASK(size - 1, 0);
blow up at run-time.
Other than that (and the above commit log typo), consider the series
Acked-by: Rasmus Villemoes
On 12/03/2021 03.29, Segher Boessenkool wrote:
> Hi!
>
> On Tue, Mar 09, 2021 at 06:19:30AM +, Christophe Leroy wrote:
>> With some defconfig including CONFIG_CC_OPTIMIZE_FOR_SIZE,
>> (for instance mvme5100_defconfig and ps3_defconfig), gcc 5
>> generates a call to _restgpr_31_x.
>
>> I don't
On 15/03/2021 22.33, Andrew Morton wrote:
> On Sat, 13 Mar 2021 22:25:27 +0100 Rasmus Villemoes
> wrote:
>
>> Most of the boot process doesn't actually need anything from the
>> initramfs, until of course PID1 is to be executed. So instead of doing
>> the dec
On 16/03/2021 02.54, Yury Norov wrote:
> GENMASK(h, l) may be passed with unsigned types. In such case, type-limits
> warning is generated for example in case of GENMASK(h, 0).
>
> Signed-off-by: Yury Norov
> ---
> tools/scripts/Makefile.include | 1 +
> 1 file changed, 1 insertion(+)
>
> diff
On 16/03/2021 02.54, Yury Norov wrote:
> Some functions in tools/include/linux/bitmap.h declare nbits as int. In the
> kernel nbits is declared as unsigned int.
>
> Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
On 16/03/2021 02.54, Yury Norov wrote:
> BITMAP_{LAST,FIRST}_WORD_MASK() in linux/bitmap.h duplicates the
> functionality of GENMASK(). The scope of BITMAP* macros is wider
> than just bitmaps. This patch defines 4 new macros: BITS_FIRST(),
> BITS_LAST(), BITS_FIRST_MASK() and BITS_LAST_MASK() in l
On 16/03/2021 02.54, Yury Norov wrote:
> find_bit would also benefit from small_const_nbits() optimizations.
>
> Signed-off-by: Yury Norov
> ---
> include/asm-generic/bitsperlong.h | 9 +
> include/linux/bitmap.h| 3 ---
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
>
On 10/03/2021 03.30, Chris Down wrote:
> ---
> MAINTAINERS | 5 +
> arch/arm/kernel/entry-v7m.S | 2 +-
> arch/arm/lib/backtrace-clang.S | 2 +-
> arch/arm/lib/backtrace.S | 2 +-
> arch/arm/mach-rpc/io-acorn.S | 2 +-
> arch/a
On 26/03/2021 12.38, Peter Zijlstra wrote:
> Implement debugfs_create_str() to easily display names and such in
> debugfs.
Patches 7-9 don't seem to add any users of this. What's it for precisely?
> +
> +again:
> + rcu_read_lock();
> + str = rcu_dereference(*(char **)file->private_data);
On 26/03/2021 13.57, Greg KH wrote:
> On Fri, Mar 26, 2021 at 01:53:59PM +0100, Rasmus Villemoes wrote:
>> On 26/03/2021 12.38, Peter Zijlstra wrote:
>>
>>> Implement debugfs_create_str() to easily display names and such in
>>> debugfs.
>>
>> Patches 7-
On 26/03/2021 15.22, Peter Zijlstra wrote:
> On Fri, Mar 26, 2021 at 01:53:59PM +0100, Rasmus Villemoes wrote:
>> On 26/03/2021 12.38, Peter Zijlstra wrote:
>
>>> +
>>> +again:
>>> + rcu_read_lock();
>>> + str = rcu_dereference(*(char **)fi
simple_read_from_buffer() doesn't care about any bytes in the buffer
beyond "available". Making the buffer nul-terminated is therefore
completely pointless.
Signed-off-by: Rasmus Villemoes
---
fs/debugfs/file.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --g
Including a nul byte in the otherwise human-readable ascii output
from this debugfs file is probably not intended.
Signed-off-by: Rasmus Villemoes
---
drivers/greybus/es2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/greybus/es2.c b/drivers/greybus/es2.c
index
On 26/03/2021 17.31, Alex Elder wrote:
> On 3/26/21 10:22 AM, Rasmus Villemoes wrote:
>> Including a nul byte in the otherwise human-readable ascii output
>> from this debugfs file is probably not intended.
>
> Looking only at the comments above simple_read_from_buffer(),
&
On 18/04/2021 23.26, Christophe JAILLET wrote:
> Improve 'create_workqueue', 'create_freezable_workqueue' and
> 'create_singlethread_workqueue' so that they accept a format
> specifier and a variable number of arguments.
>
> This will put these macros more in line with 'alloc_ordered_workqueue' an
On 16/04/2021 15.56, Chris Down wrote:
> Hey Petr, Rasmus,
>> This is great point! There are many other subsystem specific wrappers,
>> e,g, ata_dev_printk(), netdev_printk(), snd_printk(), dprintk().
>> We should make it easy to index them as well.
>
> These would be nice to have, but we should
On 17/04/2021 00.28, Kees Cook wrote:
> On Fri, Apr 16, 2021 at 03:06:17PM -0700, Andy Lutomirski wrote:
>> The
>> foo symbol would point to whatever magic is needed.
>
> No, the symbol points to the jump table entry. Direct calls get minimal
> overhead and indirect calls can add the "is this fun
loc()) for the minimal amount of ifdeffery.
Signed-off-by: Rasmus Villemoes
---
drivers/base/dd.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 37a5e5f8b221..6a197336c6a4 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -216,9 +216,
On 17/04/2021 01.07, Matthew Wilcox (Oracle) wrote:
> 32-bit architectures which expect 8-byte alignment for 8-byte integers
> and need 64-bit DMA addresses (arc, arm, mips, ppc) had their struct
> page inadvertently expanded in 2019. When the dma_addr_t was added,
> it forced the alignment of the
uot;Driver-Core: disable /sbin/hotplug by default")
Signed-off-by: Rasmus Villemoes
---
Documentation/admin-guide/sysctl/kernel.rst | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/sysctl/kernel.rst
b/Documentation/admin-guide/sysctl/kernel.rs
On 17/03/2021 09.40, Petr Mladek wrote:
> On Tue 2021-03-16 14:28:12, Chris Down wrote:
>> Rasmus Villemoes writes:
>>> I think it's pointless renaming the symbol to _printk, with all the
>>> churn and reduced readability that involves (especially when reading
On 17/03/2021 08.54, Nicholas Piggin wrote:
> +#if CONFIG_BASE_SMALL
> +static const unsigned int page_wait_table_bits = 4;
> static wait_queue_head_t page_wait_table[PAGE_WAIT_TABLE_SIZE]
> __cacheline_aligned;
>
> + if (!CONFIG_BASE_SMALL) {
> + page_wait_table = alloc_large
On 17/03/2021 06.40, Yury Norov wrote:
> On Tue, Mar 16, 2021 at 01:42:45PM +0200, Andy Shevchenko wrote:
>>> It would also be much easier to review if you just redefined the
>>> BITMAP_LAST_WORD_MASK macros etc. in terms of these new things, so you
>>> wouldn't have to do a lot of mechanical chan
On 18/03/2021 11.46, Petr Mladek wrote:
> BTW: Is the trick with int (printk)(const char *s, ...) documented
> somewhere? Is it portable?
It is completely standard and portable C, explicitly spelled out in the
C standard itself. C99:
===
6.10.3 Macro replacement
10 [...] Each subsequent instanc
On 12/03/2021 11.30, Rasmus Villemoes wrote:
> Calling complete() from within the __init function is wrong -
> theoretically, the init process could proceed all the way to freeing
> the init mem before the devtmpfsd thread gets to execute the return
> instruction in devtmpfs_setup().
On 08/03/2021 15.29, Rasmus Villemoes wrote:
> output_data seems to have been write-only since the flush_window()
> callback was removed in commit e7db7b4270ed ("arm: add support for
> LZO-compressed kernels").
Ping.
On 05/12/2020 22.27, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote:
>>> Looks like a nice clean up on a quick look.
>>>
>>> Please separate patches 1 and 11 (which are the two bug fixes I see)
>>
>> I think patch 2
method, use the existence
of the ->port_setup_message_port method as a proxy for determining
whether the learn2all bit exists (and should be set).
Signed-off-by: Rasmus Villemoes
---
v2: add comment explaining why ->port_setup_message_port is being used.
This doesn't fix anything from what
On 24/09/2020 12.52, Uwe Kleine-König wrote:
> Hello,
>
> now that there are two people stumbling over the pcf2127 driver
> providing a non-functional watchdog device, here comes an RFC patch to
> address this.
I just want to add a "me too" here, as I'm also now affected by the
pcf2127 exposing a
On 03/12/2020 19.46, Yury Norov wrote:
> I would prefer to avoid changing the find*bit() semantics. As for now,
> if any of find_*_bit()
> finds nothing, it returns the size of the bitmap it was passed.
Yeah, we should actually try to fix that, it causes bad code generation.
It's hard, because ca
These warnings become somewhat more informative when they include the
MTU value that could not be set and not just the errno.
Signed-off-by: Rasmus Villemoes
---
net/dsa/master.c | 7 ---
net/dsa/slave.c | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/net/dsa
tch 2, someone in NXP should check how the hardware actually
works and make an updated reference manual available.
Rasmus Villemoes (20):
ethernet: ucc_geth: set dev->max_mtu to 1518
ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram
ethernet: ucc_geth: remove unused read of
In theory, such a read-after-write might be required by the hardware,
but nothing in the data sheet suggests that to be the case. The name
test also suggests that it's some debug leftover.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 3 ---
1 file chang
Allow passing const-qualified pointers without requiring a cast in the
caller.
Signed-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe_common.c | 2 +-
include/soc/fsl/qe/qe.h| 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_common.c b
t could be attributed to this, but
it seems to be the kind of thing that would be extremely hard to
debug. So extend the struct definition so that we do allocate 192
bytes.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.h | 9 -
1 file changed, 8 insertions(+),
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index f854ff90f238..e1574c14b7e5 100644
--- a/drivers/net
This removes the explicit NULL checks, and allows us to stop storing
at least some of the _offset values separately.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 77 ++-
1 file changed, 33 insertions(+), 44 deletions(-)
diff --git a
Add a helper that takes a virtual address rather than the muram
offset. This will be used in a couple of places to avoid having to
store both the offset and the virtual address, as well as removing
NULL checks from the callers.
Signed-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe_common.c
fixes the
problems with using IS_ERR_VALUE() on a u32 as explained in commit
800cd6fb76f0 ("soc: fsl: qe: change return type of cpm_muram_alloc()
to s32").
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 21 +
drivers/net/ethernet
Reduce the code duplication a bit by moving the parsing of
rx-clock-name and the fallback handling to a helper function.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 79 ++-
1 file changed, 35 insertions(+), 44 deletions(-)
diff --git a
These macros both have the value 32, there's no point first
initializing align to a lower value.
If anything, one could throw in a
BUILD_BUG_ON(UCC_GETH_TX_BD_RING_ALIGNMENT < 4), but it's not worth it
- lots of code depends on named constants having sensible values.
Signed-o
ugeth is the netdiv_priv() part of the netdevice. Accessing the memory
pointed to by ugeth (such as done by ucc_geth_memclean() and the two
of_node_puts) after free_netdev() is thus use-after-free.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 4 ++--
1 file
These buffers have all just been handed out from qe_muram_alloc(), aka
cpm_muram_alloc(), and the helper cpm_muram_alloc_common() already
does
memset_io(cpm_muram_addr(start), 0, size);
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 19
The translation from the ucc_geth_num_of_threads enum value to the
actual count can be written somewhat more compactly with a small
lookup table, allowing us to replace the four switch statements.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 100
that are not really loops by creating static
inline helpers. If and when the numQueuesTx/numQueuesRx fields are
re-introduced, it suffices to update those helper to return the
appropriate field.
This cuts the .text segment of ucc_geth.o by 8%.
Signed-off-by: Rasmus Villemoes
---
drivers/net/eth
a lot of dead code, this is also motivated by
wanting to clean up the "store result from kmalloc() in a u32" mess.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 106 ++
include/soc/fsl/qe/qe.h | 6 --
inc
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index c9f619908561..3aebea191b52 100644
--- a
ery elegant and certainly makes a reader of the
code pause for a while.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 50 ---
drivers/net/ethernet/freescale/ucc_geth.h | 2 -
2 files changed, 17 insertions(+), 35 deletions(-)
diff --git a/drive
k was dead code, as the
address of some static array element can obviously never be NULL.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 32 +--
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 700eafef4921..a06744d8b4af 100644
--- a/drivers/net
d-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 0fbdc965c4cb..303cc2f5eb4a 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/f
Vladimir Oltean
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 714b501be7d0..380c1f09adaf 100644
--- a/drivers/net/eth
On 05/12/2020 20.36, Ard Biesheuvel wrote:
> On Fri, 4 Dec 2020 at 19:02, James Bottomley
> wrote:
>>
>> On Fri, 2020-12-04 at 18:07 +0100, Ard Biesheuvel wrote:
>>> On Fri, 4 Dec 2020 at 18:06,
>>> wrote:
From: Francis Laniel
The two functions indicates if a string begins with a
On 05/12/2020 21.48, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote:
>> -unregister_netdev(dev);
>> -free_netdev(dev);
>> ucc_geth_memclean(ugeth);
>> if (of_phy_is_fixed_link(np))
>>
On 05/12/2020 21.53, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 20:17:23 +0100 Rasmus Villemoes wrote:
>> While trying to figure out how to allow bumping the MTU with the
>> ucc_geth driver, I fell into a rabbit hole and stumbled on a whole
>> bunch of issues of varying
On 05/12/2020 22.19, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 22:04:28 +0100 Rasmus Villemoes wrote:
>> On 05/12/2020 21.48, Jakub Kicinski wrote:
>>> On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote:
>>>> - unregister_netdev(dev);
>>>> - f
On 05/12/2020 22.27, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote:
>>> rebase (retest) and post them against the net tree:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
>>
>> So I thought th
> I only noticed because I needed to add a free of the ug_info in a later
> patch.
Where, ironically, I add a use-after-free bug by freeing ug_info before
the ucc_geth_memclean() call.
:facepalm:
On 17/12/2020 19.12, Uwe Kleine-König wrote:
> On Thu, Dec 17, 2020 at 10:51:08AM -0600, Rob Herring wrote:
>> On Fri, Dec 11, 2020 at 5:10 PM Rasmus Villemoes
>> wrote:
>> I'm wondering how you solve which wdog to ping when there are multiple
>> without rely
601 - 700 of 1998 matches
Mail list logo