* Re: [PATCH v1 1/2] scsi: ufs: add required delay after gating reference clock
From: Stanley Chu @ 2020-02-20 13:30 UTC (permalink / raw)
To: Can Guo
Cc: chun-hung.wu, linux-scsi, martin.petersen, andy.teng, jejb,
peter.wang, kuohong.wang, linux-kernel, avri.altman,
linux-mediatek, linux-arm-kernel, alim.akhtar, matthias.bgg,
beanhuo, bvanassche, hongwus, Asutosh Das
In-Reply-To: <bbb0b0637d9667d4691a9a28f9988dea@codeaurora.org>
Hi Can,
On Wed, 2020-02-19 at 18:33 +0800, Can Guo wrote:
> Hi Stanley,
>
> On 2020-02-19 17:11, Stanley Chu wrote:
> > Hi Can,
> >
> > On Wed, 2020-02-19 at 10:35 +0800, Can Guo wrote:
> >
> >> Since we all need this delay here, how about put the delay in the
> >> entrence of ufshcd_setup_clocks(), before vops_setup_clocks()?
> >> If so, we can remove all the delays we added in our vops since the
> >> delay anyways delays everything inside ufshcd_setup_clocks().
> >>
> >
> > Always putting the delay in the entrance of ufshcd_setup_clocks() may
> > add unwanted delay for vendors, just like your current implementation,
> > or some other vendors who do not want to disable the reference clock.
> >
> > I think current patch is more reasonable because the delay is applied
> > to
> > clock only named as "ref_clk" specifically.
> >
> > If you needs to keep "ref_clk" in DT, would you consider to remove the
> > delay in your ufs_qcom_dev_ref_clk_ctrl() and let the delay happens via
> > common ufshcd_setup_clocks() only? However you may still need delay if
> > call path comes from ufs_qcom_pwr_change_notify().
> >
> > What do you think?
> >
>
> I agree current change is more reasonable from what it looks, but the
> fact
> is that I canont remove the delay in ufs_qcom_dev_ref_clk_ctrl() even
> with
> this change. On our platforms, ref_clk in DT serves multipule purposes,
> the ref_clk provided to UFS device is actually controlled in
> ufs_qcom_dev_ref_clk_ctrl(), which comes before where this change kicks
> start,
> so if I remove the delay in ufs_qcom_dev_ref_clk_ctrl(), this change
> cannot
> provide us the correct delay before gate the ref_clk provided to UFS
> device.
> > Always putting the delay in the entrance of ufshcd_setup_clocks() may
> > add unwanted delay for vendors, just like your current implementation,
> > or some other vendors who do not want to disable the reference clock.
>
> I meant if we put the delay in the entrance, I will be able to remove
> the delay in ufs_qcom_dev_ref_clk_ctrl(). Meanwhile, we can add proper
> checks before the delay to make sure it is initiated only if ref_clk
> needs
> to be disabled, i.e:
>
> if(!on && !skip_ref_clk && hba->dev_info.clk_gating_wait_us)
> usleep_range();
>
> Does this look better to you?
Firstly thanks so much for above details.
Again this statement may also add unwanted delay if some other vendors
does not have "ref_clk" in DT or they don't/can't disable the reference
clock provided to UFS device.
>
> Anyways, we will see regressions with this change on our platforms, can
> we
> have more discussions before get it merged? It should be OK if you go
> with
> patch #2 alone first, right? Thanks.
Now the fact is that this change will impact your flow and it seems no
solid conclusion yet. Sure I could drop patch #1 and submit patch #2
only first : )
Thanks,
Stanley Chu
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v1 1/2] scsi: ufs: add required delay after gating reference clock
From: Stanley Chu @ 2020-02-20 13:30 UTC (permalink / raw)
To: Can Guo
Cc: linux-scsi, martin.petersen, Asutosh Das, hongwus, avri.altman,
alim.akhtar, jejb, beanhuo, matthias.bgg, bvanassche,
linux-mediatek, linux-arm-kernel, linux-kernel, kuohong.wang,
peter.wang, chun-hung.wu, andy.teng
In-Reply-To: <bbb0b0637d9667d4691a9a28f9988dea@codeaurora.org>
Hi Can,
On Wed, 2020-02-19 at 18:33 +0800, Can Guo wrote:
> Hi Stanley,
>
> On 2020-02-19 17:11, Stanley Chu wrote:
> > Hi Can,
> >
> > On Wed, 2020-02-19 at 10:35 +0800, Can Guo wrote:
> >
> >> Since we all need this delay here, how about put the delay in the
> >> entrence of ufshcd_setup_clocks(), before vops_setup_clocks()?
> >> If so, we can remove all the delays we added in our vops since the
> >> delay anyways delays everything inside ufshcd_setup_clocks().
> >>
> >
> > Always putting the delay in the entrance of ufshcd_setup_clocks() may
> > add unwanted delay for vendors, just like your current implementation,
> > or some other vendors who do not want to disable the reference clock.
> >
> > I think current patch is more reasonable because the delay is applied
> > to
> > clock only named as "ref_clk" specifically.
> >
> > If you needs to keep "ref_clk" in DT, would you consider to remove the
> > delay in your ufs_qcom_dev_ref_clk_ctrl() and let the delay happens via
> > common ufshcd_setup_clocks() only? However you may still need delay if
> > call path comes from ufs_qcom_pwr_change_notify().
> >
> > What do you think?
> >
>
> I agree current change is more reasonable from what it looks, but the
> fact
> is that I canont remove the delay in ufs_qcom_dev_ref_clk_ctrl() even
> with
> this change. On our platforms, ref_clk in DT serves multipule purposes,
> the ref_clk provided to UFS device is actually controlled in
> ufs_qcom_dev_ref_clk_ctrl(), which comes before where this change kicks
> start,
> so if I remove the delay in ufs_qcom_dev_ref_clk_ctrl(), this change
> cannot
> provide us the correct delay before gate the ref_clk provided to UFS
> device.
> > Always putting the delay in the entrance of ufshcd_setup_clocks() may
> > add unwanted delay for vendors, just like your current implementation,
> > or some other vendors who do not want to disable the reference clock.
>
> I meant if we put the delay in the entrance, I will be able to remove
> the delay in ufs_qcom_dev_ref_clk_ctrl(). Meanwhile, we can add proper
> checks before the delay to make sure it is initiated only if ref_clk
> needs
> to be disabled, i.e:
>
> if(!on && !skip_ref_clk && hba->dev_info.clk_gating_wait_us)
> usleep_range();
>
> Does this look better to you?
Firstly thanks so much for above details.
Again this statement may also add unwanted delay if some other vendors
does not have "ref_clk" in DT or they don't/can't disable the reference
clock provided to UFS device.
>
> Anyways, we will see regressions with this change on our platforms, can
> we
> have more discussions before get it merged? It should be OK if you go
> with
> patch #2 alone first, right? Thanks.
Now the fact is that this change will impact your flow and it seems no
solid conclusion yet. Sure I could drop patch #1 and submit patch #2
only first : )
Thanks,
Stanley Chu
^ permalink raw reply
* Re: [PATCH] drm/virtio: fix virtio-gpu resource id creation race
From: Emil Velikov @ 2020-02-20 13:30 UTC (permalink / raw)
To: John Bates; +Cc: David Airlie, Gerd Hoffmann, ML dri-devel, Gurchetan Singh
In-Reply-To: <20200219204002.220744-1-jbates@chromium.org>
Hi John,
On Thu, 20 Feb 2020 at 08:45, John Bates <jbates@chromium.org> wrote:
>
> The previous code was not thread safe and caused
> undefined behavior from spurious duplicate resource IDs.
> In this patch, an atomic_t is used instead. We no longer
> see any duplicate IDs in tests with this change.
>
> Signed-off-by: John Bates <jbates@chromium.org>
Adding a fixes tag like below makes it easier to track. Especially for
Greg and team who are working on stable kernels.
Fixes: 3e93bc2a58aa ("drm/virtio: make resource id workaround runtime
switchable.")
HTH
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* [Bug 206405] kernel crash during boot debian server on qemu+kvm
From: bugzilla-daemon @ 2020-02-20 13:30 UTC (permalink / raw)
To: linux-ide
In-Reply-To: <bug-206405-11633@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=206405
--- Comment #4 from b.zolnierkie@samsung.com ---
On 2/19/20 10:25 PM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=206405
>
> --- Comment #3 from anthony (antdev66@gmail.com) ---
> same problem in version 5.5.5
Hi,
Please check v5.6-rc2 and if it doesn't help please try to do
bisection between v5.4 and v5.5 kernel versions as described in:
Documentation/admin-guide/bug-bisect.rst
Also could you please explain what prevents you from migration to
libata drivers (CONFIG_ATA) from the IDE subsystem (CONFIG_IDE, it
has been deprecated many years ago and is scheduled for removal)?
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply
* Re: [Bug 206405] kernel crash during boot debian server on qemu+kvm
From: Bartlomiej Zolnierkiewicz @ 2020-02-20 13:30 UTC (permalink / raw)
To: bugzilla-daemon; +Cc: linux-ide
In-Reply-To: <bug-206405-11633-Dt7buLdEpp@https.bugzilla.kernel.org/>
On 2/19/20 10:25 PM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=206405
>
> --- Comment #3 from anthony (antdev66@gmail.com) ---
> same problem in version 5.5.5
Hi,
Please check v5.6-rc2 and if it doesn't help please try to do
bisection between v5.4 and v5.5 kernel versions as described in:
Documentation/admin-guide/bug-bisect.rst
Also could you please explain what prevents you from migration to
libata drivers (CONFIG_ATA) from the IDE subsystem (CONFIG_IDE, it
has been deprecated many years ago and is scheduled for removal)?
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply
* [PATCH] Btrfs: fix deadlock during fast fsync when logging prealloc extents beyond eof
From: fdmanana @ 2020-02-20 13:29 UTC (permalink / raw)
To: linux-btrfs
From: Filipe Manana <fdmanana@suse.com>
While logging the prealloc extents of an inode during a fast fsync we call
btrfs_truncate_inode_items(), through btrfs_log_prealloc_extents(), while
holding a read lock on a leaf of the inode's root (not the log root, the
fs/subvol root), and then that function locks the file range in the inode's
iotree. This can lead to a deadlock when:
* the fsync is ranged
* the file has prealloc extents beyond eof
* writeback for a range different from the fsync range starts
during the fsync
* the size of the file is not sector size aligned
Because when finishing an ordered extent we lock first a file range and
then try to COW the fs/subvol tree to insert an extent item.
The following diagram shows how the deadlock can happen.
CPU 1 CPU 2
btrfs_sync_file()
--> for range [0, 1Mb[
--> inode has a size of
1Mb and has 1 prealloc
extent beyond the
i_size, starting at offset
4Mb
flushes all delalloc for the
range [0Mb, 1Mb[ and waits
for the respective ordered
extents to complete
--> before task at CPU 1 locks the
inode, a write into file range
[1Mb, 2Mb + 1Kb[ is made
--> i_size is updated to 2Mb + 1Kb
--> writeback is started for that
range, [1Mb, 2Mb + 4Kb[
--> end offset rounded up to
be sector size aligned
btrfs_log_dentry_safe()
btrfs_log_inode_parent()
btrfs_log_inode()
btrfs_log_changed_extents()
btrfs_log_prealloc_extents()
--> does a search on the
inode's root
--> holds a read lock on
leaf X
btrfs_finish_ordered_io()
--> locks range [1Mb, 2Mb + 4Kb[
--> end offset rounded up
to be sector size aligned
--> tries to cow leaf X, through
insert_reserved_file_extent()
--> already locked by the
task at CPU 1
btrfs_truncate_inode_items()
--> gets an i_size of
2Mb + 1Kb, which is
not sector size
aligned
--> tries to lock file
range [2Mb, (u64)-1[
--> the start range
is rounded down
from 2Mb + 1K
to 2Mb to be sector
size aligned
--> but the subrange
[2Mb, 2Mb + 4Kb[ is
already locked by
task at CPU 2 which
is waiting to get a
write lock on leaf X
for which we are
holding a read lock
*** deadlock ***
This results in a stack trace like the following, triggered by test case
generic/561 from fstests:
[ 2779.973608] INFO: task kworker/u8:6:247 blocked for more than 120 seconds.
[ 2779.979536] Not tainted 5.6.0-rc2-btrfs-next-53 #1
[ 2779.984503] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 2779.990136] kworker/u8:6 D 0 247 2 0x80004000
[ 2779.990457] Workqueue: btrfs-endio-write btrfs_work_helper [btrfs]
[ 2779.990466] Call Trace:
[ 2779.990491] ? __schedule+0x384/0xa30
[ 2779.990521] schedule+0x33/0xe0
[ 2779.990616] btrfs_tree_read_lock+0x19e/0x2e0 [btrfs]
[ 2779.990632] ? remove_wait_queue+0x60/0x60
[ 2779.990730] btrfs_read_lock_root_node+0x2f/0x40 [btrfs]
[ 2779.990782] btrfs_search_slot+0x510/0x1000 [btrfs]
[ 2779.990869] btrfs_lookup_file_extent+0x4a/0x70 [btrfs]
[ 2779.990944] __btrfs_drop_extents+0x161/0x1060 [btrfs]
[ 2779.990987] ? mark_held_locks+0x6d/0xc0
[ 2779.990994] ? __slab_alloc.isra.49+0x99/0x100
[ 2779.991060] ? insert_reserved_file_extent.constprop.19+0x64/0x300 [btrfs]
[ 2779.991145] insert_reserved_file_extent.constprop.19+0x97/0x300 [btrfs]
[ 2779.991222] ? start_transaction+0xdd/0x5c0 [btrfs]
[ 2779.991291] btrfs_finish_ordered_io+0x4f4/0x840 [btrfs]
[ 2779.991405] btrfs_work_helper+0xaa/0x720 [btrfs]
[ 2779.991432] process_one_work+0x26d/0x6a0
[ 2779.991460] worker_thread+0x4f/0x3e0
[ 2779.991481] ? process_one_work+0x6a0/0x6a0
[ 2779.991489] kthread+0x103/0x140
[ 2779.991499] ? kthread_create_worker_on_cpu+0x70/0x70
[ 2779.991515] ret_from_fork+0x3a/0x50
(...)
[ 2780.026211] INFO: task fsstress:17375 blocked for more than 120 seconds.
[ 2780.027480] Not tainted 5.6.0-rc2-btrfs-next-53 #1
[ 2780.028482] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 2780.030035] fsstress D 0 17375 17373 0x00004000
[ 2780.030038] Call Trace:
[ 2780.030044] ? __schedule+0x384/0xa30
[ 2780.030052] schedule+0x33/0xe0
[ 2780.030075] lock_extent_bits+0x20c/0x320 [btrfs]
[ 2780.030094] ? btrfs_truncate_inode_items+0xf4/0x1150 [btrfs]
[ 2780.030098] ? rcu_read_lock_sched_held+0x59/0xa0
[ 2780.030102] ? remove_wait_queue+0x60/0x60
[ 2780.030122] btrfs_truncate_inode_items+0x133/0x1150 [btrfs]
[ 2780.030151] ? btrfs_set_path_blocking+0xb2/0x160 [btrfs]
[ 2780.030165] ? btrfs_search_slot+0x379/0x1000 [btrfs]
[ 2780.030195] btrfs_log_changed_extents.isra.8+0x841/0x93e [btrfs]
[ 2780.030202] ? do_raw_spin_unlock+0x49/0xc0
[ 2780.030215] ? btrfs_get_num_csums+0x10/0x10 [btrfs]
[ 2780.030239] btrfs_log_inode+0xf83/0x1124 [btrfs]
[ 2780.030251] ? __mutex_unlock_slowpath+0x45/0x2a0
[ 2780.030275] btrfs_log_inode_parent+0x2a0/0xe40 [btrfs]
[ 2780.030282] ? dget_parent+0xa1/0x370
[ 2780.030309] btrfs_log_dentry_safe+0x4a/0x70 [btrfs]
[ 2780.030329] btrfs_sync_file+0x3f3/0x490 [btrfs]
[ 2780.030339] do_fsync+0x38/0x60
[ 2780.030343] __x64_sys_fdatasync+0x13/0x20
[ 2780.030345] do_syscall_64+0x5c/0x280
[ 2780.030348] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 2780.030356] RIP: 0033:0x7f2d80f6d5f0
[ 2780.030361] Code: Bad RIP value.
[ 2780.030362] RSP: 002b:00007ffdba3c8548 EFLAGS: 00000246 ORIG_RAX: 000000000000004b
[ 2780.030364] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f2d80f6d5f0
[ 2780.030365] RDX: 00007ffdba3c84b0 RSI: 00007ffdba3c84b0 RDI: 0000000000000003
[ 2780.030367] RBP: 000000000000004a R08: 0000000000000001 R09: 00007ffdba3c855c
[ 2780.030368] R10: 0000000000000078 R11: 0000000000000246 R12: 00000000000001f4
[ 2780.030369] R13: 0000000051eb851f R14: 00007ffdba3c85f0 R15: 0000557a49220d90
So fix this by making btrfs_truncate_inode_items() not lock the range in
the inode's iotree when the target root is a log root, since it's not
needed to lock the range for log roots as the protection from the inode's
lock and log_mutex are all that's needed.
Fixes: 28553fa992cb28 ("Btrfs: fix race between shrinking truncate and fiemap")
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
fs/btrfs/inode.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 594ced31a7a8..6fb9096e0e9f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4119,8 +4119,9 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
return -ENOMEM;
path->reada = READA_BACK;
- lock_extent_bits(&BTRFS_I(inode)->io_tree, lock_start, (u64)-1,
- &cached_state);
+ if (root->root_key.objectid != BTRFS_TREE_LOG_OBJECTID)
+ lock_extent_bits(&BTRFS_I(inode)->io_tree, lock_start, (u64)-1,
+ &cached_state);
/*
* We want to drop from the next block forward in case this new size is
@@ -4411,11 +4412,10 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
if (!ret && last_size > new_size)
last_size = new_size;
btrfs_inode_safe_disk_i_size_write(inode, last_size);
+ unlock_extent_cached(&BTRFS_I(inode)->io_tree, lock_start,
+ (u64)-1, &cached_state);
}
- unlock_extent_cached(&BTRFS_I(inode)->io_tree, lock_start, (u64)-1,
- &cached_state);
-
btrfs_free_path(path);
return ret;
}
--
2.25.0
^ permalink raw reply related
* Re: [arm64, debug] PTRACE_SINGLESTEP does not single-step a valid instruction
From: Will Deacon @ 2020-02-20 13:29 UTC (permalink / raw)
To: Mark Rutland; +Cc: Luis Machado, linux-arm-kernel
In-Reply-To: <20200220130222.GA28634@lakrids.cambridge.arm.com>
Hi Mark,
Thanks for having a look.
On Thu, Feb 20, 2020 at 01:02:22PM +0000, Mark Rutland wrote:
> On Thu, Feb 13, 2020 at 12:01:16PM +0000, Will Deacon wrote:
> > diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
> > index cd6e5fa48b9c..d479fbcbd0d2 100644
> > --- a/arch/arm64/kernel/ptrace.c
> > +++ b/arch/arm64/kernel/ptrace.c
> > @@ -1934,8 +1934,8 @@ static int valid_native_regs(struct user_pt_regs *regs)
> > */
> > int valid_user_regs(struct user_pt_regs *regs, struct task_struct *task)
> > {
> > - if (!test_tsk_thread_flag(task, TIF_SINGLESTEP))
> > - regs->pstate &= ~DBG_SPSR_SS;
> > + /* https://lore.kernel.org/lkml/20191118131525.GA4180@willie-the-truck */
> > + user_regs_reset_single_step(regs, task);
>
> I think this change means we do the right thing for signal entry/return
> and ptrace messing with the regs. Instruction emulation seems to do the
> right thing via skip_faulting_instruction().
>
> I think there are a few more single-step edge cases lying around (e.g.
> uprobes, rseq), but it looks like those have to be fixed separately. I
> fear fixing uprobes might require a largler structural change to single
> step, but ignoring uprobes the changes above seem to be sound.
Rseq should just abort when delivering the step signal and I'm not sure I
see the issue with uprobes. Can you elaborate on your concerns a bit,
please?
> If userspace doesn't consume the SS value today, I wonder if we should
> hide it when dumping the SPSR to userspace, so that userspace has a
> consistent view regardless of whether it's being stepped.
You can't really hide it though, because '0' has a meaning so I don't think
it gains us a lot other than increasing the scope of the change.
> I'll try to dig into the uprobes stuff this afternoon, just in case that
> needs us to do something substantially different.
Thanks.
> The existing logic in valid_user_regs() doesn't make sense to me, given
> SPSR_EL1.SS is immaterial unless MSCDR_EL1.SS == 1. I'm not sure if that
> was overzealous or I've forgotten an edge case that we cared about in
> the past.
I think it was just part of sanitising the registers to a consistent value,
but I agree that it wouldn't have a functional impact.
> > diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
> > index 339882db5a91..bc54bdbfd760 100644
> > --- a/arch/arm64/kernel/signal.c
> > +++ b/arch/arm64/kernel/signal.c
> > @@ -505,8 +505,12 @@ static int restore_sigframe(struct pt_regs *regs,
> > forget_syscall(regs);
> >
> > err |= !valid_user_regs(®s->user_regs, current);
> > - if (err == 0)
> > +
> > + if (err == 0) {
> > + /* Make it look like we stepped the sigreturn system call */
> > + user_fastforward_single_step(current);
> > err = parse_user_sigframe(&user, sf);
> > + }
>
> I don't understand this. AFAICT we don't likewise for other SVCs, so
> either I'm missing that, or there's something else I'm missing.
>
> Why do we need to step sigreturn but not SVC generally?
Because we restore the SPSR from the sigframe during sigreturn, so we will
end up with PSTATE.SS set when it should be cleared.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* rt_task_bind blocking: inter-process ?
From: LOCHE Daniel @ 2020-02-20 13:29 UTC (permalink / raw)
To: xenomai
Hello everyone,
I a currently factoring my application to go from a multi-thread one to
a multi-process one (C++11).
I am using Xenomai 3.0.5 on Linux Mint 18.04 (on a Intel 8250U
computer), 90% alchemy library (10% posix).
(either processes or tasks, let's call all of those "tasks" here after
for easier understanding)
*Context : *Basically, during the setup phase of the execution,
previously I was reading a list of "task" parameters from a file
and launched consequently the correct amount of rt_task_create() /
launch() from my main process.
All my RT_TASK links to the threads were stored in the main thread to
manage them.
Now, I have to go through a fork() for every task, followed by a
rt_task_shadow(). OK.
But to get in my main process the link to the RT_TASK of every xenomai
process created, I have to use rt_task_bind().
Issue is here : whatever arguments I give to rt_task_bind(), it blocks
as long as the searched task name exists... don't know why.
Here is a sample code bellow ... what is wrong exactly ? Is it possible
to use rt_task_bind with inter-process tasks..? Why the "TM_NONBLOCK"
does nothing..? Thanks for your help.
Daniel
#include <alchemy/task.h>
#include <alchemy/timer.h>
#include <sys/types.h>
#include <unistd.h>
int main ()
{
const char* taskNames[3] = {"task0", "task1", "task2"};
for (int i = 0, i < 3, ++i)
{
pid_t pid = fork()
if (pid) //
{
sleep(1); // wait a little before going through another
fork.
} else { // child process
RT_TASK _t;
rt_task_shadow(&_t, taskNames[i], 50, 0);
rt_printf("Success creating task %s", taskNames[i]);
sleep(15); /* placeholder, should do real-time stuff
here, then end process. */
exit(EXIT_SUCCESS);
}
}
// Only "main" process goes here.
RT_TASK _t;
for (int i = 0, i < 3, ++i)
{
int ret = rt_task_bind(&t, taskNames[i], TM_NONBLOCK); // <==
HERE. TM_NONBLOCK, TM_INFINITE or a time value, changes nothing....
never goes here.
if (ret) printf("Error : could not bind task. Error #%d", ret);
else printf("Bind to task %s done.", taskNames[i]);
}
/* Do stuff here on the binded tasks */
exit(EXIT_SUCCESS);
}
^ permalink raw reply
* Re: [Intel-gfx] [PATCH v17 3/7] drm/i915: Init obj state in intel_atomic_get_old/new_global_obj_state
From: Lisovskiy, Stanislav @ 2020-02-20 13:29 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org, jani.nikula@linux.intel.com
In-Reply-To: <f770e54f703754728615e4516e583cdc5906f461.camel@intel.com>
On Thu, 2020-02-20 at 15:11 +0200, stanislav.lisovskiy@intel.com wrote:
> On Thu, 2020-02-20 at 14:40 +0200, Jani Nikula wrote:
> > On Thu, 20 Feb 2020, Stanislav Lisovskiy <
> > stanislav.lisovskiy@intel.com> wrote:
> > > We might be willing to call intel_atomic_get_old_global_obj_state
> > > and intel_atomic_get_new_global_obj_state right away, however
> > > those are not initializing global obj state as
> > > intel_atomic_get_global_obj_state does.
> > > Extracted initializing part to separate function and now using
> > > this
> > > also in intel_atomic_get_old_global_obj_state and
> > > intel_atomic_get_new_global_obj_state
> > >
> > > v2: - Fixed typo in function call
> > >
> > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com
> > > >
> > > ---
> > > drivers/gpu/drm/i915/display/intel_bw.c | 28
> > > ++++++++++++++++++++++++-
> > > drivers/gpu/drm/i915/display/intel_bw.h | 9 ++++++++
> > > 2 files changed, 36 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c
> > > b/drivers/gpu/drm/i915/display/intel_bw.c
> > > index 58b264bc318d..ff57277e8880 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_bw.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_bw.c
> > > @@ -374,7 +374,33 @@ static unsigned int
> > > intel_bw_data_rate(struct
> > > drm_i915_private *dev_priv,
> > > return data_rate;
> > > }
> > >
> > > -static struct intel_bw_state *
> > > +struct intel_bw_state *
> > > +intel_atomic_get_old_bw_state(struct intel_atomic_state *state)
> > > +{
> > > + struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > > + struct intel_global_state *bw_state;
> > > +
> > > + bw_state = intel_atomic_get_old_global_obj_state(state,
> > > &dev_priv->bw_obj);
> > > + if (IS_ERR(bw_state))
> > > + return ERR_CAST(bw_state);
> > > +
> > > + return to_intel_bw_state(bw_state);
> > > +}
> > > +
> > > +struct intel_bw_state *
> > > +intel_atomic_get_new_bw_state(struct intel_atomic_state *state)
> > > +{
> > > + struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > > + struct intel_global_state *bw_state;
> > > + bw_state = intel_atomic_get_new_global_obj_state(state,
> > > &dev_priv->bw_obj);
> > > +
> > > + if (IS_ERR(bw_state))
> > > + return ERR_CAST(bw_state);
> > > +
> > > + return to_intel_bw_state(bw_state);
> > > +}
> > > +
> > > +struct intel_bw_state *
> > > intel_atomic_get_bw_state(struct intel_atomic_state *state)
> > > {
> > > struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > > diff --git a/drivers/gpu/drm/i915/display/intel_bw.h
> > > b/drivers/gpu/drm/i915/display/intel_bw.h
> > > index a8aa7624c5aa..ac004d6f4276 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_bw.h
> > > +++ b/drivers/gpu/drm/i915/display/intel_bw.h
> > > @@ -24,6 +24,15 @@ struct intel_bw_state {
> > >
> > > #define to_intel_bw_state(x) container_of((x), struct
> > > intel_bw_state, base)
> > >
> > > +struct intel_bw_state *
> > > +intel_atomic_get_old_bw_state(struct intel_atomic_state *state);
> > > +
> > > +struct intel_bw_state *
> > > +intel_atomic_get_new_bw_state(struct intel_atomic_state *state);
> > > +
> > > +struct intel_bw_state *
> > > +intel_atomic_get_bw_state(struct intel_atomic_state *state);
> > > +
> >
> > I'm trying to promote a convention that a module foo_bar.[ch] would
> > export functions prefixed foo_bar_. Here, intel_bw_* like below.
>
> I'm fine with that. However most of the functions in this file have
> intel_atomic_* prefix, so if I now follow this convention it won't be
> consistent with current naming in the file.
Actually, I was wrong. Was looking into intel_global_state.c instead of
intel_bw.c. Yes, that totally makes sense.
Stan
>
> Anyway if this is now mandatory, will change it. Just will wait now
> first if CI doesn't blow up with this series, as I haven't rebased it
> for a while..
>
> Stan
>
> >
> > BR,
> > Jani.
> >
> >
> > > void intel_bw_init_hw(struct drm_i915_private *dev_priv);
> > > int intel_bw_init(struct drm_i915_private *dev_priv);
> > > int intel_bw_atomic_check(struct intel_atomic_state *state);
> >
> >
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [RFC PATCH v3 01/27] qcow2: Add calculate_l2_meta()
From: Max Reitz @ 2020-02-20 13:28 UTC (permalink / raw)
To: Alberto Garcia, qemu-devel
Cc: Kevin Wolf, Anton Nefedov, qemu-block,
Vladimir Sementsov-Ogievskiy, Denis V . Lunev
In-Reply-To: <2d53eae8fe9b9ab262daee45b662f631c3ba3899.1577014346.git.berto@igalia.com>
[-- Attachment #1.1: Type: text/plain, Size: 521 bytes --]
On 22.12.19 12:36, Alberto Garcia wrote:
> handle_alloc() creates a QCowL2Meta structure in order to update the
> image metadata and perform the necessary copy-on-write operations.
>
> This patch moves that code to a separate function so it can be used
> from other places.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> block/qcow2-cluster.c | 77 +++++++++++++++++++++++++++++--------------
> 1 file changed, 53 insertions(+), 24 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Please pull mmc mmc-2-19-2020
From: Tom Rini @ 2020-02-20 13:28 UTC (permalink / raw)
To: u-boot
In-Reply-To: <DB7PR04MB449084B2D116FE705FCDFD3A88130@DB7PR04MB4490.eurprd04.prod.outlook.com>
On Thu, Feb 20, 2020 at 06:52:18AM +0000, Peng Fan wrote:
> > Subject: Re: Please pull mmc mmc-2-19-2020
> >
> > Hi Peng,
> >
> > On Thu, Feb 20, 2020 at 1:34 PM Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Thu, Feb 20, 2020 at 01:56:41AM +0000, Peng Fan wrote:
> > >
> > > > Hi Tom
> > > >
> > > > Please pull mmc-2-29-2020.
> > > >
> > >
> > > NAK, this breaks nios2:
> > > nios2: + 10m50 3c120
> > > +(10m50,3c120) ../drivers/net/altera_tse.c: In function 'altera_tse_probe':
> > > +(10m50,3c120) ../drivers/net/altera_tse.c:646:15: error: implicit
> > declaration of function 'dma_alloc_coherent'; did you mean 'lmb_alloc_addr'?
> > [-Werror=implicit-function-declaration]
> > > +(10m50,3c120) desc_mem = dma_alloc_coherent(len, &addr);
> > > +(10m50,3c120) ^~~~~~~~~~~~~~~~~~
> > > +(10m50,3c120) lmb_alloc_addr
> > > +(10m50,3c120) ../drivers/net/altera_tse.c:646:13: error: assignment
> > makes pointer from integer without a cast [-Werror=int-conversion]
> > > +(10m50,3c120) ^
> > > +(10m50,3c120) cc1: all warnings being treated as errors
> > > +(10m50,3c120) make[2]: *** [drivers/net/altera_tse.o] Error 1
> > > +(10m50,3c120) make[1]: *** [drivers/net] Error 2
> > > +(10m50,3c120) make: *** [sub-make] Error 2
>
> I not met such issue in github ci.
Travis is indeed missing nios2 tests but it's in GitLab / Azure.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200220/2ede6cda/attachment.sig>
^ permalink raw reply
* Re: [PATCH v6 2/4] dt-bindings: power: add Amlogic secure power domains bindings
From: Rob Herring @ 2020-02-20 13:27 UTC (permalink / raw)
To: Jianxin Pan
Cc: devicetree, Hanjie Lin, Victor Wan, open list:THERMAL,
Martin Blumenstingl, Kevin Hilman, Neil Armstrong,
linux-kernel@vger.kernel.org, Jian Hu, Xingyu Chen,
open list:ARM/Amlogic Meson...,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
Jerome Brunet
In-Reply-To: <1579087831-94965-3-git-send-email-jianxin.pan@amlogic.com>
On Wed, Jan 15, 2020 at 5:30 AM Jianxin Pan <jianxin.pan@amlogic.com> wrote:
>
> Add the bindings for the Amlogic Secure power domains, controlling the
> secure power domains.
>
> The bindings targets the Amlogic A1 and C1 compatible SoCs, in which the
> power domain registers are in secure world.
>
> Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
> ---
> .../bindings/power/amlogic,meson-sec-pwrc.yaml | 40 ++++++++++++++++++++++
> include/dt-bindings/power/meson-a1-power.h | 32 +++++++++++++++++
> 2 files changed, 72 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> create mode 100644 include/dt-bindings/power/meson-a1-power.h
>
> diff --git a/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> new file mode 100644
> index 00000000..af32209
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +# Copyright (c) 2019 Amlogic, Inc
> +# Author: Jianxin Pan <jianxin.pan@amlogic.com>
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/power/amlogic,meson-sec-pwrc.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Amlogic Meson Secure Power Domains
> +
> +maintainers:
> + - Jianxin Pan <jianxin.pan@amlogic.com>
> +
> +description: |+
> + Secure Power Domains used in Meson A1/C1 SoCs, and should be the child node
> + of secure-monitor.
> +
> +properties:
> + compatible:
> + enum:
> + - amlogic,meson-a1-pwrc
> +
> + "#power-domain-cells":
> + const: 1
> +
> +required:
> + - compatible
> + - "#power-domain-cells"
> +
> +examples:
> + - |
> + secure-monitor {
> + compatible = "amlogic,meson-gxbb-sm";
> +
> + pwrc: power-controller {
> + compatible = "amlogic,meson-a1-pwrc";
> + #power-domain-cells = <1>;
> + };
> + }
Missing ';':
Error: Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.example.dts:27.5-6
syntax error
FATAL ERROR: Unable to parse input tree
Please fix this as linux-next is now failing dt_binding_check.
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v6 2/4] dt-bindings: power: add Amlogic secure power domains bindings
From: Rob Herring @ 2020-02-20 13:27 UTC (permalink / raw)
To: Jianxin Pan
Cc: devicetree, Hanjie Lin, Victor Wan, open list:THERMAL,
Martin Blumenstingl, Kevin Hilman, Neil Armstrong,
linux-kernel@vger.kernel.org, Jian Hu, Xingyu Chen,
open list:ARM/Amlogic Meson...,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
Jerome Brunet
In-Reply-To: <1579087831-94965-3-git-send-email-jianxin.pan@amlogic.com>
On Wed, Jan 15, 2020 at 5:30 AM Jianxin Pan <jianxin.pan@amlogic.com> wrote:
>
> Add the bindings for the Amlogic Secure power domains, controlling the
> secure power domains.
>
> The bindings targets the Amlogic A1 and C1 compatible SoCs, in which the
> power domain registers are in secure world.
>
> Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
> ---
> .../bindings/power/amlogic,meson-sec-pwrc.yaml | 40 ++++++++++++++++++++++
> include/dt-bindings/power/meson-a1-power.h | 32 +++++++++++++++++
> 2 files changed, 72 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> create mode 100644 include/dt-bindings/power/meson-a1-power.h
>
> diff --git a/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> new file mode 100644
> index 00000000..af32209
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +# Copyright (c) 2019 Amlogic, Inc
> +# Author: Jianxin Pan <jianxin.pan@amlogic.com>
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/power/amlogic,meson-sec-pwrc.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Amlogic Meson Secure Power Domains
> +
> +maintainers:
> + - Jianxin Pan <jianxin.pan@amlogic.com>
> +
> +description: |+
> + Secure Power Domains used in Meson A1/C1 SoCs, and should be the child node
> + of secure-monitor.
> +
> +properties:
> + compatible:
> + enum:
> + - amlogic,meson-a1-pwrc
> +
> + "#power-domain-cells":
> + const: 1
> +
> +required:
> + - compatible
> + - "#power-domain-cells"
> +
> +examples:
> + - |
> + secure-monitor {
> + compatible = "amlogic,meson-gxbb-sm";
> +
> + pwrc: power-controller {
> + compatible = "amlogic,meson-a1-pwrc";
> + #power-domain-cells = <1>;
> + };
> + }
Missing ';':
Error: Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.example.dts:27.5-6
syntax error
FATAL ERROR: Unable to parse input tree
Please fix this as linux-next is now failing dt_binding_check.
Rob
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply
* 回复: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
From: Liu, Monk @ 2020-02-20 13:28 UTC (permalink / raw)
To: Li, Dennis, Koenig, Christian, Zhang, Hawking,
amd-gfx@lists.freedesktop.org, Deucher, Alexander, Zhou1, Tao,
Chen, Guchun
In-Reply-To: <MN2PR12MB3167C68A5B6AF0E97613A6A4ED130@MN2PR12MB3167.namprd12.prod.outlook.com>
so the scenario is:
KMD doing page update -> ECC -> baco reset (mute SDMA scheduler) -> drm_sched_entity_get_free_sched() return NULL -> you get your NULL pointer
And your approach is to introduce a bail out in the amdgpu_vm_sdma_commit() so the original amdgpu vm update jobs will be dropped,
That really can fix your NULL pointer issue, but actually bring another issue: you didn't finish the vm update work !
my initial idea is you do something like:
static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
...
struct amdgpu_device *adev = p->adev;
while (!mutex_trylock(&adev->lock_reset)) //means GPU is under recovering
msleep(xxx);
....
mutex_unlock(&adev->lock_reset); //this put at the end of this routine
}
that do make our implement more complicated, but at least it doesn't drop the necessary vm update, otherwise you will run into other problems ...
@Koenig, Christian do you have another solution ?
Thanks
-----邮件原件-----
发件人: Li, Dennis <Dennis.Li@amd.com>
发送时间: 2020年2月20日 16:41
收件人: Liu, Monk <Monk.Liu@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>
主题: RE: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
[AMD Official Use Only - Internal Distribution Only]
Hi, Christian and Monk,
When doing SDMA copy, a RAS uncorrectable error happens, which will cause this issue. The RAS uncorrectable error event will trigger driver to do BACO reset which will set the status of SDMA scheduler to no ready. And then drm_sched_entity_get_free_sched will return NULL in drm_sched_entity_select_rq, which cause entity->rq to NULL.
Best Regards
Dennis Li
-----Original Message-----
From: Liu, Monk <Monk.Liu@amd.com>
Sent: Wednesday, February 19, 2020 7:30 PM
To: Koenig, Christian <Christian.Koenig@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Li, Dennis <Dennis.Li@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>
Subject: 回复: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
> + if (!entity->rq)
> + return 0;
> +
Yes, supposedly we shouldn't get 'entity->rq == NULL' case , that looks the true bug
-----邮件原件-----
发件人: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Christian K?nig
发送时间: 2020年2月19日 18:50
收件人: Zhang, Hawking <Hawking.Zhang@amd.com>; Li, Dennis <Dennis.Li@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>
主题: Re: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
Well of hand this patch looks like a clear NAK to me.
Returning without raising an error is certainly the wrong thing to do here because we just drop the necessary page table updates.
How does the entity->rq ends up as NULL in the first place?
Regards,
Christian.
Am 19.02.20 um 07:26 schrieb Zhang, Hawking:
> [AMD Official Use Only - Internal Distribution Only]
>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
>
> Regards,
> Hawking
> -----Original Message-----
> From: Dennis Li <Dennis.Li@amd.com>
> Sent: Wednesday, February 19, 2020 12:05
> To: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Zhang,
> Hawking <Hawking.Zhang@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>
> Cc: Li, Dennis <Dennis.Li@amd.com>
> Subject: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
>
> check whether the queue of entity is null to avoid null pointer dereference.
>
> Change-Id: I08d56774012cf229ba2fe7a011c1359e8d1e2781
> Signed-off-by: Dennis Li <Dennis.Li@amd.com>
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
> index 4cc7881f438c..67cca463ddcc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
> @@ -95,6 +95,9 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
> int r;
>
> entity = p->direct ? &p->vm->direct : &p->vm->delayed;
> + if (!entity->rq)
> + return 0;
> +
> ring = container_of(entity->rq->sched, struct amdgpu_ring, sched);
>
> WARN_ON(ib->length_dw == 0);
> --
> 2.17.1
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmo
> nk.liu%40amd.com%7C28e7260af3a24eec758f08d7b52975e3%7C3dd8961fe4884e60
> 8e11a82d994e183d%7C0%7C0%7C637177062003213431&sdata=vMXmhwTlN8lAav
> uqhYhpmKLM6V%2F%2B2%2FubFBbsk%2BGY%2Bjw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmonk.liu%40amd.com%7C28e7260af3a24eec758f08d7b52975e3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637177062003213431&sdata=vMXmhwTlN8lAavuqhYhpmKLM6V%2F%2B2%2FubFBbsk%2BGY%2Bjw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply
* Re: [PATCH v6 2/4] dt-bindings: power: add Amlogic secure power domains bindings
From: Rob Herring @ 2020-02-20 13:27 UTC (permalink / raw)
To: Jianxin Pan
Cc: Kevin Hilman, open list:ARM/Amlogic Meson..., Neil Armstrong,
Jerome Brunet, Martin Blumenstingl, open list:THERMAL,
linux-kernel@vger.kernel.org,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
devicetree, Jian Hu, Hanjie Lin, Victor Wan, Xingyu Chen
In-Reply-To: <1579087831-94965-3-git-send-email-jianxin.pan@amlogic.com>
On Wed, Jan 15, 2020 at 5:30 AM Jianxin Pan <jianxin.pan@amlogic.com> wrote:
>
> Add the bindings for the Amlogic Secure power domains, controlling the
> secure power domains.
>
> The bindings targets the Amlogic A1 and C1 compatible SoCs, in which the
> power domain registers are in secure world.
>
> Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
> ---
> .../bindings/power/amlogic,meson-sec-pwrc.yaml | 40 ++++++++++++++++++++++
> include/dt-bindings/power/meson-a1-power.h | 32 +++++++++++++++++
> 2 files changed, 72 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> create mode 100644 include/dt-bindings/power/meson-a1-power.h
>
> diff --git a/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> new file mode 100644
> index 00000000..af32209
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +# Copyright (c) 2019 Amlogic, Inc
> +# Author: Jianxin Pan <jianxin.pan@amlogic.com>
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/power/amlogic,meson-sec-pwrc.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Amlogic Meson Secure Power Domains
> +
> +maintainers:
> + - Jianxin Pan <jianxin.pan@amlogic.com>
> +
> +description: |+
> + Secure Power Domains used in Meson A1/C1 SoCs, and should be the child node
> + of secure-monitor.
> +
> +properties:
> + compatible:
> + enum:
> + - amlogic,meson-a1-pwrc
> +
> + "#power-domain-cells":
> + const: 1
> +
> +required:
> + - compatible
> + - "#power-domain-cells"
> +
> +examples:
> + - |
> + secure-monitor {
> + compatible = "amlogic,meson-gxbb-sm";
> +
> + pwrc: power-controller {
> + compatible = "amlogic,meson-a1-pwrc";
> + #power-domain-cells = <1>;
> + };
> + }
Missing ';':
Error: Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.example.dts:27.5-6
syntax error
FATAL ERROR: Unable to parse input tree
Please fix this as linux-next is now failing dt_binding_check.
Rob
^ permalink raw reply
* [PATCH] arm64: defconfig: Enable REGULATOR_MP8859
From: sunil @ 2020-02-20 13:27 UTC (permalink / raw)
To: heiko, catalin.marinas, will
Cc: Markus Reichl, linux-rockchip, linux-kernel, linux-arm-kernel,
Jagan Teki
From: Jagan Teki <jagan@amarulasolutions.com>
RK3399 boards like ROC-RK3399-PC is using MP8859 DC/DC converter
for 12V supply.
roc-rk3399-pc initially used 12V fixed regulator for this supply,
but the below commit has switched to use MP8859.
commit <1fc61ed04d309b0b8b3562acf701ab988eee12de> "arm64: dts: rockchip:
Enable mp8859 regulator on rk3399-roc-pc"
So, enable bydefault on the defconfig.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Cc: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com>
---
Note:
This change set is applied on top of linux-rockchip, branch v5.7-armsoc/dts64.
(git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git -b v5.7-armsoc/dts64)
This change set was tested on ROC-RK3399-PC, an rk3399 based target.
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 0f21288..973a493 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -505,6 +505,7 @@ CONFIG_REGULATOR_QCOM_RPMH=y
CONFIG_REGULATOR_QCOM_SMD_RPM=y
CONFIG_REGULATOR_QCOM_SPMI=y
CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_MP8859=y
CONFIG_REGULATOR_S2MPS11=y
CONFIG_REGULATOR_VCTRL=m
CONFIG_RC_CORE=m
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] drm/amdgpu/display: fix logic inversion in program_timing_sync()
From: Alex Deucher @ 2020-02-20 13:27 UTC (permalink / raw)
To: Kazlauskas, Nicholas
Cc: Bhawanpreet Lakha, Wenjing Liu, amd-gfx list, Laktyushkin, Dmytro,
Alex Deucher, Harry Wentland
In-Reply-To: <07041392-d18f-821e-4271-c94008818399@amd.com>
On Tue, Feb 4, 2020 at 9:06 AM Kazlauskas, Nicholas
<nicholas.kazlauskas@amd.com> wrote:
>
> Comments inline.
>
> On 2020-02-03 4:07 p.m., Alex Deucher wrote:
> > Ping?
> >
> > On Fri, Jan 10, 2020 at 3:11 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> >>
> >> It looks like we should be reducing the group size when we don't
> >> have a plane rather than when we do.
> >>
> >> Bug: https://gitlab.freedesktop.org/drm/amd/issues/781
> >> Fixes: 5fc0cbfad45648 ("drm/amd/display: determine if a pipe is synced by plane state")
> >> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> >> ---
> >> drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> >> index 3d89904003f0..01b27726d9c5 100644
> >> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> >> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> >> @@ -1003,9 +1003,9 @@ static void program_timing_sync(
> >> status->timing_sync_info.master = false;
> >>
> >> }
> >> - /* remove any other pipes with plane as they have already been synced */
> >> + /* remove any other pipes without plane as they have already been synced */
>
> This took a while to wrap my head around but I think I understand what
> this was originally trying to do.
>
> The original logic seems to have been checking for blanked streams and
> trying to remove anything that was blanked from the group to try and
> avoid having to enable timing synchronization.
>
> However, the logic for blanked is *not* the same as having a
> plane_state. Technically you can drive an OTG without anything connected
> in the front end and it'll just draw out the back color - which is
> distinct from having the OTG be blanked.
>
> The problem is really this iteration below:
>
> >> for (j = j + 1; j < group_size; j++) {
>
> There could still be pipes in here (depending on the ordering) that have
> planes and could be synchronized with the master OTG. I think starting
> at j + 1 is a mistake for this logic as well.
>
> I wonder if we can just drop this loop altogether. If we add planes or
> unblank the OTG later then we'll still want the synchronization.
>
> Dymtro, Wenjing - feel free to correct my understanding if I'm mistaken
> about this.
Ping? Any thoughts on this? It would be nice to get this fixed.
Alex
>
> Regards,
> Nicholas Kazlauskas
>
> >> - if (pipe_set[j]->plane_state) {
> >> + if (!pipe_set[j]->plane_state) {
> >> group_size--;
> >> pipe_set[j] = pipe_set[group_size];
> >> j--;
> >> --
> >> 2.24.1
> >>
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> >
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply
* Re: [PATCH] s390/sclp: improve special wait psw logic
From: David Hildenbrand @ 2020-02-20 13:26 UTC (permalink / raw)
To: Christian Borntraeger, Cornelia Huck
Cc: Janosch Frank, qemu-s390x, qemu-stable, qemu-devel,
Richard Henderson
In-Reply-To: <1582204582-22995-1-git-send-email-borntraeger@de.ibm.com>
On 20.02.20 14:16, Christian Borntraeger wrote:
> There is a special quiesce PSW that we check for "shutdown". Otherwise disabled
> wait is detected as "crashed". Architecturally we must only check PSW bits
> 116-127. Fix this.
>
> Cc: qemu-stable@nongnu.org
Is this really stable material?
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply
* [PATCH] arm64: defconfig: Enable REGULATOR_MP8859
From: sunil @ 2020-02-20 13:27 UTC (permalink / raw)
To: heiko, catalin.marinas, will
Cc: linux-arm-kernel, linux-kernel, linux-rockchip, Jagan Teki,
Markus Reichl
From: Jagan Teki <jagan@amarulasolutions.com>
RK3399 boards like ROC-RK3399-PC is using MP8859 DC/DC converter
for 12V supply.
roc-rk3399-pc initially used 12V fixed regulator for this supply,
but the below commit has switched to use MP8859.
commit <1fc61ed04d309b0b8b3562acf701ab988eee12de> "arm64: dts: rockchip:
Enable mp8859 regulator on rk3399-roc-pc"
So, enable bydefault on the defconfig.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Cc: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com>
---
Note:
This change set is applied on top of linux-rockchip, branch v5.7-armsoc/dts64.
(git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git -b v5.7-armsoc/dts64)
This change set was tested on ROC-RK3399-PC, an rk3399 based target.
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 0f21288..973a493 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -505,6 +505,7 @@ CONFIG_REGULATOR_QCOM_RPMH=y
CONFIG_REGULATOR_QCOM_SMD_RPM=y
CONFIG_REGULATOR_QCOM_SPMI=y
CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_MP8859=y
CONFIG_REGULATOR_S2MPS11=y
CONFIG_REGULATOR_VCTRL=m
CONFIG_RC_CORE=m
--
2.7.4
^ permalink raw reply related
* [PATCH bpf-next v5 3/3] selftests/bpf: update xdp_bpf2bpf test to use new set_attach_target API
From: Eelco Chaudron @ 2020-02-20 13:26 UTC (permalink / raw)
To: bpf; +Cc: davem, netdev, ast, daniel, kafai, songliubraving, yhs, andriin,
toke
In-Reply-To: <158220517358.127661.1514720920408191215.stgit@xdp-tutorial>
Use the new bpf_program__set_attach_target() API in the xdp_bpf2bpf
selftest so it can be referenced as an example on how to use it.
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
---
.../testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c | 16 +++++++++++++---
.../testing/selftests/bpf/progs/test_xdp_bpf2bpf.c | 4 ++--
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c b/tools/testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c
index 6b56bdc73ebc..4ba011031d4c 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c
@@ -14,7 +14,7 @@ void test_xdp_bpf2bpf(void)
struct test_xdp *pkt_skel = NULL;
struct test_xdp_bpf2bpf *ftrace_skel = NULL;
struct vip key4 = {.protocol = 6, .family = AF_INET};
- DECLARE_LIBBPF_OPTS(bpf_object_open_opts, opts);
+ struct bpf_program *prog;
/* Load XDP program to introspect */
pkt_skel = test_xdp__open_and_load();
@@ -27,11 +27,21 @@ void test_xdp_bpf2bpf(void)
bpf_map_update_elem(map_fd, &key4, &value4, 0);
/* Load trace program */
- opts.attach_prog_fd = pkt_fd,
- ftrace_skel = test_xdp_bpf2bpf__open_opts(&opts);
+ ftrace_skel = test_xdp_bpf2bpf__open();
if (CHECK(!ftrace_skel, "__open", "ftrace skeleton failed\n"))
goto out;
+ /* Demonstrate the bpf_program__set_attach_target() API rather than
+ * the load with options, i.e. opts.attach_prog_fd.
+ */
+ prog = ftrace_skel->progs.trace_on_entry;
+ bpf_program__set_expected_attach_type(prog, BPF_TRACE_FENTRY);
+ bpf_program__set_attach_target(prog, pkt_fd, "_xdp_tx_iptunnel");
+
+ prog = ftrace_skel->progs.trace_on_exit;
+ bpf_program__set_expected_attach_type(prog, BPF_TRACE_FEXIT);
+ bpf_program__set_attach_target(prog, pkt_fd, "_xdp_tx_iptunnel");
+
err = test_xdp_bpf2bpf__load(ftrace_skel);
if (CHECK(err, "__load", "ftrace skeleton failed\n"))
goto out;
diff --git a/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c b/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
index cb8a04ab7a78..b840fc9e3ed5 100644
--- a/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
+++ b/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
@@ -28,7 +28,7 @@ struct xdp_buff {
} __attribute__((preserve_access_index));
__u64 test_result_fentry = 0;
-SEC("fentry/_xdp_tx_iptunnel")
+SEC("fentry/FUNC")
int BPF_PROG(trace_on_entry, struct xdp_buff *xdp)
{
test_result_fentry = xdp->rxq->dev->ifindex;
@@ -36,7 +36,7 @@ int BPF_PROG(trace_on_entry, struct xdp_buff *xdp)
}
__u64 test_result_fexit = 0;
-SEC("fexit/_xdp_tx_iptunnel")
+SEC("fexit/FUNC")
int BPF_PROG(trace_on_exit, struct xdp_buff *xdp, int ret)
{
test_result_fexit = ret;
^ permalink raw reply related
* Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised
From: Julien Grall @ 2020-02-20 13:27 UTC (permalink / raw)
To: Jan Beulich, David Woodhouse
Cc: sstabellini@kernel.org, wl@xen.org, konrad.wilk@oracle.com,
george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, george.dunlap@citrix.com,
jeff.kubascik@dornerworks.com, Xia, Hongyan,
stewart.hildebrand@dornerworks.com,
xen-devel@lists.xenproject.org
In-Reply-To: <af374a90-f060-7239-5a02-c98df409819c@suse.com>
Hi,
On 20/02/2020 11:59, Jan Beulich wrote:
> On 07.02.2020 19:04, David Woodhouse wrote:
>> --- a/xen/arch/x86/mm.c
>> +++ b/xen/arch/x86/mm.c
>> @@ -488,7 +488,8 @@ void share_xen_page_with_guest(struct page_info *page, struct domain *d,
>>
>> page_set_owner(page, d);
>> smp_wmb(); /* install valid domain ptr before updating refcnt. */
>> - ASSERT((page->count_info & ~PGC_xen_heap) == 0);
>> + ASSERT((page->count_info & ~PGC_xen_heap) == PGC_state_inuse ||
>> + (page->count_info & ~PGC_xen_heap) == PGC_state_uninitialised);
>
> Can uninitialized pages really make it here?
IIRC, arch_init_memory() will share the first 1MB of the RAM but they
were never given to the page allocator.
01,10 +2316,11 @@ int assign_pages(
>> for ( i = 0; i < (1 << order); i++ )
>> {
>> ASSERT(page_get_owner(&pg[i]) == NULL);
>> - ASSERT(!pg[i].count_info);
>> + ASSERT(pg[i].count_info == PGC_state_inuse ||
>> + pg[i].count_info == PGC_state_uninitialised);
>
> Same question here: Can uninitialized pages make it here?
Yes, in dom0_construct_pv() when the initrd is assigned to the guest.
> If
> so, wouldn't it be better to correct this, rather than having
> the more permissive assertion?
We would need to rework init_heap_pages() (or create a new function) so
the allocator initialize the state but it is marked as "reserved/used"
rather than "freed".
Most likely we will need a similar function for liveupdate. This is
because the pages belonging to guests should be untouched.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply
* [PATCH bpf-next v5 2/3] libbpf: Add support for dynamic program attach target
From: Eelco Chaudron @ 2020-02-20 13:26 UTC (permalink / raw)
To: bpf; +Cc: davem, netdev, ast, daniel, kafai, songliubraving, yhs, andriin,
toke
In-Reply-To: <158220517358.127661.1514720920408191215.stgit@xdp-tutorial>
Currently when you want to attach a trace program to a bpf program
the section name needs to match the tracepoint/function semantics.
However the addition of the bpf_program__set_attach_target() API
allows you to specify the tracepoint/function dynamically.
The call flow would look something like this:
xdp_fd = bpf_prog_get_fd_by_id(id);
trace_obj = bpf_object__open_file("func.o", NULL);
prog = bpf_object__find_program_by_title(trace_obj,
"fentry/myfunc");
bpf_program__set_expected_attach_type(prog, BPF_TRACE_FENTRY);
bpf_program__set_attach_target(prog, xdp_fd,
"xdpfilt_blk_all");
bpf_object__load(trace_obj)
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
---
tools/lib/bpf/libbpf.c | 34 ++++++++++++++++++++++++++++++----
tools/lib/bpf/libbpf.h | 4 ++++
tools/lib/bpf/libbpf.map | 2 ++
3 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 514b1a524abb..76628d482d69 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -4939,8 +4939,8 @@ int bpf_program__load(struct bpf_program *prog, char *license, __u32 kern_ver)
{
int err = 0, fd, i, btf_id;
- if (prog->type == BPF_PROG_TYPE_TRACING ||
- prog->type == BPF_PROG_TYPE_EXT) {
+ if ((prog->type == BPF_PROG_TYPE_TRACING ||
+ prog->type == BPF_PROG_TYPE_EXT) && !prog->attach_btf_id) {
btf_id = libbpf_find_attach_btf_id(prog);
if (btf_id <= 0)
return btf_id;
@@ -6583,6 +6583,9 @@ static inline int __find_vmlinux_btf_id(struct btf *btf, const char *name,
else
err = btf__find_by_name_kind(btf, name, BTF_KIND_FUNC);
+ if (err <= 0)
+ pr_warn("%s is not found in vmlinux BTF\n", name);
+
return err;
}
@@ -6655,8 +6658,6 @@ static int libbpf_find_attach_btf_id(struct bpf_program *prog)
err = __find_vmlinux_btf_id(prog->obj->btf_vmlinux,
name + section_defs[i].len,
attach_type);
- if (err <= 0)
- pr_warn("%s is not found in vmlinux BTF\n", name);
return err;
}
pr_warn("failed to identify btf_id based on ELF section name '%s'\n", name);
@@ -8132,6 +8133,31 @@ void bpf_program__bpil_offs_to_addr(struct bpf_prog_info_linear *info_linear)
}
}
+int bpf_program__set_attach_target(struct bpf_program *prog,
+ int attach_prog_fd,
+ const char *attach_func_name)
+{
+ int btf_id;
+
+ if (!prog || attach_prog_fd < 0 || !attach_func_name)
+ return -EINVAL;
+
+ if (attach_prog_fd)
+ btf_id = libbpf_find_prog_btf_id(attach_func_name,
+ attach_prog_fd);
+ else
+ btf_id = __find_vmlinux_btf_id(prog->obj->btf_vmlinux,
+ attach_func_name,
+ prog->expected_attach_type);
+
+ if (btf_id < 0)
+ return btf_id;
+
+ prog->attach_btf_id = btf_id;
+ prog->attach_prog_fd = attach_prog_fd;
+ return 0;
+}
+
int parse_cpu_mask_str(const char *s, bool **mask, int *mask_sz)
{
int err = 0, n, len, start, end = -1;
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 3fe12c9d1f92..02fc58a21a7f 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -334,6 +334,10 @@ LIBBPF_API void
bpf_program__set_expected_attach_type(struct bpf_program *prog,
enum bpf_attach_type type);
+LIBBPF_API int
+bpf_program__set_attach_target(struct bpf_program *prog, int attach_prog_fd,
+ const char *attach_func_name);
+
LIBBPF_API bool bpf_program__is_socket_filter(const struct bpf_program *prog);
LIBBPF_API bool bpf_program__is_tracepoint(const struct bpf_program *prog);
LIBBPF_API bool bpf_program__is_raw_tracepoint(const struct bpf_program *prog);
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
index 45be19c9d752..7b014c8cdece 100644
--- a/tools/lib/bpf/libbpf.map
+++ b/tools/lib/bpf/libbpf.map
@@ -237,4 +237,6 @@ LIBBPF_0.0.7 {
} LIBBPF_0.0.6;
LIBBPF_0.0.8 {
+ global:
+ bpf_program__set_attach_target;
} LIBBPF_0.0.7;
^ permalink raw reply related
* [PATCH bpf-next v5 1/3] libbpf: Bump libpf current version to v0.0.8
From: Eelco Chaudron @ 2020-02-20 13:26 UTC (permalink / raw)
To: bpf; +Cc: davem, netdev, ast, daniel, kafai, songliubraving, yhs, andriin,
toke
In-Reply-To: <158220517358.127661.1514720920408191215.stgit@xdp-tutorial>
New development cycles starts, bump to v0.0.8.
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
---
tools/lib/bpf/libbpf.map | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
index b035122142bb..45be19c9d752 100644
--- a/tools/lib/bpf/libbpf.map
+++ b/tools/lib/bpf/libbpf.map
@@ -235,3 +235,6 @@ LIBBPF_0.0.7 {
btf__align_of;
libbpf_find_kernel_btf;
} LIBBPF_0.0.6;
+
+LIBBPF_0.0.8 {
+} LIBBPF_0.0.7;
^ permalink raw reply related
* [PATCH bpf-next v5 0/3] libbpf: Add support for dynamic program attach target
From: Eelco Chaudron @ 2020-02-20 13:26 UTC (permalink / raw)
To: bpf; +Cc: davem, netdev, ast, daniel, kafai, songliubraving, yhs, andriin,
toke
Currently when you want to attach a trace program to a bpf program
the section name needs to match the tracepoint/function semantics.
However the addition of the bpf_program__set_attach_target() API
allows you to specify the tracepoint/function dynamically.
The call flow would look something like this:
xdp_fd = bpf_prog_get_fd_by_id(id);
trace_obj = bpf_object__open_file("func.o", NULL);
prog = bpf_object__find_program_by_title(trace_obj,
"fentry/myfunc");
bpf_program__set_expected_attach_type(prog, BPF_TRACE_FENTRY);
bpf_program__set_attach_target(prog, xdp_fd,
"xdpfilt_blk_all");
bpf_object__load(trace_obj)
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
v1 -> v2: Remove requirement for attach type hint in API
v2 -> v3: Moved common warning to __find_vmlinux_btf_id, requested by Andrii
Updated the xdp_bpf2bpf test to use this new API
v3 -> v4: Split up patch, update libbpf.map version
v4 -> v5: Fix return code, and prog assignment in test case
^ permalink raw reply
* [PATCH v5 1/6] doc: board: toradex: add colibri_imx7.rst
From: Bin Meng @ 2020-02-20 13:26 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20200212151433.9713-2-igor.opaniuk@gmail.com>
On Wed, Feb 12, 2020 at 11:14 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
>
> From: Igor Opaniuk <igor.opaniuk@toradex.com>
>
> - add initial index for toradex boards reST documentation
> - add initial colibri_imx7.rst doc file which provides all needed
> information for obtaining a workable image ready for flashing
> for both eMMC/NAND versions of Colibri iMX7.
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> ---
>
> doc/board/index.rst | 1 +
> doc/board/toradex/colibri_imx7.rst | 127 +++++++++++++++++++++++++++++
> doc/board/toradex/index.rst | 9 ++
> 3 files changed, 137 insertions(+)
> create mode 100644 doc/board/toradex/colibri_imx7.rst
> create mode 100644 doc/board/toradex/index.rst
>
> diff --git a/doc/board/index.rst b/doc/board/index.rst
> index 00e72f57cd..f2f5907b8c 100644
> --- a/doc/board/index.rst
> +++ b/doc/board/index.rst
> @@ -15,4 +15,5 @@ Board-specific doc
> intel/index
> renesas/index
> sifive/index
> + toradex/index
> xilinx/index
> diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst
> new file mode 100644
> index 0000000000..0c7ae082d0
> --- /dev/null
> +++ b/doc/board/toradex/colibri_imx7.rst
> @@ -0,0 +1,127 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +Colibri iMX7
> +============
> +
> +Quick Start
> +-----------
> +
> +- Build U-Boot
> +- NAND IMX image adjustments before flashing
> +- Flashing manually U-Boot to eMMC
> +- Flashing manually U-Boot to NAND
> +- Using ``update_uboot`` script
> +
> +Build U-Boot
> +------------
> +
> +.. code-block:: bash
> +
> + $ export CROSS_COMPILE=arm-linux-gnueabi-
> + $ export ARCH=arm
> + $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig
> + $ make
> +
> +After build succeeds, you will obtain final ``u-boot-dtb.imx`` IMX specific
> +image, ready for flashing (but check next section for additional
> +adjustments).
> +
> +Final IMX program image includes (section ``6.6.7`` from `IMX7DRM
> +<https://www.nxp.com/webapp/Download?colCode=IMX7DRM>`_):
> +
> +* **Image vector table** (IVT) for BootROM
> +* **Boot data** -indicates the program image location, program image size
> + in bytes, and the plugin flag.
> +* **Device configuration data**
> +* **User image**: U-Boot image (``u-boot-dtb.bin``)
> +
> +
> +IMX image adjustments prior to flashing
> +--------------------------------------------
nits: title underline length should match the title
> +
> +1. U-Boot for both Colibri iMX7 NAND and eMMC versions
> +is built with HABv4 support (`AN4581.pdf
> +<https://www.nxp.com/docs/en/application-note/AN4581.pdf>`_)
> +enabled by default, which requires to generate a proper
> +Command Sequence File (CSF) by srktool from NXP (not included in the
> +U-Boot tree, check additional details in introduction_habv4.txt)
> +and concatenate it to the final ``u-boot-dtb.imx``.
> +
> +2. In case if you don't want to generate a proper ``CSF`` (for any reason),
> +you still need to pad the IMX image so i has the same size as specified in
> +in **Boot Data** section of IMX image.
> +To obtain this value, run:
> +
Will fix the nits when applying.
Tested the doc build, no warnings
Tested-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.