Now, we can safely enable dynamic ftrace with kernel preemption.
Signed-off-by: Andy Chiu
---
arch/riscv/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 55c70efbad0a..881ea466ff52 100644
--- a/arch/riscv/Kconfig
+++ b
schedule(). Besides, we currently don't pass argument
through vector register, so we don't have to save/restore V-regs in
ftrace trampoline.
Signed-off-by: Andy Chiu
---
arch/riscv/include/asm/processor.h | 5 +
arch/riscv/include/asm/vector.h| 22 +++---
2 files changed
Now it is safe to remove dependency from stop_machine() for us to patch
code in ftrace.
Signed-off-by: Andy Chiu
---
arch/riscv/kernel/ftrace.c | 53 --
1 file changed, 4 insertions(+), 49 deletions(-)
diff --git a/arch/riscv/kernel/ftrace.c b/arch
, then perform the jump. This enable the kernel to update
the target atomically.
The ordering of reading/updating the targert address should be guarded
by generic ftrace code, where it sends smp_rmb ipi.
Signed-off-by: Andy Chiu
---
arch/riscv/include/asm/ftrace.h | 4 +++
arch/riscv/kernel/ftrace.c
functions
properly on newer versions of gcc. So, we add a cc-option to test if
the toolchain supports it.
Suggested-by: Evgenii Shatokhin
Signed-off-by: Andy Chiu
---
Changelog v2:
- Use CC_HAS_MIN_FUNCTION_ALIGNMENT and it friends to prevent reinventing
wheels (Nathan)
---
arch/riscv/Kconfig
Reported-by: Evgenii Shatokhin
Closes:
https://lore.kernel.org/linux-riscv/7e7c7914-445d-426d-89a0-59a9199c4...@yadro.com/
Acked-by: Nathan Chancellor
Signed-off-by: Andy Chiu
---
arch/riscv/include/asm/ftrace.h | 7 +++
arch/riscv/kernel/asm-offsets.c | 7 +++
arch/riscv/kernel/mcount-dyn.S
ctions.
- Link to v1:
https://lore.kernel.org/r/20240613-dev-andyc-dyn-ftrace-v4-v1-0-1a538e12c...@sifive.com
---
Andy Chiu (6):
riscv: ftrace: support fastcc in Clang for WITH_ARGS
riscv: ftrace: align patchable functions to 4 Byte boundary
riscv: ftrace: prepare ftrace for
On Mon, Jun 24, 2024 at 7:49 PM Andy Chiu wrote:
>
> Hi Alex,
>
> On Mon, Jun 24, 2024 at 4:21 PM Alexandre Ghiti
> wrote:
> >
> > We cannot delay the icache flush after patching some functions as we may
> > have patched a function that will get called before t
s,
> size_t len)
>
> ret = patch_insn_write(tp, insns, len);
>
> - if (!ret)
> - flush_icache_range((uintptr_t) tp, (uintptr_t) tp + len);
> -
> return ret;
> }
> NOKPROBE_SYMBOL(patch_text_nosync);
> @@ -253,9 +263,9 @@ static int patch_text_cb(void *data)
> } else {
> while (atomic_read(>cpu_count) <= num_online_cpus())
> cpu_relax();
> - }
>
> - local_flush_icache_all();
> + local_flush_icache_all();
> + }
>
> return ret;
> }
> --
> 2.39.2
>
Thanks,
Andy
On Tue, Jun 18, 2024 at 9:40 PM Alexandre Ghiti wrote:
>
> Hi Andy,
>
> On Tue, Jun 18, 2024 at 2:48 PM Andy Chiu wrote:
> >
> > On Tue, Jun 18, 2024 at 8:02 PM Alexandre Ghiti wrote:
> > >
> > > Hi Conor,
> > >
> > >
please let me know if I missed
anything. I think what Conor suggested is safe for init_nop, as it
would be called only when there is only one core (booting) and at the
loading stage of kernel modules. In the first case we just have to
make sure there is no patchable entry before the core executes
fence.
Sorry for the noise,
On Mon, Jun 17, 2024 at 10:38 AM Andy Chiu wrote:
>
> On Fri, Jun 14, 2024 at 3:09 AM Nathan Chancellor wrote:
> >
> > Hi Andy,
> >
> > On Thu, Jun 13, 2024 at 03:11:09PM +0800, Andy Chiu wrote:
> > > We are changing ftrace code patc
On Fri, Jun 14, 2024 at 3:09 AM Nathan Chancellor wrote:
>
> Hi Andy,
>
> On Thu, Jun 13, 2024 at 03:11:09PM +0800, Andy Chiu wrote:
> > We are changing ftrace code patching in order to remove dependency from
> > stop_machine() and enable kernel preemption. This requires u
On Thu, Jun 13, 2024 at 9:32 PM Steven Rostedt wrote:
>
> On Thu, 13 Jun 2024 15:11:07 +0800
> Andy Chiu wrote:
>
> > kernel_text_address() and __kernel_text_address() are called in
> > arch_stack_walk() of riscv. This results in excess amount of un-related
> > trac
Now, we can safely enable dynamic ftrace with kernel preemption.
Signed-off-by: Andy Chiu
---
arch/riscv/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 80b8d48e1e46..c1493ee1b8cd 100644
--- a/arch/riscv/Kconfig
+++ b
schedule(). Besides, we currently don't pass argument
through vector register, so we don't have to save/restore V-regs in
ftrace trampoline.
Signed-off-by: Andy Chiu
---
arch/riscv/include/asm/processor.h | 5 +
arch/riscv/include/asm/vector.h| 22 +++---
2 files changed
Now it is safe to remove dependency from stop_machine() for us to patch
code in ftrace.
Signed-off-by: Andy Chiu
---
arch/riscv/kernel/ftrace.c | 53 --
1 file changed, 4 insertions(+), 49 deletions(-)
diff --git a/arch/riscv/kernel/ftrace.c b/arch
, then perform the jump. This enable the kernel to update
the target atomically.
The ordering of reading/updating the targert address should be guarded
by generic ftrace code, where it sends smp_rmb ipi.
Signed-off-by: Andy Chiu
---
arch/riscv/include/asm/ftrace.h | 4 +++
arch/riscv/kernel/ftrace.c
functions
properly on newer versions of gcc. So, we add a cc-option to test if
the toolchain supports it.
Suggested-by: Evgenii Shatokhin
Signed-off-by: Andy Chiu
---
arch/riscv/Kconfig | 1 +
arch/riscv/Makefile | 7 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/riscv
-by: Evgenii Shatokhin
Closes:
https://lore.kernel.org/linux-riscv/7e7c7914-445d-426d-89a0-59a9199c4...@yadro.com/
Signed-off-by: Andy Chiu
---
arch/riscv/include/asm/ftrace.h | 7 +++
arch/riscv/kernel/asm-offsets.c | 7 +++
arch/riscv/kernel/mcount-dyn.S | 16 ++--
3
function's entry/exit. This patch adds
both functions to notrace, so they won't show up on the trace records.
Signed-off-by: Andy Chiu
---
kernel/extable.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/extable.c b/kernel/extable.c
index 71f482581cab..d03fa462fa8b
dd CALLER_ADDRx support")
Signed-off-by: Andy Chiu
---
arch/riscv/kernel/stacktrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c
index 528ec7cc9a62..0d3f00eb0bae 100644
--- a/arch/riscv/kernel/stacktrac
ftrace to be able to
run with kernel preemption (7,8)
---
Andy Chiu (8):
riscv: stacktrace: convert arch_stack_walk() to noinstr
tracing: do not trace kernel_text_address()
riscv: ftrace: support fastcc in Clang for WITH_ARGS
riscv: ftrace: align patchable functions to 4 Byte
On Wed, Apr 24, 2024 at 7:14 PM Ondřej Jirman wrote:
> On Wed, Apr 24, 2024 at 06:20:41PM GMT, Andy Shevchenko wrote:
> > On Wed, Apr 24, 2024 at 3:59 PM Ondřej Jirman wrote:
> > > On Wed, Apr 24, 2024 at 02:16:06AM GMT, Andy Shevchenko wrote:
> > > > On Wed
On Wed, Apr 24, 2024 at 3:59 PM Ondřej Jirman wrote:
> On Wed, Apr 24, 2024 at 02:16:06AM GMT, Andy Shevchenko wrote:
> > On Wed, Apr 24, 2024 at 1:41 AM Aren Moynihan
> > wrote:
...
> > > ret = stk3310_init(indio_dev);
> > > if (ret <
get_drvdata() directly.
Jonathan, do we have something like iio_priv_from_drvdata(struct
device *dev)? Seems many drivers may utilise it.
> }
...
> static int stk3310_resume(struct device *dev)
Ditto.
--
With Best Regards,
Andy Shevchenko
et regulator vdd
> failed\n");
>
> + data->led_reg = devm_regulator_get(>dev, "leda");
> + if (IS_ERR(data->led_reg))
> + return dev_err_probe(>dev, ret, "get regulator led
> failed\n");
Can't you use a bulk regulator API instead?
--
With Best Regards,
Andy Shevchenko
On Thu, Apr 18, 2024 at 8:50 PM Aren wrote:
> On Thu, Apr 18, 2024 at 06:56:09PM +0300, Andy Shevchenko wrote:
> > On Thu, Apr 18, 2024 at 6:06 PM Aren wrote:
> > > On Mon, Apr 15, 2024 at 05:04:53PM +0300, Andy Shevchenko wrote:
> > > > On Sun, Apr 14,
On Thu, Apr 18, 2024 at 6:06 PM Aren wrote:
> On Mon, Apr 15, 2024 at 05:04:53PM +0300, Andy Shevchenko wrote:
> > On Sun, Apr 14, 2024 at 8:57 PM Aren Moynihan
> > wrote:
...
> > > stk3310_set_state(iio_priv(indio_dev), STK3310_STATE_STANDBY);
> &g
de it seems that this one is strictly part of
the probe phase, which means we may use
return dev_err_probe(...);
pattern. Yet, you may add another patch to clean up all of them:
_probe(), _init(), _regmap_init() to use the same pattern everywhere.
--
With Best Regards,
Andy Shevchenko
heck the order of freeing resources, be sure you have no
devm_*() releases happening before this call.
...
> + usleep_range(1000, 2000);
fsleep()
--
With Best Regards,
Andy Shevchenko
nd. So, we will reduce a technical debt, and
not adding to it.
> + goto out_detach;
> + }
...
> +int module_add_driver(struct module *mod, struct device_driver *drv)
> {
> char *driver_name;
> - int no_warn;
> + int ret;
I would move it...
> struct module_kobject *mk = NULL;
...to be here.
--
With Best Regards,
Andy Shevchenko
On Thu, Mar 21, 2024 at 4:48 PM Björn Töpel wrote:
>
> Andy,
>
> Pulling out the A option:
>
> >> > A) Use auipc/jalr, only patch jalr to take us to a common
> >> >dispatcher/trampoline
> >> >
> >> > | # probabl
ng I am not very sure is: do we need a destination
address in a "per-function" manner? It seems like most of the time the
destination address can only be ftrace_call, or ftrace_regs_call. If
the number of destination addresses is very few, then we could
potentially reduce the size of
.
>
> There are 4 CMODX possiblities:
>mv, nop: fully disabled, no problems
>mv, jalr: We will jump to zero. We would need to have the inst
> page/access fault handler take care of this case. Especially
> if we align the instructions so that they can be patched
> together, being interrupted in the middle and taking this
> path will be rare.
> ld, nop: no problems
> ld, jalr: fully enabled, no problems
>
> Patching is a 64b store/sd, and we only need a fence.i at the end, since
> we can handle all 4 possibilities.
>
> For the disabled case we'll have:
> A) mv, aupic, nop
> D) mv, aupic, mv, nop.
>
> Puranjay, I've flipped. Let's go Mark's CALL_OPS together with a new
> text patch mechanism w/o stop_machine().
>
>
> Björn
Cheers,
Andy
tter performance than that?
>
> >
> > I'm trying to wrap my head if it makes sense to have it on RISC-V, given
> > that we're a bit different from Arm64. Does the scale tip to the GOOD
> > side?
> >
> > Oh, and we really need to see performance numbers on real HW! I have a
> > VF2 that I could try this series on.
>
> It would be great if you can do it :D.
>
> Thanks,
> Puranjay
>
> ___
> linux-riscv mailing list
> linux-ri...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
- [1]
https://yhbt.net/lore/all/cajf2gtsn3_cdysf9d8dt-br2wf_m8y02a09xgrq8kxi91sn...@mail.gmail.com/T/
Regards,
Andy
4. I would like to benchmark this on real hardware and put the results
> > > in
> > > the commit message.
> > >
> > > Signed-off-by: Puranjay Mohan
> > > ---
> > > arch/riscv/Kconfig | 2 ++
> > > arch/riscv/Makefile
On Mon, Nov 20, 2023 at 07:19:44PM +0200, Andy Shevchenko wrote:
> On Mon, Nov 20, 2023 at 04:11:54PM +0100, Rafael J. Wysocki wrote:
> > On Mon, Nov 20, 2023 at 4:03 PM Andy Shevchenko
> > wrote:
> > > On Thu, Oct 19, 2023 at 06:03:28PM -0700, Dan Williams wrote:
>
If the task happens to run after cpu hot-plug offline, then it would not
be running in a percpu_thread. Instead, it would be re-queued into a
UNBOUND workqueue. This would trigger a warning if we enable kernel
preemption.
Signed-off-by: Andy Chiu
---
kernel/trace/trace_hwlat.c | 11
wq.
Signed-off-by: Andy Chiu
---
kernel/trace/trace_osnoise.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index bd0d01d00fb9..cf7f716d3f35 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace
need data to be assigned here as well
ret = -EINVAL;
...
}
--
With Best Regards,
Andy Shevchenko
On Fri, Dec 01, 2023 at 09:43:34AM -0800, Kees Cook wrote:
> On Mon, 20 Nov 2023 17:11:41 +0200, Andy Shevchenko wrote:
> > A couple of patches are for get the string ops, used in the module,
> > slightly harden. On top a few cleanups.
> >
> > Since the main part i
On Mon, Nov 20, 2023 at 05:11:41PM +0200, Andy Shevchenko wrote:
> A couple of patches are for get the string ops, used in the module,
> slightly harden. On top a few cleanups.
>
> Since the main part is rather hardening, I think the Kees' tree is
> the best fit for the series. I
We can use strnlen() even on early stages and it prevents from
going over the string boundaries in case it's already too long.
Reviewed-by: Luis Chamberlain
Reviewed-by: Kees Cook
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions
The multi-line comment style in the file is rather arbitrary.
Make it follow the standard one.
Reviewed-by: Luis Chamberlain
Reviewed-by: Kees Cook
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git
Sort the headers in alphabetic order in order to ease
the maintenance for this part.
Reviewed-by: Luis Chamberlain
Reviewed-by: Kees Cook
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/kernel/params.c b
Introduce a new type for the callback to parse an unknown argument.
This unifies function prototypes which takes that as a parameter.
Reviewed-by: Luis Chamberlain
Reviewed-by: Kees Cook
Signed-off-by: Andy Shevchenko
---
include/linux/moduleparam.h | 6 +++---
kernel/params.c | 8
Prevent allocations from integer overflow by using size_add().
Reviewed-by: Luis Chamberlain
Reviewed-by: Kees Cook
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/params.c b/kernel/params.c
index f8e3c4139854
ies
(Luis)
Andy Shevchenko (5):
params: Introduce the param_unknown_fn type
params: Do not go over the limit when getting the string length
params: Use size_add() for kmalloc()
params: Sort headers
params: Fix multi-line comment style
include/linux/moduleparam.h | 6 ++--
kernel/param
On Thu, Oct 19, 2023 at 06:03:28PM -0700, Dan Williams wrote:
> Andy Shevchenko wrote:
> > The acpi_evaluate_dsm_typed() provides a way to check the type of the
> > object evaluated by _DSM call. Use it instead of open coded variant.
>
> Looks good to me.
>
> Review
On Mon, Oct 02, 2023 at 04:54:58PM +0300, Andy Shevchenko wrote:
> The acpi_evaluate_dsm_typed() provides a way to check the type of the
> object evaluated by _DSM call. Use it instead of open coded variant.
Dan, do you have any comments?
--
With Best Regards,
Andy Shevchenko
for educational purposes."
--
With Best Regards,
Andy Shevchenko
eed to get from ac to
> the underlying platform device, a pointer to it can be added to struct
> acpi_ac without removing the ACPI device pointer from it.
The idea behind is to eliminate data duplication.
> > unsigned long long state;
> > struct notifier_block battery_nb;
> > };
--
With Best Regards,
Andy Shevchenko
event) {
> default:
> - acpi_handle_debug(device->handle, "Unsupported event [0x%x]\n",
> + acpi_handle_debug(ACPI_HANDLE(ac->dev), "Unsupported event
> [0x%x]\n",
> event);
Does it makes any sense now? Basically it duplicates the ACPI_COMPANION() call
as Rafael pointed out in previous version discussion.
> fallthrough;
--
With Best Regards,
Andy Shevchenko
On Mon, Oct 02, 2023 at 10:27:02PM +0200, Wilczynski, Michal wrote:
> On 10/2/2023 3:54 PM, Andy Shevchenko wrote:
...
> > + out_obj = acpi_evaluate_dsm_typed(handle, guid, revid, func, _obj,
> > ACPI_TYPE_BUFFER);
>
> This line is 90 characters long, wouldn't it be be
The acpi_evaluate_dsm_typed() provides a way to check the type of the
object evaluated by _DSM call. Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko
---
drivers/acpi/nfit/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/nfit
Sort the headers in alphabetic order in order to ease
the maintenance for this part.
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/params.c b/kernel/params.c
index c3a029fe183d..eb55b32399b4 100644
Introduce a new type for the callback to parse an unknown argument.
This unifies function prototypes which takes that as a parameter.
Signed-off-by: Andy Shevchenko
---
include/linux/moduleparam.h | 6 +++---
kernel/params.c | 8 ++--
2 files changed, 5 insertions(+), 9
Prevent allocations from integer overflow by using size_add().
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/params.c b/kernel/params.c
index f8e3c4139854..c3a029fe183d 100644
--- a/kernel/params.c
+++ b/kernel
mit() conversion as it revealed
an issue, i.e. reuse getters with non-page-aligned pointer, which
would be addressed separately
- added cover letter and clarified the possible route for the series
(Luis)
Andy Shevchenko (5):
params: Introduce the param_unknown_fn type
params: Do not go o
We can use strnlen() even on early stages and it prevents from
going over the string boundaries in case it's already too long.
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel/params.c b/kernel/params.c
index
The multi-line comment style in the file is rather arbitrary.
Make it follow the standard one.
Signed-off-by: Andy Shevchenko
---
kernel/params.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/kernel/params.c b/kernel/params.c
index eb55b32399b4
On Tue, Sep 26, 2023 at 09:45:20PM +0300, Michal Wilczynski wrote:
> Change rollback in acpi_nfit_init_interleave_set() to use modern scope
> based attribute __free(). This is similar to C++ RAII and is a preferred
> way for handling local memory allocations.
LGTM,
Reviewed-by: Andy S
local leak'.
>
> Fix this by switching from devm_kcalloc() to kcalloc(), and adding
> proper rollback.
LGTM,
Reviewed-by: Andy Shevchenko
--
With Best Regards,
Andy Shevchenko
we won't have any users outside of existing
model (instantiating via ACPI ID). All the above is "strictly speaking"...
--
With Best Regards,
Andy Shevchenko
On Wed, Sep 13, 2023 at 12:45:57PM +0300, Andy Shevchenko wrote:
> The kstrdup_and_replace() takes two characters, old and new, to replace
> former with latter after the copying of the original string. But in case
> when new is a NUL, there is no point to copy the rest of t
string and not a buffer of the size filled with a given
data. With this we can optimize the memory consumption by copying only
meaningful part of the original string and drop the rest.
Signed-off-by: Andy Shevchenko
---
The first user of this is pending:
https://lore.kernel.org/platform-driver-x86
th
uuid_equal().
> return -ENODEV;
--
With Best Regards,
Andy Shevchenko
On Thu, Jul 14, 2022 at 11:24:05AM -0700, Dan Williams wrote:
> Andy Shevchenko wrote:
> > Refactor nd_dev_to_uuid() in order to make code shorter and cleaner
> > by joining conditions and hence returning uuid_null only once.
>
> Apologies for the delay, applied for v5.20.
On Tue, Jun 07, 2022 at 07:49:37PM +0300, Andy Shevchenko wrote:
> Kernel build bot reported:
>
> namespace_devs.c:1991:10: warning: Local variable 'uuid' shadows outer
> variable [shadowVariable]
>
> Refactor create_namespace_pmem() by dropping a nested version of
> th
ernel test robot
Signed-off-by: Andy Shevchenko
---
drivers/nvdimm/namespace_devs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index 0f863fda56e6..dfade66bab73 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/driv
Refactor size_store() in order to remove temporary variable on stack
by joining conditionals.
Signed-off-by: Andy Shevchenko
---
drivers/nvdimm/namespace_devs.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm
Refactor nd_dev_to_uuid() in order to make code shorter and cleaner
by joining conditions and hence returning uuid_null only once.
Signed-off-by: Andy Shevchenko
---
drivers/nvdimm/namespace_devs.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/nvdimm
On Wed, Mar 02, 2022 at 05:36:20PM +0100, Rafael J. Wysocki wrote:
> On Wed, Mar 2, 2022 at 4:50 PM Andy Shevchenko
> wrote:
> > On Fri, Feb 11, 2022 at 01:04:23PM +0200, Andy Shevchenko wrote:
> > > Since we got list_entry_is_head() helper in the generic header,
> &g
On Fri, Feb 11, 2022 at 01:04:23PM +0200, Andy Shevchenko wrote:
> Since we got list_entry_is_head() helper in the generic header,
> we may switch the ACPI modules to use it. This eliminates the
> need in additional variable. In some cases it reduces critical
> sections as well.
Besi
Since we got list_entry_is_head() helper in the generic header,
we may switch the ACPI modules to use it. This eliminates the
need in additional variable. In some cases it reduces critical
sections as well.
Signed-off-by: Andy Shevchenko
---
drivers/acpi/acpi_ipmi.c | 16
Strictly speaking the comparison between guid_t and raw buffer
is not correct. Import GUID to variable of guid_t type and then
compare.
Signed-off-by: Andy Shevchenko
---
drivers/acpi/nfit/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/nfit/core.c b
possible places for preserving this state were considered,
irqentry_state_t or pt_regs.[1] pt_regs was much more complicated and
was potentially fraught with unintended consequences.[2] However, Andy
came up with a way to hide additional values on the stack which could be
accessed as "extended_pt
ffz(), that has been used to count unused native CSs,
might cause undefined behaviour when called against ~0U.
To fix that, open code it with ffs(~value) - 1.
Fixes: 7d93aecdb58d ("spi: Add generic support for unused native cs with
cs-gpios")
Signed-off-by: Andy Shevchenko
---
v2:
port for unused native cs with
cs-gpios")
Signed-off-by: Andy Shevchenko
---
v2: no changes
drivers/spi/spi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 36c46feab6d4..9c3730a9f7d5 100644
--- a/drivers/spi/spi.c
+++
() call cleaner.
Note, that gpiod_count() never returns 0, take this into account as well.
Signed-off-by: Andy Shevchenko
---
v2: reformulated commit message and dropped Fixes tag
drivers/spi/spi.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi.c
On Tue, Apr 20, 2021 at 03:56:16PM +0100, Mark Brown wrote:
> On Tue, Apr 20, 2021 at 05:10:04PM +0300, Andy Shevchenko wrote:
> > ffz(), that has been used to count unused native CSs, might produce UB
>
> Bit of an IA there...
UB -- undefined behaviour.
I'll decode it. Sho
On Tue, Apr 20, 2021 at 05:37:27PM +0300, Sakari Ailus wrote:
> On Tue, Apr 20, 2021 at 02:55:33PM +0300, Andy Shevchenko wrote:
> > On Tue, Apr 20, 2021 at 01:56:40PM +0300, Sakari Ailus wrote:
> > > On Tue, Apr 20, 2021 at 06:34:26PM +0800, Bingbu Cao wrote:
> > >
On Tue, Apr 20, 2021 at 4:19 PM Andy Shevchenko
wrote:
>
> The code currently organized in a way that num_chipselect is overwritten
> each time we call spi_get_gpio_descs(). It might be potentially dangerous
> in case when the gpiod_count() returns an error code.
>
> Note
port for unused native cs with
cs-gpios")
Signed-off-by: Andy Shevchenko
---
drivers/spi/spi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 36c46feab6d4..9c3730a9f7d5 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.
ffz(), that has been used to count unused native CSs, might produce UB
when called against ~0U. To fix that, open code it with ffs(~value) - 1.
Fixes: 7d93aecdb58d ("spi: Add generic support for unused native cs with
cs-gpios")
Signed-off-by: Andy Shevchenko
---
drivers/spi/spi.c
("spi: Optionally use GPIO descriptors for CS GPIOs")
Signed-off-by: Andy Shevchenko
---
drivers/spi/spi.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 74b2b1dd358b..36c46feab6d4 100644
--- a/drivers/spi/s
The enable1 is confusing name. Change it to clearly show what is
the intention behind it. No functional changes.
Fixes: 25093bdeb6bc ("spi: implement SW control for CS times")
Signed-off-by: Andy Shevchenko
---
drivers/spi/spi.c | 9 -
1 file changed, 4 insertions(+), 5
On Tue, Apr 20, 2021 at 03:19:39PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 20, 2021 at 03:02:51PM +0300, Andy Shevchenko wrote:
> > On Tue, Apr 20, 2021 at 07:47:18PM +1000, Stephen Rothwell wrote:
...
> > I have full of build warnings / errors in x86 and iommu
Fo
On Tue, Apr 20, 2021 at 03:02:51PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 20, 2021 at 07:47:18PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > Changes since 20210419:
> >
> > The powerpc tree lost its build failure.
> >
> > The ftrace tre
On Tue, Apr 20, 2021 at 2:36 PM Tomas Melin wrote:
> On 4/20/21 1:47 PM, Andy Shevchenko wrote:
> > On Tue, Apr 20, 2021 at 11:50 AM Tomas Melin
> > wrote:
...
> >>>> + for_each_set_bit(bit, indio_dev->active_scan_mask,
> >>>>
ned int, size_t, struct
iommu_iotlb_gather *)’ {aka ‘long unsigned int (*)(struct io_pgtable_ops *,
long unsigned int, unsigned int, struct iommu_iotlb_gather *)’}
[-Werror=incompatible-pointer-types]
551 | pgtable->iop.ops.unmap= iommu_v1_unmap_page;
|^
cc1: some warnings being treated as errors
Is it only me?
--
With Best Regards,
Andy Shevchenko
On Tue, Apr 20, 2021 at 01:56:40PM +0300, Sakari Ailus wrote:
> On Tue, Apr 20, 2021 at 06:34:26PM +0800, Bingbu Cao wrote:
> > On 4/20/21 6:20 PM, Andy Shevchenko wrote:
> > > On Tue, Apr 20, 2021 at 10:48:33AM +0800, Bingbu Cao wrote:
...
> > > This misses the
On Tue, Apr 20, 2021 at 11:50 AM Tomas Melin wrote:
> On 4/19/21 4:55 PM, Andy Shevchenko wrote:
> > On Mon, Apr 19, 2021 at 4:26 PM Tomas Melin wrote:
...
> >> +#define SCA3300_MASK_STATUSGENMASK(8, 0)
> >> +#define SCA3300_MASK_RS_STATUS GENMASK(1, 0)
&g
fined binary representation and also add an octets field in struct
> optee_msg_param in order to avoid casting.
Wonderful! Thanks for fixing this!
Reviewed-by: Andy Shevchenko
A bit of off-topic, have you know by any chance who may consider applying this
one?
https://lore.kernel
I'm wondering if IPU MMU should be described properly in the DMAR table.
--
With Best Regards,
Andy Shevchenko
>
> Fixes: 26f5689592e2 ("media: staging/intel-ipu3: mmu: Implement driver")
> Signed-off-by: Bingbu Cao
> ---
> drivers/iommu/intel/iommu.c | 29 +
This misses the changelog from v1 followed by the explanation why resent.
--
With Best Regards,
Andy Shevchenko
y second bit in cpumask may be selected like this:
> isolcpus=all:1/2
After addressing a couple of nit-picks,
Reviewed-by: Andy Shevchenko
> Yury Norov (2):
> bitmap_parse: support 'all' semantics
> rcu/tree_plugin: don't handle the case of 'all' CPU range
>
> Docume
mp(str, "all"))/* legacy: use "0-N" instead */
Perhaps move comment as well to new location.
--
With Best Regards,
Andy Shevchenko
t; {-EINVAL, "10-1", NULL, 8, 0},
> @@ -384,7 +391,6 @@ static const struct test_bitmap_parselist
> parselist_tests[] __initconst = {
> {-EINVAL, "a-31:10/1", NULL, 8, 0},
> {-EINVAL, "0-31:a/1", NULL, 8, 0},
> {-EINVAL, "0-\n", NULL, 8, 0},
> -
Otherwise this change doesn't belong to the series.
--
With Best Regards,
Andy Shevchenko
On Tue, Apr 20, 2021 at 12:32:18AM -0700, Drew Fustini wrote:
> On Thu, Apr 15, 2021 at 04:03:56PM +0300, Andy Shevchenko wrote:
> > The commit f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file")
> > enabled GPIO pin number and label in debugfs fo
1 - 100 of 41493 matches
Mail list logo