All of lore.kernel.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: [PATCH 05/10] guestfs: add initial debian trixie support with custom URLs
  @ 2024-05-11 23:46  1%     ` Luis Chamberlain
  0 siblings, 0 replies; 200+ results
From: Luis Chamberlain @ 2024-05-11 23:46 UTC (permalink / raw)
  To: Scott Mayhew, Richard W.M. Jones; +Cc: kdevops

On Wed, May 08, 2024 at 01:30:42PM -0400, Scott Mayhew wrote:
> On Tue, 07 May 2024, Luis Chamberlain wrote:
> 
> > debian does not yet provide an index file for virt-builder, but we
> > have URLS with qcow2 and raw files. Using them in guestfs is actually
> > not quite trivial. So we do the handy work to enable others to also
> > use custom URLs and build a virt-builder local source and index file
> > for you. All we need really, is to check the checksums.
> > 
> > Sadly this does not yet work, as it seems we get stuck on the grub
> > prompt for some reason. This needs some more investigation.
> 
> Yeah when I run 'make bringup' the consoles on all the guests are stuck
> on "Booting `Debian GNU/Linux'".

Is that with Trixie or also with y9our own custom ISO?

> I tried manually running virt-builder + virt-install using the same
> image and I get the same result.  Granted, I've only ever used the
> images in the libguestfs repos or images that I've built myself, so I
> could be doing something wrong.

I'm in hopes we can figure this out, there is likely something special
done on the images hosted by libguestfs.org which regular nocloud images
like debian's trixie is not doing:

https://cloud.debian.org/images/cloud/trixie/daily/latest/debian-13-genericcloud-amd64-daily.raw

Once we figure that out, we should be able to easily do that as a post
up with virt-builder.

Richard, any hints on what likely should help fix boot?

> > diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
> > index 5838522908e8..5839fbedfd08 100644
> > --- a/kconfigs/Kconfig.guestfs
> > +++ b/kconfigs/Kconfig.guestfs
> > @@ -1,5 +1,30 @@
> >  if GUESTFS
> >  
> > +config GUESTFS_HAS_CUSTOM_RAW_IMAGE
> > +	bool
> 
> It might be useful for these variables to have prompts so they show up
> in 'make menuconfig'. 

That's a one line change, it just needs a description, for now its auto
because there is no custom raw image URL option, what you descrie seems
for us to want such a new entry and option. So sure, but I think that
can be done in subsequent patch?

> I have a whole bunch of workflows running for
> RHEL8 and RHEL9 nightly builds... they start with 8.9 or 9.3
> images 

I see, yes, we wouldn't need to let you enable GUESTFS_HAS_CUSTOM_RAW_IMAGE
but rather waht we want is just a drop down menu for distro to let you
select "custom", that way you could use a set of defconfigs which would
use the custom image URL, when that is enabled it selects
GUESTFS_HAS_CUSTOM_RAW_IMAGE.

> and use the CONFIG_KDEVOPS_CUSTOM_YUM_REPOFILE to update them to
> the latest bits.

My patch after this "guestfs: add support to infer host distro
mirrororing optimizations" helps to infer when we want to copy a
custom sources list, based on a host's hop count. What you describe
seems to beg for another auto-infererence which could be based on
some target directory and based on on the custom URL. That could be
added and then you wouldn't even need to make any custom .config other
than having a few defconfigs for each distro point release.

> If I could build my own images and dump them in a
> directory without having to worry about updating the index file that
> would probably speed things up a bit.

I think this is possible, we could just look for directory we add to
.gitignore, and if the user has it as a symlink, we leverage that as
a key indicator for "hunting season open for custom images, please
populate my Kconfig with these other custom options".

> > +
> > +config GUESTFS_HAS_CUSTOM_RAW_IMAGE_URL
> > +	bool
> > +
> > +config GUESTFS_CUSTOM_RAW_IMAGE_URL
> > +	depends on GUESTFS_HAS_CUSTOM_RAW_IMAGE
> > +	depends on GUESTFS_HAS_CUSTOM_RAW_IMAGE_URL
> > +	string
> > +	default "https://cloud.debian.org/images/cloud/trixie/daily/latest/debian-13-generic-amd64-daily" if GUESTFS_DEBIAN_TRIXIE_GENERIC_AMD64
> > +	default "https://cloud.debian.org/images/cloud/trixie/daily/latest/debian-13-genericcloud-amd64-daily" if GUESTFS_DEBIAN_TRIXIE_GENERIC_CLOUD_AMD64
> > +	default "https://cloud.debian.org/images/cloud/trixie/daily/latest/debian-13-nocloud-amd64-daily" if GUESTFS_DEBIAN_TRIXIE_NOCLOUD_AMD64
> 
> You need '.raw' at the end of the URL, right?

Oops yes sorry.

> > diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
> > index f90ed499051b..514a26a60436 100755
> > --- a/scripts/bringup_guestfs.sh
> > +++ b/scripts/bringup_guestfs.sh
> > @@ -30,8 +30,135 @@ GUESTFSDIR="${TOPDIR}/guestfs"
> >  OS_VERSION=${CONFIG_VIRT_BUILDER_OS_VERSION}
> >  BASE_IMAGE_DIR="${STORAGEDIR}/base_images"
> >  BASE_IMAGE="${BASE_IMAGE_DIR}/${OS_VERSION}.raw"
> > +
> > +build_custom_source()
> > +{
> > +	SOURCE_TMP=$(mktemp)
> > +	cat <<_EOT >$SOURCE_TMP
> > +[local]
> ^^^
> You probably want this to be unique based on the flavor.  If you switch
> flavors, then you're going to wind up with multiple repo configs with the
> same repo id and virt-builder will only pick up the last one it reads... 
> the end result being that it probably won't find the template you want
> to install.

So this is for the source, not the index, the source is local, can we
not have multiple arbitrary sources with the same name? The indexes for
each file would be different. Here I just wanted to emphasize that the
source is local.

> 
> > +uri=file:///${CUSTOM_INDEX}
> > +proxy=off
> > +_EOT

See the source, points to a custom index, and so we'd have multiple
local sources, the index files do change per flavor.

But certainly, it would be good to get this right to make this scale.
For now to start off with trixie, and later to scale to whatever custom
setup we need for random builds.

Thoughts / advice?

Anyway, since this still has a big fat warning as "this doesn't work
yet", I've made the changes required so far and pushed these patches in,
we can make changes to scale this, now that at laest its easier to test
these things.

  Luis

^ permalink raw reply	[relevance 1%]

* [linux-linus test] 185982: tolerable FAIL - PUSHED
@ 2024-05-11 23:42  1% osstest service owner
  0 siblings, 0 replies; 200+ results
From: osstest service owner @ 2024-05-11 23:42 UTC (permalink / raw)
  To: xen-devel

flight 185982 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/185982/

Failures :-/ but no regressions.

Tests which are failing intermittently (not blocking):
 test-armhf-armhf-libvirt-vhd 10 host-ping-check-xen fail in 185977 pass in 185982
 test-armhf-armhf-xl-qcow2     8 xen-boot         fail in 185977 pass in 185982
 test-armhf-armhf-xl-credit2   8 xen-boot         fail in 185977 pass in 185982
 test-amd64-amd64-xl-pvshim   20 guest-localmigrate/x10     fail pass in 185977
 test-amd64-amd64-qemuu-freebsd11-amd64 21 guest-start/freebsd.repeat fail pass in 185977
 test-armhf-armhf-xl-multivcpu  8 xen-boot                  fail pass in 185977
 test-armhf-armhf-libvirt      8 xen-boot                   fail pass in 185977

Tests which did not succeed, but are not blocking:
 test-armhf-armhf-libvirt 16 saverestore-support-check fail in 185977 like 185972
 test-armhf-armhf-xl-multivcpu 15 migrate-support-check fail in 185977 never pass
 test-armhf-armhf-xl-multivcpu 16 saverestore-support-check fail in 185977 never pass
 test-armhf-armhf-libvirt    15 migrate-support-check fail in 185977 never pass
 test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stop            fail like 185972
 test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stop            fail like 185972
 test-amd64-amd64-xl-qemuu-ws16-amd64 19 guest-stop            fail like 185972
 test-armhf-armhf-examine      8 reboot                       fail  like 185972
 test-amd64-amd64-xl-qemut-ws16-amd64 19 guest-stop            fail like 185972
 test-amd64-amd64-qemuu-nested-amd 20 debian-hvm-install/l1/l2 fail like 185972
 test-amd64-amd64-libvirt-xsm 15 migrate-support-check        fail   never pass
 test-amd64-amd64-libvirt     15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-credit1  15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-credit1  16 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl-xsm      15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-xsm      16 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl          15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl          16 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl-thunderx 15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-thunderx 16 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl-credit2  15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-credit2  16 saverestore-support-check    fail   never pass
 test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 13 migrate-support-check fail never pass
 test-arm64-arm64-libvirt-xsm 15 migrate-support-check        fail   never pass
 test-arm64-arm64-libvirt-xsm 16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-arndale  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-arndale  16 saverestore-support-check    fail   never pass
 test-amd64-amd64-libvirt-qcow2 14 migrate-support-check        fail never pass
 test-amd64-amd64-libvirt-raw 14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit1  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit1  16 saverestore-support-check    fail   never pass
 test-amd64-amd64-libvirt-vhd 14 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-vhd      14 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-vhd      15 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-rtds     15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-rtds     16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-credit2  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit2  16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl          15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl          16 saverestore-support-check    fail   never pass
 test-armhf-armhf-libvirt-vhd 14 migrate-support-check        fail   never pass
 test-armhf-armhf-libvirt-vhd 15 saverestore-support-check    fail   never pass
 test-arm64-arm64-libvirt-raw 14 migrate-support-check        fail   never pass
 test-arm64-arm64-libvirt-raw 15 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-qcow2    14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-qcow2    15 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-raw      14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-raw      15 saverestore-support-check    fail   never pass

version targeted for testing:
 linux                cf87f46fd34d6c19283d9625a7822f20d90b64a4
baseline version:
 linux                f4345f05c0dfc73c617e66f3b809edb8ddd41075

Last test of basis   185972  2024-05-10 18:14:02 Z    1 days
Testing same since   185977  2024-05-11 02:27:16 Z    0 days    2 attempts

------------------------------------------------------------
People who touched revisions under test:
  "Paul E. McKenney" <paulmck@kernel.org>
  Agustin Gutierrez <agustin.gutierrez@amd.com>
  Alex Deucher <alexander.deucher@amd.com>
  Alexander Potapenko <glider@google.com>
  Andi Shyti <andi.shyti@linux.intel.com>
  Andrew Morton <akpm@linux-foundation.org>
  Animesh Manna <animesh.manna@intel.com>
  Barry Song <v-songbaohua@oppo.com>
  Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
  Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
  Christoph Hellwig <hch@lst.de>
  Daniel Wheeler <daniel.wheeler@amd.com>
  Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
  Dave Airlie <airlied@redhat.com>
  David Hildenbrand <david@redhat.com>
  Douglas Anderson <dianders@chromium.org>
  Gnattu OC <gnattuoc@me.com>
  Hailong.Liu <hailong.liu@oppo.com>
  Hariom Panthi <hariom1.p@samsung.com>
  Jarkko Sakkinen <jarkko@kernel.org>
  Jerome Brunet <jbrunet@baylibre.com>
  John Garry <john.g.garry@oracle.com>
  Kai Vehmanen <kai.vehmanen@intel.com>
  Karthikeyan Ramasubramanian <kramasub@chromium.org>
  Kefeng Wang <wangkefeng.wang@huawei.com>
  Kent Gibson <warthog618@gmail.com>
  Krzysztof Gibala <krzysztof.gibala@intel.com>
  Liam R. Howlett <Liam.Howlett@oracle.com>
  Lijo Lazar <lijo.lazar@amd.com>
  Linus Torvalds <torvalds@linux-foundation.org>
  Lucas De Marchi <lucas.demarchi@intel.com>
  Luis Chamberlain <mcgrof@kernel.org>
  Maninder Singh <maninder1.s@samsung.com>
  Mario Limonciello <mario.limonciello@amd.com>
  Marius Fleischer <fleischermarius@gmail.com>
  Matthew Brost <matthew.brost@intel.com>
  Matthew Wilcox (Oracle) <willy@infradead.org>
  Michael Ellerman <mpe@ellerman.id.au>
  Michel Dänzer <mdaenzer@redhat.com>
  Muhammad Usama Anjum <usama.anjum@collabora.com>
  Neil Armstrong <neil.armstrong@linaro.org>
  Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
  Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
  Nicholas Susanto <nicholas.susanto@amd.com>
  Oscar Salvador <osalvador@suse.de>
  Paul Menzel <pmenzel@molgen.mpg.de>
  Peter Xu <peterx@redhat.com>
  Rodrigo Vivi <rodrigo.vivi@intel.com>
  Ryan Roberts <ryan.roberts@arm.com>
  Sidhartha Kumar <sidhartha.kumar@oracle.com>
  Thomas Zimmermann <tzimmermann@suse.de>
  Tiezhu Yang <yangtiezhu@loongson.cn>
  Tom Chung <chiahsuan.chung@amd.com>
  Ville Syrjälä <ville.syrjala@linux.intel.com>
  Zhongqiu Han <quic_zhonhan@quicinc.com>

jobs:
 build-amd64-xsm                                              pass    
 build-arm64-xsm                                              pass    
 build-i386-xsm                                               pass    
 build-amd64                                                  pass    
 build-arm64                                                  pass    
 build-armhf                                                  pass    
 build-i386                                                   pass    
 build-amd64-libvirt                                          pass    
 build-arm64-libvirt                                          pass    
 build-armhf-libvirt                                          pass    
 build-i386-libvirt                                           pass    
 build-amd64-pvops                                            pass    
 build-arm64-pvops                                            pass    
 build-armhf-pvops                                            pass    
 build-i386-pvops                                             pass    
 test-amd64-amd64-xl                                          pass    
 test-amd64-coresched-amd64-xl                                pass    
 test-arm64-arm64-xl                                          pass    
 test-armhf-armhf-xl                                          pass    
 test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm           pass    
 test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm        pass    
 test-amd64-amd64-xl-qemut-debianhvm-i386-xsm                 pass    
 test-amd64-amd64-xl-qemuu-debianhvm-i386-xsm                 pass    
 test-amd64-amd64-libvirt-xsm                                 pass    
 test-arm64-arm64-libvirt-xsm                                 pass    
 test-amd64-amd64-xl-xsm                                      pass    
 test-arm64-arm64-xl-xsm                                      pass    
 test-amd64-amd64-qemuu-nested-amd                            fail    
 test-amd64-amd64-xl-pvhv2-amd                                pass    
 test-amd64-amd64-dom0pvh-xl-amd                              pass    
 test-amd64-amd64-xl-qemut-debianhvm-amd64                    pass    
 test-amd64-amd64-xl-qemuu-debianhvm-amd64                    pass    
 test-amd64-amd64-qemuu-freebsd11-amd64                       fail    
 test-amd64-amd64-qemuu-freebsd12-amd64                       pass    
 test-amd64-amd64-xl-qemuu-ovmf-amd64                         pass    
 test-amd64-amd64-xl-qemut-win7-amd64                         fail    
 test-amd64-amd64-xl-qemuu-win7-amd64                         fail    
 test-amd64-amd64-xl-qemut-ws16-amd64                         fail    
 test-amd64-amd64-xl-qemuu-ws16-amd64                         fail    
 test-armhf-armhf-xl-arndale                                  pass    
 test-amd64-amd64-examine-bios                                pass    
 test-amd64-amd64-xl-credit1                                  pass    
 test-arm64-arm64-xl-credit1                                  pass    
 test-armhf-armhf-xl-credit1                                  pass    
 test-amd64-amd64-xl-credit2                                  pass    
 test-arm64-arm64-xl-credit2                                  pass    
 test-armhf-armhf-xl-credit2                                  pass    
 test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict        pass    
 test-amd64-amd64-examine                                     pass    
 test-arm64-arm64-examine                                     pass    
 test-armhf-armhf-examine                                     fail    
 test-amd64-amd64-qemuu-nested-intel                          pass    
 test-amd64-amd64-xl-pvhv2-intel                              pass    
 test-amd64-amd64-dom0pvh-xl-intel                            pass    
 test-amd64-amd64-libvirt                                     pass    
 test-armhf-armhf-libvirt                                     fail    
 test-amd64-amd64-xl-multivcpu                                pass    
 test-armhf-armhf-xl-multivcpu                                fail    
 test-amd64-amd64-pair                                        pass    
 test-amd64-amd64-libvirt-pair                                pass    
 test-amd64-amd64-xl-pvshim                                   fail    
 test-amd64-amd64-pygrub                                      pass    
 test-amd64-amd64-libvirt-qcow2                               pass    
 test-amd64-amd64-xl-qcow2                                    pass    
 test-armhf-armhf-xl-qcow2                                    pass    
 test-amd64-amd64-libvirt-raw                                 pass    
 test-arm64-arm64-libvirt-raw                                 pass    
 test-amd64-amd64-xl-raw                                      pass    
 test-armhf-armhf-xl-raw                                      pass    
 test-amd64-amd64-xl-rtds                                     pass    
 test-armhf-armhf-xl-rtds                                     pass    
 test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow             pass    
 test-amd64-amd64-xl-shadow                                   pass    
 test-arm64-arm64-xl-thunderx                                 pass    
 test-amd64-amd64-examine-uefi                                pass    
 test-amd64-amd64-libvirt-vhd                                 pass    
 test-armhf-armhf-libvirt-vhd                                 pass    
 test-amd64-amd64-xl-vhd                                      pass    
 test-arm64-arm64-xl-vhd                                      pass    


------------------------------------------------------------
sg-report-flight on osstest.test-lab.xenproject.org
logs: /home/logs/logs
images: /home/logs/images

Logs, config files, etc. are available at
    http://logs.test-lab.xenproject.org/osstest/logs

Explanation of these reports, and of osstest in general, is at
    http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README.email;hb=master
    http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README;hb=master

Test harness code can be found at
    http://xenbits.xen.org/gitweb?p=osstest.git;a=summary


Pushing revision :

hint: The 'hooks/update' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.
hint: The 'hooks/post-receive' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.
hint: The 'hooks/post-update' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.
To xenbits.xen.org:/home/xen/git/linux-pvops.git
   f4345f05c0df..cf87f46fd34d  cf87f46fd34d6c19283d9625a7822f20d90b64a4 -> tested/linux-linus


^ permalink raw reply	[relevance 1%]

* Re: [syzbot] [kernel?] KASAN: slab-use-after-free Read in kill_orphaned_pgrp (2)
  @ 2024-05-11 23:34  0% ` Hillf Danton
  0 siblings, 0 replies; 200+ results
From: Hillf Danton @ 2024-05-11 23:34 UTC (permalink / raw)
  To: lee bruce
  Cc: syzbot+68619f9e9e69accd8e0a, linux-kernel, syzkaller-bugs,
	Edward Adam Davis, clf700383, michael.christie, mst

On Sat, 11 May 2024 22:45:06 +0800 lee bruce <xrivendell7@gmail.com>
> Hello, I found a reproducer for this bug.
> 
Thanks for your report.

> If you fix this issue, please add the following tag to the commit:
> Reported-by: xingwei lee <xrivendell7@gmail.com>
> Reported-by: lingfei cheng <clf700383@gmail.com>
> 
> I use the same kernel as syzbot instance
> Kernel Commit: upstream dccb07f2914cdab2ac3a5b6c98406f765acab803
> Kernel Config: https://syzkaller.appspot.com/text?tag=3DKernelConfig&x=3D6d14c12b661fb43
> with KASAN enabled
> 
> Since the same title bug is triggered in
> https://syzkaller.appspot.com/bug?id=3D70492b96ff47ff70cfc433be100586119310670b.
> I make a simple RCA.
> In the old-syzbot instance the bug still trigger the title "KASAN:
> slab-use-after-free Read in kill_orphaned_pgrp=E2=80=9D and in the lastest
> syzbot the bug report as
> 
> TITLE: WARNING in signal_wake_up_state
> ------------[ cut here ]------------
> WARNING: CPU: 3 PID: 8591 at kernel/signal.c:762
> signal_wake_up_state+0xf8/0x130 kernel/signal.c:762
> Modules linked in:
> CPU: 3 PID: 8591 Comm: file0 Not tainted 6.9.0-rc7-00012-gdccb07f2914c #6

Could you reproduce it in the next tree, because of d558664602d3 ("vhost_task:
Handle SIGKILL by flushing work and exiting") adding reaction to signal?

^ permalink raw reply	[relevance 0%]

* What's cooking in git.git (May 2024, #05; Sat, 11)
@ 2024-05-11 23:29  1% Junio C Hamano
  0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2024-05-11 23:29 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking in my tree.  Commits
prefixed with '+' are in 'next' (being in 'next' is a sign that a
topic is stable enough to be used and are candidate to be in a
future release).  Commits prefixed with '-' are only in 'seen', and
aren't considered "accepted" at all and may be annotated with an URL
to a message that raises issues but they are no means exhaustive.  A
topic without enough support may be discarded after a long period of
no activity (of course they can be resubmit when new interests
arise).

Copies of the source code to Git live in many repositories, and the
following is a list of the ones I push into or their mirrors.  Some
repositories have only a subset of branches.

With maint, master, next, seen, todo:

	git://git.kernel.org/pub/scm/git/git.git/
	git://repo.or.cz/alt-git.git/
	https://kernel.googlesource.com/pub/scm/git/git/
	https://github.com/git/git/
	https://gitlab.com/git-scm/git/

With all the integration branches and topics broken out:

	https://github.com/gitster/git/

Even though the preformatted documentation in HTML and man format
are not sources, they are published in these repositories for
convenience (replace "htmldocs" with "manpages" for the manual
pages):

	git://git.kernel.org/pub/scm/git/git-htmldocs.git/
	https://github.com/gitster/git-htmldocs.git/

Release tarballs are available at:

	https://www.kernel.org/pub/software/scm/git/

--------------------------------------------------
[New Topics]

* ps/builtin-config-cleanup (2024-05-10) 23 commits
 - fixup! builtin/config: move location options into local variables
 - builtin/config: pass data between callbacks via local variables
 - builtin/config: convert flags to a local variable
 - builtin/config: track "fixed value" option via flags only
 - builtin/config: convert `key` to a local variable
 - builtin/config: convert `key_regexp` to a local variable
 - builtin/config: convert `regexp` to a local variable
 - builtin/config: convert `value_pattern` to a local variable
 - builtin/config: convert `do_not_match` to a local variable
 - builtin/config: move `respect_includes_opt` into location options
 - builtin/config: move default value into display options
 - builtin/config: move type options into display options
 - builtin/config: move display options into local variables
 - builtin/config: move location options into local variables
 - builtin/config: refactor functions to have common exit paths
 - config: make the config source const
 - builtin/config: check for writeability after source is set up
 - builtin/config: move actions into `cmd_config_actions()`
 - builtin/config: move legacy options into `cmd_config()`
 - builtin/config: move subcommand options into `cmd_config()`
 - builtin/config: move legacy mode into its own function
 - builtin/config: stop printing full usage on misuse
 - Merge branch 'ps/config-subcommands' into ps/builtin-config-cleanup
 (this branch uses ps/config-subcommands.)

 Code clean-up to reduce inter-function communication inside
 builtin/config.c done via the use of global variables.

 Will merge to 'next'?
 source: <cover.1715339393.git.ps@pks.im>


* jc/git-gui-maintainer-update (2024-05-11) 1 commit
  (merged to 'next' on 2024-05-11 at 78c648537b)
 + SubmittingPatches: welcome the new maintainer of git-gui part

 Will merge to 'master'.

--------------------------------------------------
[Cooking]

* vd/doc-merge-tree-x-option (2024-05-07) 1 commit
  (merged to 'next' on 2024-05-08 at 42637b8bdf)
 + Documentation/git-merge-tree.txt: document -X

 Doc update.

 Will merge to 'master'.
 source: <pull.1728.git.1715117789985.gitgitgadget@gmail.com>


* fa/p4-error (2024-05-08) 1 commit
  (merged to 'next' on 2024-05-11 at 58fd3fbf2f)
 + git-p4: show Perforce error to the user

 P4 update.

 Will merge to 'master'.
 source: <pull.1668.v3.git.git.1715206266214.gitgitgadget@gmail.com>


* jc/doc-manpages-l10n (2024-05-09) 1 commit
 - SubmittingPatches: advertise git-manpages-l10n project a bit

 The SubmittingPatches document now refers folks to manpages
 translation project.

 Comments?
 source: <xmqqv83muc12.fsf@gitster.g>


* jk/ci-macos-gcc13-fix (2024-05-09) 3 commits
  (merged to 'next' on 2024-05-11 at 571a90f095)
 + ci: stop installing "gcc-13" for osx-gcc
 + ci: avoid bare "gcc" for osx-gcc job
 + ci: drop mention of BREW_INSTALL_PACKAGES variable

 CI fix.

 Will merge to 'master'.
 source: <20240509162219.GA1707955@coredump.intra.peff.net>


* ps/ci-fuzzers-at-gitlab-fix (2024-05-09) 3 commits
  (merged to 'next' on 2024-05-11 at f4307d4164)
 + gitlab-ci: fix installing dependencies for fuzz smoke tests
 + Merge branch 'ps/ci-python-2-deprecation' into ps/ci-fuzzers-at-gitlab-fix
 + Merge branch 'ps/ci-enable-minimal-fuzzers-at-gitlab' into ps/ci-fuzzers-at-gitlab-fix
 (this branch uses ps/ci-enable-minimal-fuzzers-at-gitlab and ps/ci-python-2-deprecation.)

 CI fix.

 Will merge to 'master'.
 source: <5a92a4aa9edd9653df71b284f07461c7906f97e2.1715241343.git.ps@pks.im>


* ps/reftable-reusable-iterator (2024-05-08) 13 commits
 - reftable/merged: adapt interface to allow reuse of iterators
 - reftable/stack: provide convenience functions to create iterators
 - reftable/reader: adapt interface to allow reuse of iterators
 - reftable/generic: adapt interface to allow reuse of iterators
 - reftable/generic: move seeking of records into the iterator
 - reftable/merged: simplify indices for subiterators
 - reftable/merged: split up initialization and seeking of records
 - reftable/reader: set up the reader when initializing table iterator
 - reftable/reader: inline `reader_seek_internal()`
 - reftable/reader: separate concerns of table iter and reftable reader
 - reftable/reader: unify indexed and linear seeking
 - reftable/reader: avoid copying index iterator
 - reftable/block: use `size_t` to track restart point index

 Code clean-up to make the reftable iterator closer to be reusable.
 source: <cover.1715166175.git.ps@pks.im>


* tb/precompose-getcwd (2024-05-09) 1 commit
  (merged to 'next' on 2024-05-11 at d1b507b01a)
 + macOS: ls-files path fails if path of workdir is NFD

 We forgot to normalize the result of getcwd() to NFC on macOS where
 all other paths are normalized, which has been corrected.

 Will merge to 'master'.
 source: <20240509161110.12121-1-tboegi@web.de>


* jk/ci-test-with-jgit-fix (2024-05-09) 1 commit
  (merged to 'next' on 2024-05-11 at 7d3d69657e)
 + ci: update coverity runs_on_pool reference

 CI fix.

 Will merge to 'master'.
 source: <20240509161506.GA1707588@coredump.intra.peff.net>


* jc/patch-flow-updates (2024-05-10) 2 commits
 - SubmittingPatches: extend the "flow" section
 - SubmittingPatches: move the patch-flow section earlier

 Doc updates.

 Comments?
 source: <20240510165526.1412338-1-gitster@pobox.com>


* it/refs-name-conflict (2024-05-06) 1 commit
 - refs: return conflict error when checking packed refs

 Comments?
 cf. <CAOLa=ZSre3f+0SR-_migfkPONqhinobKjU=NnGOJ_sTNM_L5ug@mail.gmail.com>
 source: <pull.1716.v3.git.git.1714791848557.gitgitgadget@gmail.com>


* jc/format-patch-more-aggressive-range-diff (2024-05-06) 1 commit
 - format-patch: run range-diff with larger creation-factor

 The default "creation-factor" used by "git format-patch" has been
 raised to make it more aggressively find matching commits.

 Comments?
 source: <xmqqbk5i3ncw.fsf_-_@gitster.g>


* jp/tag-trailer (2024-05-07) 3 commits
  (merged to 'next' on 2024-05-07 at 646013793d)
 + builtin/tag: add --trailer option
 + builtin/commit: refactor --trailer logic
 + builtin/commit: use ARGV macro to collect trailers

 "git tag" learned the "--trailer" option to futz with the trailers
 in the same way as "git commit" does.

 Will merge to 'master'.
 source: <pull.1723.v5.git.1714934950.gitgitgadget@gmail.com>


* ow/refspec-glossary-update (2024-05-06) 1 commit
  (merged to 'next' on 2024-05-07 at 7d55ebb0c8)
 + Documentation: Mention that refspecs are explained elsewhere

 Doc update.

 Will merge to 'master'.
 source: <20240506182317.13477-1-oystwa@gmail.com>


* ps/ci-enable-minimal-fuzzers-at-gitlab (2024-05-06) 1 commit
  (merged to 'next' on 2024-05-07 at a76024bd9f)
 + gitlab-ci: add smoke test for fuzzers
 (this branch is used by ps/ci-fuzzers-at-gitlab-fix.)

 CI update.

 Will merge to 'master'.
 source: <01fb94999f8e2014ba4d09ce7451a4f5d315ee72.1714371146.git.ps@pks.im>


* ps/ci-python-2-deprecation (2024-05-06) 1 commit
  (merged to 'next' on 2024-05-07 at 0e11e94f99)
 + ci: fix Python dependency on Ubuntu 24.04
 (this branch is used by ps/ci-fuzzers-at-gitlab-fix.)

 Unbreak CI jobs so that we do not attempt to use Python 2 that has
 been removed from the platform.

 Will merge to 'master'.
 source: <cb8cefc20f373a3516695e7cbee975132553ea95.1714973381.git.ps@pks.im>


* rs/external-diff-with-exit-code (2024-05-06) 2 commits
  (merged to 'next' on 2024-05-08 at ad5fee3cbf)
 + diff: fix --exit-code with external diff
 + diff: report unmerged paths as changes in run_diff_cmd()

 The "--exit-code" option of "git diff" command learned to work with
 the "--ext-diff" option.

 Will merge to 'master'.
 source: <82561c70-ec33-41bf-b036-52310ffc1926@web.de>


* jc/test-workaround-broken-mv (2024-05-02) 1 commit
  (merged to 'next' on 2024-05-06 at 7e009c6827)
 + t/lib-chunk: work around broken "mv" on some vintage of macOS

 Tests that try to corrupt in-repository files in chunked format did
 not work well on macOS due to its broken "mv", which has been
 worked around.

 Will merge to 'master'.
 source: <xmqqsez0c6ma.fsf@gitster.g>


* jt/port-ci-whitespace-check-to-gitlab (2024-05-03) 5 commits
  (merged to 'next' on 2024-05-08 at 774a29dde4)
 + gitlab-ci: add whitespace error check
 + ci: make the whitespace report optional
 + ci: separate whitespace check script
 + github-ci: fix link to whitespace error
 + ci: pre-collapse GitLab CI sections

 The "whitespace check" task that was enabled for GitHub Actions CI
 has been ported to GitLab CI.

 Will merge to 'master'.
 source: <20240503172110.181326-1-jltobler@gmail.com>


* jc/no-default-attr-tree-in-bare (2024-05-03) 1 commit
  (merged to 'next' on 2024-05-08 at a34819b16d)
 + stop using HEAD for attributes in bare repository by default
 (this branch is used by ps/undecided-is-not-necessarily-sha1.)

 Git 2.43 started using the tree of HEAD as the source of attributes
 in a bare repository, which has severe performance implications.
 For now, revert the change, without ripping out a more explicit
 support for the attr.tree configuration variable.

 Will merge to 'master'.
 source: <xmqqzft6aozg.fsf_-_@gitster.g>


* jl/git-no-advice (2024-05-07) 4 commits
  (merged to 'next' on 2024-05-08 at c9e7e0866e)
 + t0018: two small fixes
  (merged to 'next' on 2024-05-06 at 95cc03ef96)
 + advice: add --no-advice global option
 + doc: add spacing around paginate options
 + doc: clean up usage documentation for --no-* opts

 A new global "--no-advice" option can be used to disable all advice
 messages, which is meant to be used only in scripts.

 Will merge to 'master'.
 source: <20240503071706.78109-1-james@jamesliu.io>


* kn/ref-transaction-symref (2024-05-07) 8 commits
  (merged to 'next' on 2024-05-11 at 0a7119f2a3)
 + refs: remove `create_symref` and associated dead code
 + refs: rename `refs_create_symref()` to `refs_update_symref()`
 + refs: use transaction in `refs_create_symref()`
 + refs: add support for transactional symref updates
 + refs: move `original_update_refname` to 'refs.c'
 + refs: support symrefs in 'reference-transaction' hook
 + files-backend: extract out `create_symref_lock()`
 + refs: accept symref values in `ref_transaction_update()`

 Updates to symbolic refs can now be made as a part of ref
 transaction.

 Will merge to 'master'.
 source: <20240507125859.132116-1-knayak@gitlab.com>


* ma/win32-unix-domain-socket (2024-05-03) 1 commit
  (merged to 'next' on 2024-05-06 at 799a546c96)
 + win32: fix building with NO_UNIX_SOCKETS

 Build fix.

 Will merge to 'master'.
 source: <20240503091427.2808390-1-mh@glandium.org>


* ps/config-subcommands (2024-05-06) 14 commits
  (merged to 'next' on 2024-05-07 at f10c689a30)
 + builtin/config: display subcommand help
 + builtin/config: introduce "edit" subcommand
 + builtin/config: introduce "remove-section" subcommand
 + builtin/config: introduce "rename-section" subcommand
 + builtin/config: introduce "unset" subcommand
 + builtin/config: introduce "set" subcommand
 + builtin/config: introduce "get" subcommand
 + builtin/config: introduce "list" subcommand
 + builtin/config: pull out function to handle `--null`
 + builtin/config: pull out function to handle config location
 + builtin/config: use `OPT_CMDMODE()` to specify modes
 + builtin/config: move "fixed-value" option to correct group
 + builtin/config: move option array around
 + config: clarify memory ownership when preparing comment strings
 (this branch is used by ps/builtin-config-cleanup.)

 The operation mode options (like "--get") the "git config" command
 uses have been deprecated and replaced with subcommands (like "git
 config get").

 Will merge to 'master'.
 source: <cover.1714982328.git.ps@pks.im>


* ps/refs-without-the-repository (2024-05-07) 5 commits
  (merged to 'next' on 2024-05-08 at 2479b9de46)
 + refs: remove functions without ref store
 + cocci: apply rules to rewrite callers of "refs" interfaces
 + cocci: introduce rules to transform "refs" to pass ref store
 + refs: add `exclude_patterns` parameter to `for_each_fullref_in()`
 + refs: introduce missing functions that accept a `struct ref_store`

 The refs API lost functions that implicitly assumes to work on the
 primary ref_store by forcing the callers to pass a ref_store as an
 argument.

 Will merge to 'master'.
 source: <cover.1715065736.git.ps@pks.im>


* ps/reftable-write-options (2024-05-10) 11 commits
 - refs/reftable: allow configuring geometric factor
 - reftable: make the compaction factor configurable
 - refs/reftable: allow disabling writing the object index
 - refs/reftable: allow configuring restart interval
 - reftable: use `uint16_t` to track restart interval
 - refs/reftable: allow configuring block size
 - reftable/dump: support dumping a table's block structure
 - reftable/writer: improve error when passed an invalid block size
 - reftable/writer: drop static variable used to initialize strbuf
 - reftable: consistently pass write opts as value
 - reftable: consistently refer to `reftable_write_options` as `opts`

 The knobs to tweak how reftable files are written have been made
 available as configuration variables.

 Will merge to 'next'?
 source: <cover.1715336797.git.ps@pks.im>


* tb/attr-limits (2024-05-03) 1 commit
  (merged to 'next' on 2024-05-06 at b98150cc71)
 + attr.c: move ATTR_MAX_FILE_SIZE check into read_attr_from_buf()

 The maximum size of attribute files is enforced more consistently.

 Will merge to 'master'.
 source: <28f6267709db78ba526d7ed9fc4a734674697c70.1714763555.git.me@ttaylorr.com>


* ds/scalar-reconfigure-all-fix (2024-05-07) 1 commit
  (merged to 'next' on 2024-05-08 at eca398f4a5)
 + scalar: avoid segfault in reconfigure --all

 Scalar fix.

 Will merge to 'master'.
 source: <pull.1724.v3.git.1715126749391.gitgitgadget@gmail.com>


* ps/pseudo-ref-terminology (2024-05-10) 10 commits
 - refs: refuse to write pseudorefs
 - ref-filter: properly distinuish pseudo and root refs
 - refs: pseudorefs are no refs
 - refs: classify HEAD as a root ref
 - refs: root refs can be symbolic refs
 - refs: refname `is_special_ref()` to `is_pseudo_ref()`
 - refs: rename `is_pseudoref()` to `is_root_ref()`
 - Documentation/glossary: define root refs as refs
 - Documentation/glossary: clarify limitations of pseudorefs
 - Documentation/glossary: redefine pseudorefs as special refs

 Terminology to call various ref-like things are getting
 straightened out.

 Comments?
 source: <cover.1715330206.git.ps@pks.im>


* jc/rev-parse-fatal-doc (2024-05-01) 1 commit
 - rev-parse: document how --is-* options work outside a repository

 Doc update.

 Comments?
 source: <xmqqplu54fbg.fsf@gitster.g>


* ps/undecided-is-not-necessarily-sha1 (2024-05-06) 15 commits
  (merged to 'next' on 2024-05-08 at 9f8e894685)
 + repository: stop setting SHA1 as the default object hash
 + oss-fuzz/commit-graph: set up hash algorithm
 + builtin/shortlog: don't set up revisions without repo
 + builtin/diff: explicitly set hash algo when there is no repo
 + builtin/bundle: abort "verify" early when there is no repository
 + builtin/blame: don't access potentially unitialized `the_hash_algo`
 + builtin/rev-parse: allow shortening to more than 40 hex characters
 + remote-curl: fix parsing of detached SHA256 heads
 + attr: fix BUG() when parsing attrs outside of repo
 + attr: don't recompute default attribute source
 + parse-options-cb: only abbreviate hashes when hash algo is known
 + path: move `validate_headref()` to its only user
 + path: harden validation of HEAD with non-standard hashes
 + Merge branch 'ps/the-index-is-no-more' into ps/undecided-is-not-necessarily-sha1
 + Merge branch 'jc/no-default-attr-tree-in-bare' into ps/undecided-is-not-necessarily-sha1
 (this branch uses jc/no-default-attr-tree-in-bare.)

 Before discovering the repository details, We used to assume SHA-1
 as the "default" hash function, which has been corrected. Hopefully
 this will smoke out codepaths that rely on such an unwarranted
 assumptions.

 Will merge to 'master'.
 source: <cover.1715057362.git.ps@pks.im>


* pw/rebase-i-error-message (2024-04-08) 2 commits
 - rebase -i: improve error message when picking merge
 - rebase -i: pass struct replay_opts to parse_insn_line()

 When the user adds to "git rebase -i" instruction to "pick" a merge
 commit, the error experience is not pleasant.  Such an error is now
 caught earlier in the process that parses the todo list.

 Expecting a reroll.
 cf. <88bc0787-e7ae-49e5-99e8-97f6c55ea8c6@gmail.com>
 source: <pull.1672.v2.git.1712585787.gitgitgadget@gmail.com>


* ds/send-email-per-message-block (2024-04-10) 2 commits
 - send-email: make it easy to discern the messages for each patch
 - send-email: move newline characters out of a few translatable strings

 "git send-email" learned to separate its reports on each message it
 sends out with an extra blank line in between.

 Comments?
 source: <cover.1712732383.git.dsimic@manjaro.org>


* ew/khash-to-khashl (2024-03-28) 3 commits
 - khashl: fix ensemble lookups on empty table
 - treewide: switch to khashl for memory savings
 - list-objects-filter: use kh_size API

 The hashtable library "khash.h" has been replaced with "khashl.h"
 that has better memory usage characteristics.

 Needs review.
 cf. <xmqqy1a4ao3t.fsf@gitster.g>
 source: <20240328101356.300374-1-e@80x24.org>


* tb/pseudo-merge-reachability-bitmap (2024-04-30) 23 commits
 - t/perf: implement performace tests for pseudo-merge bitmaps
 - pseudo-merge: implement support for finding existing merges
 - ewah: `bitmap_equals_ewah()`
 - pack-bitmap: extra trace2 information
 - pack-bitmap.c: use pseudo-merges during traversal
 - t/test-lib-functions.sh: support `--date` in `test_commit_bulk()`
 - pack-bitmap: implement test helpers for pseudo-merge
 - ewah: implement `ewah_bitmap_popcount()`
 - pseudo-merge: implement support for reading pseudo-merge commits
 - pack-bitmap.c: read pseudo-merge extension
 - pseudo-merge: scaffolding for reads
 - pack-bitmap: extract `read_bitmap()` function
 - pack-bitmap-write.c: write pseudo-merge table
 - pack-bitmap-write.c: select pseudo-merge commits
 - pseudo-merge: implement support for selecting pseudo-merge commits
 - pack-bitmap: make `bitmap_writer_push_bitmapped_commit()` public
 - pack-bitmap: implement `bitmap_writer_has_bitmapped_object_id()`
 - pack-bitmap-write: support storing pseudo-merge commits
 - pseudo-merge.ch: initial commit
 - pack-bitmap: move some initialization to `bitmap_writer_init()`
 - pack-bitmap: drop unused `max_bitmaps` parameter
 - ewah: implement `ewah_bitmap_is_subset()`
 - Documentation/technical: describe pseudo-merge bitmaps format

 The pack-bitmap machinery learned to write pseudo-merge bitmaps,
 which act as imaginary octopus merges covering un-bitmapped
 reference tips. This enhances bitmap coverage, and thus,
 performance, for repositories with many references using bitmaps.

 Needs review.
 source: <cover.1714422410.git.me@ttaylorr.com>


* la/hide-trailer-info (2024-05-02) 11 commits
 - trailer unit tests: inspect iterator contents
 - trailer: document parse_trailers() usage
 - trailer: retire trailer_info_get() from API
 - trailer: make trailer_info struct private
 - trailer: make parse_trailers() return trailer_info pointer
 - interpret-trailers: access trailer_info with new helpers
 - sequencer: use the trailer iterator
 - trailer: teach iterator about non-trailer lines
 - trailer: add unit tests for trailer iterator
 - Makefile: sort UNIT_TEST_PROGRAMS
 - Merge branch 'la/format-trailer-info' into la/hide-trailer-info

 The trailer API has been reshuffled a bit.

 Waiting for a review response.
 cf. <a75133dc-a0bb-4f61-a616-988f2b4d5688@gmail.com>
 source: <pull.1696.v4.git.1714625667.gitgitgadget@gmail.com>


* ds/doc-config-reflow (2024-03-14) 1 commit
 - config.txt: perform some minor reformatting

 Reflow a paragraph in the documentation source without any effect
 to the formatted text.

 Will discard.
 source: <97bdaf075bf5a68554cca1731eca78aff2662907.1710444774.git.dsimic@manjaro.org>


* ie/config-includeif-hostname (2024-03-19) 2 commits
 - config: learn the "hostname:" includeIf condition
 - t: add a test helper for getting hostname

 The conditional inclusion mechanism for configuration files learned
 to switch on the hostname.

 Expecting a reroll.
 cf. <20240319210428.GC1159535@coredump.intra.peff.net>
 cf. <20240320001934.GA903718@coredump.intra.peff.net>
 source: <20240319183722.211300-1-ignacio@iencinas.com>


* cw/git-std-lib (2024-02-28) 4 commits
 . SQUASH??? get rid of apparent debugging crufts
 . test-stdlib: show that git-std-lib is independent
 . git-std-lib: introduce Git Standard Library
 . pager: include stdint.h because uintmax_t is used

 Split libgit.a out to a separate git-std-lib tor easier reuse.

 Expecting a reroll.
 source: <cover.1696021277.git.jonathantanmy@google.com>


* js/unit-test-suite-runner (2024-05-06) 9 commits
  (merged to 'next' on 2024-05-07 at 3b376223e3)
 + cmake: let `test-tool` run the unit tests, too
 + ci: use test-tool as unit test runner on Windows
 + t/Makefile: run unit tests alongside shell tests
 + unit tests: add rule for running with test-tool
 + test-tool run-command testsuite: support unit tests
 + test-tool run-command testsuite: remove hardcoded filter
 + test-tool run-command testsuite: get shell from env
 + t0080: turn t-basic unit test into a helper
 + Merge branch 'jk/unit-tests-buildfix' into js/unit-test-suite-runner

 The "test-tool" has been taught to run testsuite tests in parallel,
 bypassing the need to use the "prove" tool.

 Will merge to 'master'.
 source: <cover.1715024899.git.steadmon@google.com>
 source: <pull.1666.git.1708038924522.gitgitgadget@gmail.com>


* bk/complete-dirname-for-am-and-format-patch (2024-01-12) 1 commit
 - completion: dir-type optargs for am, format-patch

 Command line completion support (in contrib/) has been
 updated for a few commands to complete directory names where a
 directory name is expected.

 Expecting a reroll.
 cf. <40c3a824-a961-490b-94d4-4eb23c8f713d@gmail.com>
 cf. <6683f24e-7e56-489d-be2d-8afe1fc38d2b@gmail.com>
 source: <d37781c3-6af2-409b-95a8-660a9b92d20b@smtp-relay.sendinblue.com>


* bk/complete-send-email (2024-01-12) 1 commit
 - completion: don't complete revs when --no-format-patch

 Command line completion support (in contrib/) has been taught to
 avoid offering revision names as candidates to "git send-email" when
 the command is used to send pre-generated files.

 Expecting a reroll.
 cf. <CAC4O8c88Z3ZqxH2VVaNPpEGB3moL5dJcg3cOWuLWwQ_hLrJMtA@mail.gmail.com>
 source: <a718b5ee-afb0-44bd-a299-3208fac43506@smtp-relay.sendinblue.com>


* tb/path-filter-fix (2024-01-31) 16 commits
 - bloom: introduce `deinit_bloom_filters()`
 - commit-graph: reuse existing Bloom filters where possible
 - object.h: fix mis-aligned flag bits table
 - commit-graph: new Bloom filter version that fixes murmur3
 - commit-graph: unconditionally load Bloom filters
 - bloom: prepare to discard incompatible Bloom filters
 - bloom: annotate filters with hash version
 - repo-settings: introduce commitgraph.changedPathsVersion
 - t4216: test changed path filters with high bit paths
 - t/helper/test-read-graph: implement `bloom-filters` mode
 - bloom.h: make `load_bloom_filter_from_graph()` public
 - t/helper/test-read-graph.c: extract `dump_graph_info()`
 - gitformat-commit-graph: describe version 2 of BDAT
 - commit-graph: ensure Bloom filters are read with consistent settings
 - revision.c: consult Bloom filters for root commits
 - t/t4216-log-bloom.sh: harden `test_bloom_filters_not_used()`

 The Bloom filter used for path limited history traversal was broken
 on systems whose "char" is unsigned; update the implementation and
 bump the format version to 2.

 Waiting for a final ack?
 cf. <ZcFjkfbsBfk7JQIH@nand.local>
 source: <cover.1706741516.git.me@ttaylorr.com>


* jc/rerere-cleanup (2023-08-25) 4 commits
 - rerere: modernize use of empty strbuf
 - rerere: try_merge() should use LL_MERGE_ERROR when it means an error
 - rerere: fix comment on handle_file() helper
 - rerere: simplify check_one_conflict() helper function

 Code clean-up.

 Not ready to be reviewed yet.
 source: <20230824205456.1231371-1-gitster@pobox.com>

--------------------------------------------------
[Discarded]

* js/cmake-with-test-tool (2024-04-30) 2 commits
 . cmake: let `test-tool` run the unit tests, too
 . Merge branch 'js/unit-test-suite-runner' into js/cmake-with-test-tool
 (this branch uses js/unit-test-suite-runner.)

 "test-tool" is now built in CMake build to also run the unit tests.

 Rolled into the base topic.
 source: <pull.1666.git.1708038924522.gitgitgadget@gmail.com>

^ permalink raw reply	[relevance 1%]

* Re: [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema
  2024-05-11 21:47  1% [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema Xiaxi Shen
@ 2024-05-11 23:26  1% ` Rob Herring (Arm)
  0 siblings, 0 replies; 200+ results
From: Rob Herring (Arm) @ 2024-05-11 23:26 UTC (permalink / raw)
  To: Xiaxi Shen
  Cc: skhan, lgirdwood, devicetree, linux-sound, broonie,
	javier.carrasco.cruz, linux-kernel, krzk+dt, conor+dt


On Sat, 11 May 2024 14:47:39 -0700, Xiaxi Shen wrote:
> Convert adi,ssm2602 binding to DT schema
> 
> The original adi,ssm2602.txt contains bindings for 3 devices
> SSM2602, SSM2603 and SSM2604. Since they share something
> in common. So I created one single yaml and name it 260x instead.
> Let me know if you think it should be done in another way.
> 
> It passed dt_binding_check and dtbs_check.
> 
> Signed-off-by: Xiaxi Shen <shenxiaxi26@gmail.com>
> ---
>  .../devicetree/bindings/sound/adi,ssm2602.txt | 19 -------
>  .../bindings/sound/adi,ssm260x.yaml           | 50 +++++++++++++++++++
>  2 files changed, 50 insertions(+), 19 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/adi,ssm2602.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
 	 $id: http://devicetree.org/schemas/sound/adi,ssm2602.yaml
 	file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240511214739.242950-1-shenxiaxi26@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[relevance 1%]

* [syzbot] [btrfs?] possible deadlock in join_transaction
@ 2024-05-11 23:23  1% syzbot
  0 siblings, 0 replies; 200+ results
From: syzbot @ 2024-05-11 23:23 UTC (permalink / raw)
  To: clm, dsterba, josef, linux-btrfs, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    dccb07f2914c Merge tag 'for-6.9-rc7-tag' of git://git.kern..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17ad432f180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=a450595960709c8
dashboard link: https://syzkaller.appspot.com/bug?extid=f7a41568dd5872d6ad52
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: i386

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-dccb07f2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/987455e5cf13/vmlinux-dccb07f2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/327c390f753b/bzImage-dccb07f2.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f7a41568dd5872d6ad52@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
6.9.0-rc7-syzkaller-00012-gdccb07f2914c #0 Not tainted
------------------------------------------------------
kswapd0/110 is trying to acquire lock:
ffff888000c76380 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x430/0xf40 fs/btrfs/transaction.c:290

but task is already holding lock:
ffff88805a236610 (sb_internal#2){.+.+}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x110/0x330 fs/btrfs/delayed-inode.c:1275

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #4 (sb_internal#2){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1664 [inline]
       sb_start_intwrite include/linux/fs.h:1847 [inline]
       start_transaction+0xbc1/0x1a70 fs/btrfs/transaction.c:694
       btrfs_commit_inode_delayed_inode+0x110/0x330 fs/btrfs/delayed-inode.c:1275
       btrfs_evict_inode+0x960/0xe80 fs/btrfs/inode.c:5307
       evict+0x2ed/0x6c0 fs/inode.c:667
       iput_final fs/inode.c:1741 [inline]
       iput.part.0+0x5a8/0x7f0 fs/inode.c:1767
       iput+0x5c/0x80 fs/inode.c:1757
       dentry_unlink_inode+0x295/0x440 fs/dcache.c:400
       __dentry_kill+0x1d0/0x600 fs/dcache.c:603
       shrink_kill fs/dcache.c:1048 [inline]
       shrink_dentry_list+0x140/0x5d0 fs/dcache.c:1075
       prune_dcache_sb+0xeb/0x150 fs/dcache.c:1156
       super_cache_scan+0x32a/0x550 fs/super.c:221
       do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435
       shrink_slab_memcg mm/shrinker.c:548 [inline]
       shrink_slab+0xa87/0x1310 mm/shrinker.c:626
       shrink_one+0x493/0x7c0 mm/vmscan.c:4774
       shrink_many mm/vmscan.c:4835 [inline]
       lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4935
       shrink_node mm/vmscan.c:5894 [inline]
       kswapd_shrink_node mm/vmscan.c:6704 [inline]
       balance_pgdat+0x10d1/0x1a10 mm/vmscan.c:6895
       kswapd+0x5ea/0xbf0 mm/vmscan.c:7164
       kthread+0x2c1/0x3a0 kernel/kthread.c:388
       ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

-> #3 (fs_reclaim){+.+.}-{0:0}:
       __fs_reclaim_acquire mm/page_alloc.c:3698 [inline]
       fs_reclaim_acquire+0x102/0x160 mm/page_alloc.c:3712
       might_alloc include/linux/sched/mm.h:312 [inline]
       slab_pre_alloc_hook mm/slub.c:3752 [inline]
       slab_alloc_node mm/slub.c:3833 [inline]
       kmalloc_trace+0x51/0x340 mm/slub.c:3998
       kmalloc include/linux/slab.h:628 [inline]
       ulist_alloc+0x77/0x1c0 fs/btrfs/ulist.c:98
       btrfs_quota_enable+0x342/0x1ef0 fs/btrfs/qgroup.c:1031
       btrfs_ioctl_quota_ctl fs/btrfs/ioctl.c:3765 [inline]
       btrfs_ioctl+0x6af4/0x8290 fs/btrfs/ioctl.c:4762
       __do_compat_sys_ioctl+0x2c3/0x330 fs/ioctl.c:1004
       do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
       __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386
       do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
       entry_SYSENTER_compat_after_hwframe+0x84/0x8e

-> #2 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:608 [inline]
       __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752
       btrfs_quota_enable+0x3a1/0x1ef0 fs/btrfs/qgroup.c:1066
       btrfs_ioctl_quota_ctl fs/btrfs/ioctl.c:3765 [inline]
       btrfs_ioctl+0x6af4/0x8290 fs/btrfs/ioctl.c:4762
       __do_compat_sys_ioctl+0x2c3/0x330 fs/ioctl.c:1004
       do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
       __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386
       do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
       entry_SYSENTER_compat_after_hwframe+0x84/0x8e

-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
       join_transaction+0x164/0xf40 fs/btrfs/transaction.c:315
       start_transaction+0x427/0x1a70 fs/btrfs/transaction.c:700
       btrfs_create_common+0x18b/0x270 fs/btrfs/inode.c:6583
       btrfs_create+0x114/0x160 fs/btrfs/inode.c:6629
       lookup_open.isra.0+0x10a1/0x13c0 fs/namei.c:3497
       open_last_lookups fs/namei.c:3566 [inline]
       path_openat+0x92f/0x2990 fs/namei.c:3796
       do_filp_open+0x1dc/0x430 fs/namei.c:3826
       do_sys_openat2+0x17a/0x1e0 fs/open.c:1406
       do_sys_open fs/open.c:1421 [inline]
       __do_compat_sys_openat fs/open.c:1481 [inline]
       __se_compat_sys_openat fs/open.c:1479 [inline]
       __ia32_compat_sys_openat+0x16e/0x210 fs/open.c:1479
       do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
       __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386
       do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
       entry_SYSENTER_compat_after_hwframe+0x84/0x8e

-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3869 [inline]
       __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137
       lock_acquire kernel/locking/lockdep.c:5754 [inline]
       lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719
       join_transaction+0x436/0xf40 fs/btrfs/transaction.c:290
       start_transaction+0x427/0x1a70 fs/btrfs/transaction.c:700
       btrfs_commit_inode_delayed_inode+0x110/0x330 fs/btrfs/delayed-inode.c:1275
       btrfs_evict_inode+0x960/0xe80 fs/btrfs/inode.c:5307
       evict+0x2ed/0x6c0 fs/inode.c:667
       iput_final fs/inode.c:1741 [inline]
       iput.part.0+0x5a8/0x7f0 fs/inode.c:1767
       iput+0x5c/0x80 fs/inode.c:1757
       dentry_unlink_inode+0x295/0x440 fs/dcache.c:400
       __dentry_kill+0x1d0/0x600 fs/dcache.c:603
       shrink_kill fs/dcache.c:1048 [inline]
       shrink_dentry_list+0x140/0x5d0 fs/dcache.c:1075
       prune_dcache_sb+0xeb/0x150 fs/dcache.c:1156
       super_cache_scan+0x32a/0x550 fs/super.c:221
       do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435
       shrink_slab_memcg mm/shrinker.c:548 [inline]
       shrink_slab+0xa87/0x1310 mm/shrinker.c:626
       shrink_one+0x493/0x7c0 mm/vmscan.c:4774
       shrink_many mm/vmscan.c:4835 [inline]
       lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4935
       shrink_node mm/vmscan.c:5894 [inline]
       kswapd_shrink_node mm/vmscan.c:6704 [inline]
       balance_pgdat+0x10d1/0x1a10 mm/vmscan.c:6895
       kswapd+0x5ea/0xbf0 mm/vmscan.c:7164
       kthread+0x2c1/0x3a0 kernel/kthread.c:388
       ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

other info that might help us debug this:

Chain exists of:
  btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(sb_internal#2);
                               lock(fs_reclaim);
                               lock(
sb_internal#2);
  rlock(btrfs_trans_num_writers);

 *** DEADLOCK ***

3 locks held by kswapd0/110:
 #0: 
ffffffff8d937180 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x166/0x1a10 mm/vmscan.c:6782
 #1: ffff88805a2360e0 (&type->s_umount_key#82){++++}-{3:3}, at: super_trylock_shared fs/super.c:561 [inline]
 #1: ffff88805a2360e0 (&type->s_umount_key#82){++++}-{3:3}, at: super_cache_scan+0x96/0x550 fs/super.c:196
 #2: ffff88805a236610 (sb_internal#2){.+.+}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x110/0x330 fs/btrfs/delayed-inode.c:1275

stack backtrace:
CPU: 3 PID: 110 Comm: kswapd0 Not tainted 6.9.0-rc7-syzkaller-00012-gdccb07f2914c #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3869 [inline]
 __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137
 lock_acquire kernel/locking/lockdep.c:5754 [inline]
 lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719
 join_transaction+0x436/0xf40 fs/btrfs/transaction.c:290
 start_transaction+0x427/0x1a70 fs/btrfs/transaction.c:700
 btrfs_commit_inode_delayed_inode+0x110/0x330 fs/btrfs/delayed-inode.c:1275
 btrfs_evict_inode+0x960/0xe80 fs/btrfs/inode.c:5307
 evict+0x2ed/0x6c0 fs/inode.c:667
 iput_final fs/inode.c:1741 [inline]
 iput.part.0+0x5a8/0x7f0 fs/inode.c:1767
 iput+0x5c/0x80 fs/inode.c:1757
 dentry_unlink_inode+0x295/0x440 fs/dcache.c:400
 __dentry_kill+0x1d0/0x600 fs/dcache.c:603
 shrink_kill fs/dcache.c:1048 [inline]
 shrink_dentry_list+0x140/0x5d0 fs/dcache.c:1075
 prune_dcache_sb+0xeb/0x150 fs/dcache.c:1156
 super_cache_scan+0x32a/0x550 fs/super.c:221
 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435
 shrink_slab_memcg mm/shrinker.c:548 [inline]
 shrink_slab+0xa87/0x1310 mm/shrinker.c:626
 shrink_one+0x493/0x7c0 mm/vmscan.c:4774
 shrink_many mm/vmscan.c:4835 [inline]
 lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4935
 shrink_node mm/vmscan.c:5894 [inline]
 kswapd_shrink_node mm/vmscan.c:6704 [inline]
 balance_pgdat+0x10d1/0x1a10 mm/vmscan.c:6895
 kswapd+0x5ea/0xbf0 mm/vmscan.c:7164
 kthread+0x2c1/0x3a0 kernel/kthread.c:388
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[relevance 1%]

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest"
  @ 2024-05-11 23:17  1%   ` Geliang Tang
  0 siblings, 0 replies; 200+ results
From: Geliang Tang @ 2024-05-11 23:17 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp, Geliang Tang

On Sat, May 11, 2024 at 03:50:29PM +0200, Matthieu Baerts wrote:
> Hi Geliang,
> 
> Thank you for this fix!
> 
> 11 May 2024 12:42:08 Geliang Tang <geliang@kernel.org>:
> 
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > Add pm_nl_ctl.
> > Use SYS_NOFAIL in _ss_search().
> >
> > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> > ---
> > tools/testing/selftests/bpf/Makefile           |  2 +-
> > tools/testing/selftests/bpf/pm_nl_ctl.c        |  1 +
> > tools/testing/selftests/bpf/prog_tests/mptcp.c | 15 ++++-----------
> > 3 files changed, 6 insertions(+), 12 deletions(-)
> > create mode 120000 tools/testing/selftests/bpf/pm_nl_ctl.c
> >
> > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> > index b90c718218ae..bd2e3b138a5c 100644
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -131,7 +131,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
> >     flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
> >     test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \
> >     xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \
> > -   xdp_features bpf_test_no_cfi.ko
> > +   xdp_features bpf_test_no_cfi.ko pm_nl_ctl
> >
> > TEST_GEN_FILES += liburandom_read.so urandom_read sign-file uprobe_multi
> >
> > diff --git a/tools/testing/selftests/bpf/pm_nl_ctl.c b/tools/testing/selftests/bpf/pm_nl_ctl.c
> > new file mode 120000
> > index 000000000000..5a08c255b278
> > --- /dev/null
> > +++ b/tools/testing/selftests/bpf/pm_nl_ctl.c
> 
> Best to prefix it with "mptcp_": clearer and it will be linked to MPTCP in the maintainers file.

mptcp_ prefix has already added in v2. Please update the maintainers
file when merging this.

> 
> > @@ -0,0 +1 @@
> > +../net/mptcp/pm_nl_ctl.c
> > \ No newline at end of file
> > diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> > index 793b4b9c2bd2..9c6d1e4f6f35 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> > @@ -362,7 +362,8 @@ static int endpoint_init(char *flags)
> >     SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST);
> >     SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, ADDR_2);
> >     SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST);
> > -   SYS(fail, "ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_2, flags);
> > +   if (SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_2, flags))
> 
> It is maybe better to only use mptcp_pm_nl_ctl here: to maintain one way here, our CI will do the same as what the BPF one will do, and we avoid errors printed in stderr if "ip mptcp" is not supported.
>

No, I prefer this one. "ip mptcp" should be used here since it's
the normal way to set mptcp. pm_nl_ctl is just a work-around for it.

No error printed in stderr if "ip mptcp" is not supported since
SYS_NOFAIL is used here, not SYS. I have tested this case already.

> > +       SYS(fail, "ip netns exec %s ./pm_nl_ctl add %s flags %s", NS_TEST, ADDR_2, flags);
> >
> >     return 0;
> > fail:
> > @@ -371,16 +372,8 @@ static int endpoint_init(char *flags)
> >
> > static int _ss_search(char *src, char *dst, char *port, char *keyword)
> > {
> > -   char cmd[128];
> > -   int n;
> > -
> > -   n = snprintf(cmd, sizeof(cmd),
> > -            "ip netns exec %s ss -Menita src %s dst %s %s %d | grep -q '%s'",
> > -            NS_TEST, src, dst, port, PORT_1, keyword);
> > -   if (n < 0 || n >= sizeof(cmd))
> > -       return -1;
> > -
> > -   return system(cmd);
> > +   return SYS_NOFAIL("ip netns exec %s ss -Menita src %s dst %s %s %d | grep -q '%s'",
> > +             NS_TEST, src, dst, port, PORT_1, keyword);
> 
> If "ip mptcp" is not supported, I guess "ss -M" will not be supported as well, no?
> 
> Do we need -M here for these tests?

No need to do this yet until we actually encounter it.

Regards,
Geliang

> 
> Cheers,
> Matt
> 
> > }
> >
> > static int ss_search(char *src, char *keyword)
> > --
> > 2.43.0

^ permalink raw reply	[relevance 1%]

* Re: [PATCH 5/5] nvme: enable logical block size > PAGE_SIZE
  @ 2024-05-11 23:11  1%     ` Luis Chamberlain
  0 siblings, 0 replies; 200+ results
From: Luis Chamberlain @ 2024-05-11 23:11 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: hare, Andrew Morton, Pankaj Raghav, linux-nvme, linux-block,
	Pankaj Raghav

On Fri, May 10, 2024 at 11:37:22PM +0100, Matthew Wilcox wrote:
> On Fri, May 10, 2024 at 12:29:06PM +0200, hare@kernel.org wrote:
> > From: Pankaj Raghav <p.raghav@samsung.com>
> > 
> > Don't set the capacity to zero for when logical block size > PAGE_SIZE
> > as the block device with iomap aops support allocating block cache with
> > a minimum folio order.
> 
> It feels like this should be something the block layer does rather than
> something an individual block driver does.  Is there similar code to
> rip out of sd.c?  Or other block drivers?

Each block driver must be tested and set a max if its below what the page
cache supports.

  Luis

^ permalink raw reply	[relevance 1%]

* Re: [PATCH 5/5] nvme: enable logical block size > PAGE_SIZE
    @ 2024-05-11 23:09  0%   ` Luis Chamberlain
  1 sibling, 0 replies; 200+ results
From: Luis Chamberlain @ 2024-05-11 23:09 UTC (permalink / raw)
  To: hare
  Cc: Andrew Morton, Matthew Wilcox, Pankaj Raghav, linux-nvme,
	linux-block, Pankaj Raghav

On Fri, May 10, 2024 at 12:29:06PM +0200, hare@kernel.org wrote:
> From: Pankaj Raghav <p.raghav@samsung.com>
> 
> Don't set the capacity to zero for when logical block size > PAGE_SIZE
> as the block device with iomap aops support allocating block cache with
> a minimum folio order.
> 
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> Signed-off-by: Hannes Reinecke <hare@kernel.org>
> ---
>  drivers/nvme/host/core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 828c77fa13b7..5f1308daa74f 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1963,11 +1963,10 @@ static bool nvme_update_disk_info(struct nvme_ns *ns, struct nvme_id_ns *id,
>  	bool valid = true;
>  
>  	/*
> -	 * The block layer can't support LBA sizes larger than the page size
> -	 * or smaller than a sector size yet, so catch this early and don't
> -	 * allow block I/O.
> +	 * The block layer can't support LBA sizes smaller than a sector size,
> +	 * so catch this early and don't allow block I/O.
>  	 */
> -	if (head->lba_shift > PAGE_SHIFT || head->lba_shift < SECTOR_SHIFT) {
> +	if (head->lba_shift < SECTOR_SHIFT) {

We can't just do this, we need to consider the actual nvme cap (test it,
and if it crashes and below what the page cache supports, then we have
to go below) and so to make the enablment easier. So we could just move
this to helper [0]. Then when the bdev cache patch goes through the
check for CONFIG_BUFFER_HEAD can be removed, if this goes first.

We crash if we go above 1 MiB today, we should be able to go up to 2
MiB but that requires some review to see what stupid thing is getting
in the way.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=20240408-lbs-scsi-kludge&id=1f7f4dce548cc11872e977939a872b107c68ad53

  Luis

^ permalink raw reply	[relevance 0%]

* Re: [PATCH v6 0/3] pkg-database and systemd-sysext image
  @ 2024-05-11 23:07  0% ` Alexandre Belloni
  0 siblings, 0 replies; 200+ results
From: Alexandre Belloni @ 2024-05-11 23:07 UTC (permalink / raw)
  To: Johannes Schneider; +Cc: openembedded-core, richard.purdie, alex.kanavin

Hello,

This still fails on the autobuilders, I'm pretty sure the config for the
build folder has:
PACKAGE_CLASSES = "package_rpm"

This explains this:

build-st-4166614$ tree tmp/deploy/images/qemux86-64/var/lib/
tmp/deploy/images/qemux86-64/var/lib/
├── dnf
│   ├── history.sqlite
│   ├── history.sqlite-shm
│   └── history.sqlite-wal
└── rpm
    ├── rpmdb.sqlite
    ├── rpmdb.sqlite-shm
    └── rpmdb.sqlite-wal

3 directories, 6 files

Are you testing with plain poky?


On 10/05/2024 05:09:34+0200, Johannes Schneider wrote:
> systemd-sysext allows to overlay another image (or multiple) ontop of
> a "base-image" = the current rootfs, via the use of overlayfs; to add
> tools and features meant for development purposes.
> 
> To quote the documentation on systemd-sysext:
> " ...addition in order to make debugging/development easier). System
> extension images should not be misunderstood as a generic software
> packaging framework, ..."
> 
> To build a lean image, that only holds packages that are not already
> part of the base-image, a snapshot of the package-database is taken
> after the installation of the base-rootfs is done, and picked up again
> when collecting the rootfs of such a extension image.
> 
> with all this in place an example usage could look like this:
> some-core-image.bb
>   inherit core-image
>   IMAGE_GEN_PKGDBFS = "1"
> 
> extending-image.bb
>   inherit image-sysext
>   IMAGE_FSTYPES = "squashfs"
>   IMAGE_BASE_PKGDB = "some-core-image"
>   # the above pointing at a package-db similar to:
>   # build/deploy/images/$MACHINE/some-core-image-$MACHINE-20240210172305-pkgdb.rootfs.tar.gz
> 
> then on the device, running some-core-image, with the extension image placed at FN:
> $> ln -s "$FN" /run/extensions/$(basename $FN).raw
> $> systemd-sysext list
> $> SYSTEMD_LOG_LEVEL=debug systemd-sysext merge
> 
> As long as the VERSION_ID of the extension image matches the os-release
> in the base image, the above commands return sucessfully;
> for details on the compativility check see the docs for systemd-sysext.
> 
> =========
> 
> changes with v2:
>         rebase from 'kirkstone' onto 'master'
> 
> changes with v3:
> 	incorporate review suggestions for simplification
> 	add task dependency handling
> 	add oe-selftest for the pkgdb handling
> 	add variable documentation and
> 	some more comments, and examples in the commit-msg
> 
> changes with v4:
> 	rebase onto 'master' => no functional changes
> 	fixed patchtest findings
> 
> changes with v5:
>         rebase onto 'master'
> 	add '.sysext' to the deployed symlink name
>         sidenote on the tests and autobuilder failure: run locally they succeed, e.g.:
>           #> oe-selftest --verbose -r imagefeatures.ImageFeatures.test_image_gen_pkgdbfs
> 
> changes with v6:
> 	tests: restructure to call 'bitbake' only once in the testcase itself
> 	  (in hopes of solving the autobuilder problem; local test runs succeed)
> 
> changes with v7:
>         tests: undo the restructuring of done in v6, in favour of explicitly forcing steps:
> 	  '-c rootfs -f'.  since concurrency of the autobuilder, and reusing artifacts/sstate-caching is probably the issue?

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[relevance 0%]

* [PATCH v2 7/7] drm/panel: lg-sw43408: use new streamlined MIPI DSI API
  2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
                   ` (5 preceding siblings ...)
  2024-05-11 23:00  1% ` [PATCH v2 6/7] drm/panel: novatek-nt36672e: use wrapped MIPI DCS functions Dmitry Baryshkov
@ 2024-05-11 23:00  1% ` Dmitry Baryshkov
  6 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Use newer mipi_dsi_*_multi() functions in order to simplify and cleanup
panel's prepare() and unprepare() functions.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 95 +++++++++++++-------------------
 1 file changed, 37 insertions(+), 58 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c
index 67a98ac508f8..f3dcc39670ea 100644
--- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
+++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
@@ -40,104 +40,83 @@ static inline struct sw43408_panel *to_panel_info(struct drm_panel *panel)
 
 static int sw43408_unprepare(struct drm_panel *panel)
 {
-	struct sw43408_panel *ctx = to_panel_info(panel);
+	struct sw43408_panel *sw43408 = to_panel_info(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link };
 	int ret;
 
-	ret = mipi_dsi_dcs_set_display_off(ctx->link);
-	if (ret < 0)
-		dev_err(panel->dev, "set_display_off cmd failed ret = %d\n", ret);
+	mipi_dsi_dcs_set_display_off_multi(&ctx);
 
-	ret = mipi_dsi_dcs_enter_sleep_mode(ctx->link);
-	if (ret < 0)
-		dev_err(panel->dev, "enter_sleep cmd failed ret = %d\n", ret);
+	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
 
-	msleep(100);
+	mipi_dsi_msleep(&ctx, 100);
 
-	gpiod_set_value(ctx->reset_gpio, 1);
+	gpiod_set_value(sw43408->reset_gpio, 1);
+
+	ret = regulator_bulk_disable(ARRAY_SIZE(sw43408->supplies), sw43408->supplies);
 
-	return regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
+	return ret ? : ctx.accum_err;
 }
 
 static int sw43408_program(struct drm_panel *panel)
 {
-	struct sw43408_panel *ctx = to_panel_info(panel);
+	struct sw43408_panel *sw43408 = to_panel_info(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link };
 	struct drm_dsc_picture_parameter_set pps;
-	int ret;
 
-	mipi_dsi_dcs_write_seq(ctx->link, MIPI_DCS_SET_GAMMA_CURVE, 0x02);
+	mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_SET_GAMMA_CURVE, 0x02);
 
-	ret = mipi_dsi_dcs_set_tear_on(ctx->link, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
-	if (ret < 0) {
-		dev_err(panel->dev, "Failed to set tearing: %d\n", ret);
-		return ret;
-	}
+	mipi_dsi_dcs_set_tear_on_multi(&ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
 
-	mipi_dsi_dcs_write_seq(ctx->link, 0x53, 0x0c, 0x30);
-	mipi_dsi_dcs_write_seq(ctx->link, 0x55, 0x00, 0x70, 0xdf, 0x00, 0x70, 0xdf);
-	mipi_dsi_dcs_write_seq(ctx->link, 0xf7, 0x01, 0x49, 0x0c);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x0c, 0x30);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x00, 0x70, 0xdf, 0x00, 0x70, 0xdf);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf7, 0x01, 0x49, 0x0c);
 
-	ret = mipi_dsi_dcs_exit_sleep_mode(ctx->link);
-	if (ret < 0) {
-		dev_err(panel->dev, "Failed to exit sleep mode: %d\n", ret);
-		return ret;
-	}
+	mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
 
-	msleep(135);
+	mipi_dsi_msleep(&ctx, 135);
 
 	/* COMPRESSION_MODE moved after setting the PPS */
 
-	mipi_dsi_dcs_write_seq(ctx->link, 0xb0, 0xac);
-	mipi_dsi_dcs_write_seq(ctx->link, 0xe5,
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0xac);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5,
 			       0x00, 0x3a, 0x00, 0x3a, 0x00, 0x0e, 0x10);
-	mipi_dsi_dcs_write_seq(ctx->link, 0xb5,
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5,
 			       0x75, 0x60, 0x2d, 0x5d, 0x80, 0x00, 0x0a, 0x0b,
 			       0x00, 0x05, 0x0b, 0x00, 0x80, 0x0d, 0x0e, 0x40,
 			       0x00, 0x0c, 0x00, 0x16, 0x00, 0xb8, 0x00, 0x80,
 			       0x0d, 0x0e, 0x40, 0x00, 0x0c, 0x00, 0x16, 0x00,
 			       0xb8, 0x00, 0x81, 0x00, 0x03, 0x03, 0x03, 0x01,
 			       0x01);
-	msleep(85);
-	mipi_dsi_dcs_write_seq(ctx->link, 0xcd,
+	mipi_dsi_msleep(&ctx, 85);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd,
 			       0x00, 0x00, 0x00, 0x19, 0x19, 0x19, 0x19, 0x19,
 			       0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19,
 			       0x16, 0x16);
-	mipi_dsi_dcs_write_seq(ctx->link, 0xcb, 0x80, 0x5c, 0x07, 0x03, 0x28);
-	mipi_dsi_dcs_write_seq(ctx->link, 0xc0, 0x02, 0x02, 0x0f);
-	mipi_dsi_dcs_write_seq(ctx->link, 0x55, 0x04, 0x61, 0xdb, 0x04, 0x70, 0xdb);
-	mipi_dsi_dcs_write_seq(ctx->link, 0xb0, 0xca);
-
-	ret = mipi_dsi_dcs_set_display_on(ctx->link);
-	if (ret < 0) {
-		dev_err(panel->dev, "Failed to set display on: %d\n", ret);
-		return ret;
-	}
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x80, 0x5c, 0x07, 0x03, 0x28);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x02, 0x02, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x04, 0x61, 0xdb, 0x04, 0x70, 0xdb);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0xca);
 
-	msleep(50);
+	mipi_dsi_dcs_set_display_on_multi(&ctx);
 
-	ctx->link->mode_flags &= ~MIPI_DSI_MODE_LPM;
+	mipi_dsi_msleep(&ctx, 50);
 
-	drm_dsc_pps_payload_pack(&pps, ctx->link->dsc);
-	ret = mipi_dsi_picture_parameter_set(ctx->link, &pps);
-	if (ret < 0) {
-		dev_err(panel->dev, "Failed to set PPS: %d\n", ret);
-		return ret;
-	}
+	sw43408->link->mode_flags &= ~MIPI_DSI_MODE_LPM;
+
+	drm_dsc_pps_payload_pack(&pps, sw43408->link->dsc);
 
-	ctx->link->mode_flags |= MIPI_DSI_MODE_LPM;
+	mipi_dsi_picture_parameter_set_multi(&ctx, &pps);
+
+	sw43408->link->mode_flags |= MIPI_DSI_MODE_LPM;
 
 	/*
 	 * This panel uses PPS selectors with offset:
 	 * PPS 1 if pps_identifier is 0
 	 * PPS 2 if pps_identifier is 1
 	 */
-	ret = mipi_dsi_compression_mode_ext(ctx->link, true,
+	mipi_dsi_compression_mode_ext_multi(&ctx, true,
 					    MIPI_DSI_COMPRESSION_DSC, 1);
-	if (ret < 0) {
-		dev_err(panel->dev, "Failed to set compression mode: %d\n", ret);
-		return ret;
-	}
-
-	return 0;
+	return ctx.accum_err;
 }
 
 static int sw43408_prepare(struct drm_panel *panel)

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v2 4/7] drm/panel: ilitek-ili9882t: use wrapped MIPI DCS functions
  2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2024-05-11 23:00  1% ` [PATCH v2 3/7] drm/panel: boe-tv101wum-nl6: use wrapped MIPI DCS functions Dmitry Baryshkov
@ 2024-05-11 23:00  1% ` Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 5/7] drm/panel: innolux-p079zca: use mipi_dsi_dcs_nop_multi() Dmitry Baryshkov
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to
simplify driver's init/exit code.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 48 ++++++---------------------
 1 file changed, 11 insertions(+), 37 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
index 58fc1d799371..830d7cfbe857 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
@@ -402,19 +402,15 @@ static int starry_ili9882t_init(struct ili9882t *ili)
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x92, 0x22);
 
 	ili9882t_switch_page(&ctx, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_EXIT_SLEEP_MODE);
-	if (ctx.accum_err)
-		return ctx.accum_err;
+	mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
 
-	msleep(120);
+	mipi_dsi_msleep(&ctx, 120);
 
-	mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_SET_DISPLAY_ON);
-	if (ctx.accum_err)
-		return ctx.accum_err;
+	mipi_dsi_dcs_set_display_on_multi(&ctx);
 
-	msleep(20);
+	mipi_dsi_msleep(&ctx, 20);
 
-	return 0;
+	return ctx.accum_err;
 };
 
 static inline struct ili9882t *to_ili9882t(struct drm_panel *panel)
@@ -422,43 +418,21 @@ static inline struct ili9882t *to_ili9882t(struct drm_panel *panel)
 	return container_of(panel, struct ili9882t, base);
 }
 
-static int ili9882t_enter_sleep_mode(struct ili9882t *ili)
-{
-	struct mipi_dsi_device *dsi = ili->dsi;
-	int ret;
-
-	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
-
-	ret = mipi_dsi_dcs_set_display_off(dsi);
-	if (ret < 0)
-		return ret;
-
-	ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
-	if (ret < 0)
-		return ret;
-
-	return 0;
-}
-
 static int ili9882t_disable(struct drm_panel *panel)
 {
 	struct ili9882t *ili = to_ili9882t(panel);
 	struct mipi_dsi_multi_context ctx = { .dsi = ili->dsi };
-	int ret;
 
 	ili9882t_switch_page(&ctx, 0x00);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	ret = ili9882t_enter_sleep_mode(ili);
-	if (ret < 0) {
-		dev_err(panel->dev, "failed to set panel off: %d\n", ret);
-		return ret;
-	}
+	ili->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
 
-	msleep(150);
+	mipi_dsi_dcs_set_display_off_multi(&ctx);
+	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
 
-	return 0;
+	mipi_dsi_msleep(&ctx, 150);
+
+	return ctx.accum_err;
 }
 
 static int ili9882t_unprepare(struct drm_panel *panel)

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v2 5/7] drm/panel: innolux-p079zca: use mipi_dsi_dcs_nop_multi()
  2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2024-05-11 23:00  1% ` [PATCH v2 4/7] drm/panel: ilitek-ili9882t: " Dmitry Baryshkov
@ 2024-05-11 23:00  1% ` Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 6/7] drm/panel: novatek-nt36672e: use wrapped MIPI DCS functions Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 7/7] drm/panel: lg-sw43408: use new streamlined MIPI DSI API Dmitry Baryshkov
  6 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Remove conditional code and use mipi_dsi_dcs_nop_multi() wrapper to
simplify driver code.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
index ade8bf7491ee..0691a27a0daa 100644
--- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
+++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
@@ -224,21 +224,14 @@ static const struct drm_display_mode innolux_p097pfg_mode = {
 static void innolux_panel_write_multi(struct mipi_dsi_multi_context *ctx,
 				      const void *payload, size_t size)
 {
-	struct mipi_dsi_device *dsi = ctx->dsi;
-	struct device *dev = &dsi->dev;
-
 	mipi_dsi_generic_write_multi(ctx, payload, size);
-	if (ctx->accum_err)
-		return;
 
 	/*
 	 * Included by random guessing, because without this
 	 * (or at least, some delay), the panel sometimes
 	 * didn't appear to pick up the command sequence.
 	 */
-	ctx->accum_err = mipi_dsi_dcs_nop(ctx->dsi);
-	if (ctx->accum_err)
-		dev_err(dev, "failed to send DCS nop: %d\n", ctx->accum_err);
+	mipi_dsi_dcs_nop_multi(ctx);
 }
 
 #define innolux_panel_init_cmd_multi(ctx, seq...)                 \

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v2 3/7] drm/panel: boe-tv101wum-nl6: use wrapped MIPI DCS functions
  2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 1/7] drm/panel: lg-sw43408: add missing error handling Dmitry Baryshkov
  2024-05-11 23:00  9% ` [PATCH v2 2/7] drm/mipi-dsi: wrap more functions for streamline handling Dmitry Baryshkov
@ 2024-05-11 23:00  1% ` Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 4/7] drm/panel: ilitek-ili9882t: " Dmitry Baryshkov
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to
simplify driver's init/exit code.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 81 ++++++--------------------
 1 file changed, 19 insertions(+), 62 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index 4b4b125a6c6b..8e839a1749e4 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -448,22 +448,16 @@ static int boe_tv110c9m_init(struct boe_panel *boe)
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x00);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x13);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x03, 0x96, 0x1a, 0x04, 0x04);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(100);
+	mipi_dsi_msleep(&ctx, 100);
 
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x11);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(200);
+	mipi_dsi_msleep(&ctx, 200);
 
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x29);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(100);
+	mipi_dsi_msleep(&ctx, 100);
 
 	return 0;
 };
@@ -893,22 +887,16 @@ static int inx_hj110iz_init(struct boe_panel *boe)
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x01);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x00);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x03, 0xae, 0x1a, 0x04, 0x04);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(100);
+	mipi_dsi_msleep(&ctx, 100);
 
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x11);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(200);
+	mipi_dsi_msleep(&ctx, 200);
 
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x29);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(100);
+	mipi_dsi_msleep(&ctx, 100);
 
 	return 0;
 };
@@ -1207,10 +1195,8 @@ static int boe_init(struct boe_panel *boe)
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x08);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x04);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x68);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(150);
+	mipi_dsi_msleep(&ctx, 150);
 
 	return 0;
 };
@@ -1222,16 +1208,12 @@ static int auo_kd101n80_45na_init(struct boe_panel *boe)
 	msleep(24);
 
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x11);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(120);
+	mipi_dsi_msleep(&ctx, 120);
 
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x29);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(120);
+	mipi_dsi_msleep(&ctx, 120);
 
 	return 0;
 };
@@ -1283,10 +1265,8 @@ static int auo_b101uan08_3_init(struct boe_panel *boe)
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x4f);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0x41);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe7, 0x41);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(150);
+	mipi_dsi_msleep(&ctx, 150);
 
 	return 0;
 };
@@ -1385,16 +1365,12 @@ static int starry_qfh032011_53g_init(struct boe_panel *boe)
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x23);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0x07);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0X11);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(120);
+	mipi_dsi_msleep(&ctx, 120);
 
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0X29);
-	if (ctx.accum_err)
-		return ctx.accum_err;
 
-	msleep(80);
+	mipi_dsi_msleep(&ctx, 80);
 
 	return 0;
 };
@@ -1404,38 +1380,19 @@ static inline struct boe_panel *to_boe_panel(struct drm_panel *panel)
 	return container_of(panel, struct boe_panel, base);
 }
 
-static int boe_panel_enter_sleep_mode(struct boe_panel *boe)
-{
-	struct mipi_dsi_device *dsi = boe->dsi;
-	int ret;
-
-	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
-
-	ret = mipi_dsi_dcs_set_display_off(dsi);
-	if (ret < 0)
-		return ret;
-
-	ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
-	if (ret < 0)
-		return ret;
-
-	return 0;
-}
-
 static int boe_panel_disable(struct drm_panel *panel)
 {
 	struct boe_panel *boe = to_boe_panel(panel);
-	int ret;
+	struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
 
-	ret = boe_panel_enter_sleep_mode(boe);
-	if (ret < 0) {
-		dev_err(panel->dev, "failed to set panel off: %d\n", ret);
-		return ret;
-	}
+	boe->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
 
-	msleep(150);
+	mipi_dsi_dcs_set_display_off_multi(&ctx);
+	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
 
-	return 0;
+	mipi_dsi_msleep(&ctx, 150);
+
+	return ctx.accum_err;
 }
 
 static int boe_panel_unprepare(struct drm_panel *panel)

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v2 2/7] drm/mipi-dsi: wrap more functions for streamline handling
  2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 1/7] drm/panel: lg-sw43408: add missing error handling Dmitry Baryshkov
@ 2024-05-11 23:00  9% ` Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 3/7] drm/panel: boe-tv101wum-nl6: use wrapped MIPI DCS functions Dmitry Baryshkov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Follow the pattern of mipi_dsi_dcs_*_multi() and wrap several existing
MIPI DSI functions to use the context for processing. This simplifies
and streamlines driver code to use simpler code pattern.

Note, msleep function is also wrapped in this way as it is frequently
called inbetween other mipi_dsi_dcs_*() functions.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 210 +++++++++++++++++++++++++++++++++++++++++
 include/drm/drm_mipi_dsi.h     |  21 +++++
 2 files changed, 231 insertions(+)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index d2957cb692d3..8721edd06c06 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -1429,6 +1429,216 @@ int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,
 }
 EXPORT_SYMBOL(mipi_dsi_dcs_get_display_brightness_large);
 
+/**
+ * mipi_dsi_picture_parameter_set_multi() - transmit the DSC PPS to the peripheral
+ * @ctx: Context for multiple DSI transactions
+ * @pps: VESA DSC 1.1 Picture Parameter Set
+ *
+ * Like mipi_dsi_picture_parameter_set() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_picture_parameter_set_multi(struct mipi_dsi_multi_context *ctx,
+				   const struct drm_dsc_picture_parameter_set *pps)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_picture_parameter_set(dsi, pps);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending PPS failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_picture_parameter_set_multi);
+
+/**
+ * mipi_dsi_compression_mode_ext_multi() - enable/disable DSC on the peripheral
+ * @ctx: Context for multiple DSI transactions
+ * @enable: Whether to enable or disable the DSC
+ * @algo: Selected compression algorithm
+ * @pps_selector: Select PPS from the table of pre-stored or uploaded PPS entries
+ *
+ * Like mipi_dsi_compression_mode_ext() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_compression_mode_ext_multi(struct mipi_dsi_multi_context *ctx,
+					 bool enable,
+					 enum mipi_dsi_compression_algo algo,
+					 unsigned int pps_selector)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_compression_mode_ext(dsi, enable, algo, pps_selector);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending COMPRESSION_MODE failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_compression_mode_ext_multi);
+
+/**
+ * mipi_dsi_dcs_nop_multi() - send DCS NOP packet
+ * @ctx: Context for multiple DSI transactions
+ *
+ * Like mipi_dsi_dcs_nop() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_dcs_nop_multi(struct mipi_dsi_multi_context *ctx)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_dcs_nop(dsi);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending DCS NOP failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_nop_multi);
+
+/**
+ * mipi_dsi_dcs_enter_sleep_mode_multi() - send DCS ENTER_SLEEP_MODE  packet
+ * @ctx: Context for multiple DSI transactions
+ *
+ * Like mipi_dsi_dcs_enter_sleep_mode() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_dcs_enter_sleep_mode_multi(struct mipi_dsi_multi_context *ctx)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending DCS ENTER_SLEEP_MODE failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_enter_sleep_mode_multi);
+
+/**
+ * mipi_dsi_dcs_exit_sleep_mode_multi() - send DCS EXIT_SLEEP_MODE packet
+ * @ctx: Context for multiple DSI transactions
+ *
+ * Like mipi_dsi_dcs_exit_sleep_mode() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_dcs_exit_sleep_mode_multi(struct mipi_dsi_multi_context *ctx)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending DCS EXIT_SLEEP_MODE failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_exit_sleep_mode_multi);
+
+/**
+ * mipi_dsi_dcs_set_display_off_multi() - send DCS SET_DISPLAY_OFF packet
+ * @ctx: Context for multiple DSI transactions
+ *
+ * Like mipi_dsi_dcs_set_display_off() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_dcs_set_display_off_multi(struct mipi_dsi_multi_context *ctx)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_dcs_set_display_off(dsi);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending DCS SET_DISPLAY_OFF failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_set_display_off_multi);
+
+/**
+ * mipi_dsi_dcs_set_display_on_multi() - send DCS SET_DISPLAY_ON packet
+ * @ctx: Context for multiple DSI transactions
+ *
+ * Like mipi_dsi_dcs_set_display_on() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_dcs_set_display_on_multi(struct mipi_dsi_multi_context *ctx)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_dcs_set_display_on(dsi);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending DCS SET_DISPLAY_ON failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_set_display_on_multi);
+
+/**
+ * mipi_dsi_dcs_set_tear_on_multi() - send DCS SET_TEAR_ON packet
+ * @ctx: Context for multiple DSI transactions
+ * @mode: the Tearing Effect Output Line mode
+ *
+ * Like mipi_dsi_dcs_set_tear_on() but deals with errors in a way that
+ * makes it convenient to make several calls in a row.
+ */
+void mipi_dsi_dcs_set_tear_on_multi(struct mipi_dsi_multi_context *ctx,
+				    enum mipi_dsi_dcs_tear_mode mode)
+{
+	struct mipi_dsi_device *dsi = ctx->dsi;
+	struct device *dev = &dsi->dev;
+	ssize_t ret;
+
+	if (ctx->accum_err)
+		return;
+
+	ret = mipi_dsi_dcs_set_tear_on(dsi, mode);
+	if (ret < 0) {
+		ctx->accum_err = ret;
+		dev_err(dev, "sending DCS SET_TEAR_ON failed: %d\n",
+			ctx->accum_err);
+	}
+}
+EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_on_multi);
+
 static int mipi_dsi_drv_probe(struct device *dev)
 {
 	struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver);
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 5e9cad541bd6..bd5a0b6d0711 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -275,6 +275,13 @@ int mipi_dsi_compression_mode_ext(struct mipi_dsi_device *dsi, bool enable,
 int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
 				   const struct drm_dsc_picture_parameter_set *pps);
 
+void mipi_dsi_compression_mode_ext_multi(struct mipi_dsi_multi_context *ctx,
+					 bool enable,
+					 enum mipi_dsi_compression_algo algo,
+					 unsigned int pps_selector);
+void mipi_dsi_picture_parameter_set_multi(struct mipi_dsi_multi_context *ctx,
+					  const struct drm_dsc_picture_parameter_set *pps);
+
 ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *payload,
 			       size_t size);
 int mipi_dsi_generic_write_chatty(struct mipi_dsi_device *dsi,
@@ -284,6 +291,12 @@ void mipi_dsi_generic_write_multi(struct mipi_dsi_multi_context *ctx,
 ssize_t mipi_dsi_generic_read(struct mipi_dsi_device *dsi, const void *params,
 			      size_t num_params, void *data, size_t size);
 
+#define mipi_dsi_msleep(ctx, delay)	\
+	do {				\
+		if (!ctx.accum_err)	\
+			msleep(delay);	\
+	} while (0)
+
 /**
  * enum mipi_dsi_dcs_tear_mode - Tearing Effect Output Line mode
  * @MIPI_DSI_DCS_TEAR_MODE_VBLANK: the TE output line consists of V-Blanking
@@ -338,6 +351,14 @@ int mipi_dsi_dcs_set_display_brightness_large(struct mipi_dsi_device *dsi,
 int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,
 					     u16 *brightness);
 
+void mipi_dsi_dcs_nop_multi(struct mipi_dsi_multi_context *ctx);
+void mipi_dsi_dcs_enter_sleep_mode_multi(struct mipi_dsi_multi_context *ctx);
+void mipi_dsi_dcs_exit_sleep_mode_multi(struct mipi_dsi_multi_context *ctx);
+void mipi_dsi_dcs_set_display_off_multi(struct mipi_dsi_multi_context *ctx);
+void mipi_dsi_dcs_set_display_on_multi(struct mipi_dsi_multi_context *ctx);
+void mipi_dsi_dcs_set_tear_on_multi(struct mipi_dsi_multi_context *ctx,
+				    enum mipi_dsi_dcs_tear_mode mode);
+
 /**
  * mipi_dsi_generic_write_seq - transmit data using a generic write packet
  *

-- 
2.39.2


^ permalink raw reply related	[relevance 9%]

* [PATCH v2 6/7] drm/panel: novatek-nt36672e: use wrapped MIPI DCS functions
  2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2024-05-11 23:00  1% ` [PATCH v2 5/7] drm/panel: innolux-p079zca: use mipi_dsi_dcs_nop_multi() Dmitry Baryshkov
@ 2024-05-11 23:00  1% ` Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 7/7] drm/panel: lg-sw43408: use new streamlined MIPI DSI API Dmitry Baryshkov
  6 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to
simplify driver's init/exit code. This also includes passing context to
the init_sequence() function instead of passing the DSI device.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 597 ++++++++++++-------------
 1 file changed, 284 insertions(+), 313 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
index 9ce8df455232..e81a70147259 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
@@ -33,7 +33,7 @@ struct panel_desc {
 	enum mipi_dsi_pixel_format format;
 	unsigned int lanes;
 	const char *panel_name;
-	int (*init_sequence)(struct mipi_dsi_device *dsi);
+	void (*init_sequence)(struct mipi_dsi_multi_context *ctx);
 };
 
 struct nt36672e_panel {
@@ -49,297 +49,293 @@ static inline struct nt36672e_panel *to_nt36672e_panel(struct drm_panel *panel)
 	return container_of(panel, struct nt36672e_panel, panel);
 }
 
-static int nt36672e_1080x2408_60hz_init(struct mipi_dsi_device *dsi)
+static void nt36672e_1080x2408_60hz_init(struct mipi_dsi_multi_context *ctx)
 {
-	struct mipi_dsi_multi_context ctx = { .dsi = dsi };
-
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x10);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x89, 0x28, 0x00, 0x08, 0x00, 0xaa, 0x02,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x10);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb0, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xc0, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xc1, 0x89, 0x28, 0x00, 0x08, 0x00, 0xaa, 0x02,
 				     0x0e, 0x00, 0x2b, 0x00, 0x07, 0x0d, 0xb7, 0x0c, 0xb7);
 
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x1b, 0xa0);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x20);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x01, 0x66);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x40);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x38);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x2f, 0x83);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x69, 0x91);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x95, 0xd1);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x96, 0xd1);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x64);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf3, 0x54);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf4, 0x64);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf5, 0x54);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf6, 0x64);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf7, 0x54);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf8, 0x64);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf9, 0x54);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x24);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x01, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x03, 0x0c);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0x1d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x2f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x09, 0x2e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x0a, 0x2d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x0b, 0x2c);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x11, 0x17);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x12, 0x13);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x13, 0x15);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x15, 0x14);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0x16);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x17, 0x18);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x1d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x2f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x21, 0x2e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x2d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x2c);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x17);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x13);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x15);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x2f, 0x14);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x16);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x31, 0x18);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x32, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0x10);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x1f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x36, 0x1f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x4d, 0x14);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x4e, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x4f, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x71, 0x30);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x79, 0x11);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7a, 0x82);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7b, 0x8f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7d, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x80, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x81, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x82, 0x13);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x84, 0x31);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x85, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x86, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x87, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x90, 0x13);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x92, 0x31);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x93, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x94, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x95, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x9c, 0xf4);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x9d, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa0, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa2, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa3, 0x02);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa4, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa5, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xc0);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x80);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe9, 0x02);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x25);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x22);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0xe4);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x21, 0x40);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x66, 0xd8);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x68, 0x50);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x69, 0x10);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6b, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6d, 0x0d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6e, 0x48);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x72, 0x41);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x73, 0x4a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x74, 0xd0);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x77, 0x62);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x79, 0x7e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7d, 0x03);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7e, 0x15);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7f, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x84, 0x4d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xcf, 0x80);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x80);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x80);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x20);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf0, 0x84);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x26);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x81, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x83, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x84, 0x03);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x85, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x86, 0x03);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x87, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x88, 0x05);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8a, 0x1a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8b, 0x11);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8c, 0x24);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8e, 0x42);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8f, 0x11);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x90, 0x11);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x91, 0x11);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x9a, 0x80);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x9b, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x9c, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x9d, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x9e, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x27);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x01, 0x68);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x81);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x21, 0x6a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x81);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0x94);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6e, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6f, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x70, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x71, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x72, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x75, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x76, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x77, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7d, 0x09);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7e, 0x67);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x80, 0x23);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x82, 0x09);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x83, 0x67);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x88, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x89, 0x10);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa5, 0x10);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa6, 0x23);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xa7, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x40);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x02);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0xd3);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xeb, 0x03);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xec, 0x28);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x2a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x91);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x03, 0x20);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x50);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x0a, 0x70);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x0c, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x40);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x11, 0xe0);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x15, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0xa4);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x1a, 0x78);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x23);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x1e, 0x3e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x3e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x3e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x28, 0xfd);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x12);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0xe1);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x2d, 0x0a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x49);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x96);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0xff);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x40);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x36, 0xde);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x37, 0xf9);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x38, 0x45);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0xd9);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x49);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x4a, 0xf0);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7a, 0x09);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7b, 0x40);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7f, 0xf0);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x83, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x84, 0xa4);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x87, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x88, 0x78);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x89, 0x23);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8b, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8c, 0x7d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8d, 0x7d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x8e, 0x7d);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x20);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xc2, 0x1b, 0xa0);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x20);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x01, 0x66);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x06, 0x40);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x07, 0x38);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x2f, 0x83);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x69, 0x91);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x95, 0xd1);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x96, 0xd1);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf2, 0x64);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf3, 0x54);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf4, 0x64);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf5, 0x54);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf6, 0x64);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf7, 0x54);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf8, 0x64);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf9, 0x54);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x24);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x01, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x03, 0x0c);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x05, 0x1d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x08, 0x2f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x09, 0x2e);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x0a, 0x2d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x0b, 0x2c);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x11, 0x17);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x12, 0x13);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x13, 0x15);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x15, 0x14);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x16, 0x16);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x17, 0x18);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x1b, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x1d, 0x1d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x20, 0x2f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x21, 0x2e);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x22, 0x2d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x23, 0x2c);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x29, 0x17);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x2a, 0x13);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x2b, 0x15);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x2f, 0x14);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x30, 0x16);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x31, 0x18);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x32, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x34, 0x10);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x35, 0x1f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x36, 0x1f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x4d, 0x14);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x4e, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x4f, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x53, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x71, 0x30);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x79, 0x11);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7a, 0x82);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7b, 0x8f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7d, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x80, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x81, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x82, 0x13);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0x31);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x85, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x86, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x87, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x90, 0x13);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x92, 0x31);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x93, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x94, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x95, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x9c, 0xf4);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x9d, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa0, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa2, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa3, 0x02);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa4, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa5, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xc6, 0xc0);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xc9, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xd9, 0x80);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xe9, 0x02);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x25);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x18, 0x22);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x19, 0xe4);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x21, 0x40);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x66, 0xd8);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x68, 0x50);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x69, 0x10);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6b, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6d, 0x0d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6e, 0x48);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x72, 0x41);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x73, 0x4a);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x74, 0xd0);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x77, 0x62);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x79, 0x7e);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7d, 0x03);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7e, 0x15);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7f, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0x4d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xcf, 0x80);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xd6, 0x80);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xd7, 0x80);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xef, 0x20);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0x84);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x26);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x81, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x83, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0x03);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x85, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x86, 0x03);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x87, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x88, 0x05);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8a, 0x1a);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8b, 0x11);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8c, 0x24);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8e, 0x42);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8f, 0x11);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x90, 0x11);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x91, 0x11);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x9a, 0x80);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x9b, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x9c, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x9d, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x9e, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x27);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x01, 0x68);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x20, 0x81);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x21, 0x6a);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x25, 0x81);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x26, 0x94);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6e, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6f, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x70, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x71, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x72, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x75, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x76, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x77, 0x00);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7d, 0x09);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7e, 0x67);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x80, 0x23);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x82, 0x09);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x83, 0x67);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x88, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x89, 0x10);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa5, 0x10);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa6, 0x23);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xa7, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb6, 0x40);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xe5, 0x02);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xe6, 0xd3);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xeb, 0x03);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xec, 0x28);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x2a);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x00, 0x91);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x03, 0x20);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x07, 0x50);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x0a, 0x70);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x0c, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x0d, 0x40);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x0f, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x11, 0xe0);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x15, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x16, 0xa4);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x19, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x1a, 0x78);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x1b, 0x23);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x1d, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x1e, 0x3e);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x1f, 0x3e);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x20, 0x3e);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x28, 0xfd);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x29, 0x12);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x2a, 0xe1);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x2d, 0x0a);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x30, 0x49);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x33, 0x96);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x34, 0xff);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x35, 0x40);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x36, 0xde);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x37, 0xf9);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x38, 0x45);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x39, 0xd9);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x3a, 0x49);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x4a, 0xf0);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7a, 0x09);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7b, 0x40);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7f, 0xf0);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x83, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0xa4);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x87, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x88, 0x78);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x89, 0x23);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8b, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8c, 0x7d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8d, 0x7d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x8e, 0x7d);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x20);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
 				     0x6a, 0x00, 0x89, 0x00, 0x9f, 0x00, 0xb6, 0x00, 0xc8);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
 				     0x7a, 0x01, 0xa9, 0x01, 0xf2, 0x02, 0x2d, 0x02, 0x2e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
 				     0x00, 0x03, 0x1e, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
 				     0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
 				     0x71, 0x00, 0x90, 0x00, 0xa7, 0x00, 0xbf, 0x00, 0xd1);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
 				     0x83, 0x01, 0xb2, 0x01, 0xfa, 0x02, 0x34, 0x02, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
 				     0x03, 0x03, 0x21, 0x03, 0x4d, 0x03, 0x5b, 0x03, 0x6b);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
 				     0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
 				     0x72, 0x00, 0x92, 0x00, 0xa8, 0x00, 0xbf, 0x00, 0xd1);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
 				     0x81, 0x01, 0xaf, 0x01, 0xf5, 0x02, 0x2f, 0x02, 0x31);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
 				     0x01, 0x03, 0x1f, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
 				     0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x21);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x21);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
 				     0x6a, 0x00, 0x89, 0x00, 0x9f, 0x00, 0xb6, 0x00, 0xc8);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
 				     0x7a, 0x01, 0xa9, 0x01, 0xf2, 0x02, 0x2d, 0x02, 0x2e);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
 				     0x00, 0x03, 0x1e, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
 				     0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
 				     0x71, 0x00, 0x90, 0x00, 0xa7, 0x00, 0xbf, 0x00, 0xd1);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
 				     0x83, 0x01, 0xb2, 0x01, 0xfa, 0x02, 0x34, 0x02, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
 				     0x03, 0x03, 0x21, 0x03, 0x4d, 0x03, 0x5b, 0x03, 0x6b);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
 				     0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
 				     0x72, 0x00, 0x92, 0x00, 0xa8, 0x00, 0xbf, 0x00, 0xd1);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
 				     0x81, 0x01, 0xaf, 0x01, 0xf5, 0x02, 0x2f, 0x02, 0x31);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
 				     0x01, 0x03, 0x1f, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
 				     0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x2c);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0x1f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x62, 0x1f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x7e, 0x03);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6a, 0x14);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6b, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6c, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x6d, 0x36);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x54, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x04);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x56, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x58, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x59, 0x0f);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0xf0);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x5a, 0x00);
-
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x10);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x51, 0xff);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x24);
-	mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x01);
-
-	return ctx.accum_err;
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x2c);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x61, 0x1f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x62, 0x1f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x7e, 0x03);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6a, 0x14);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6b, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6c, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x6d, 0x36);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x53, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x54, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x55, 0x04);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x56, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x58, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x59, 0x0f);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0xf0);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x5a, 0x00);
+
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x10);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x51, 0xff);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x53, 0x24);
+	mipi_dsi_dcs_write_seq_multi(ctx, 0x55, 0x01);
 }
 
 static int nt36672e_power_on(struct nt36672e_panel *ctx)
@@ -381,68 +377,46 @@ static int nt36672e_power_off(struct nt36672e_panel *ctx)
 	return ret;
 }
 
-static int nt36672e_on(struct nt36672e_panel *ctx)
+static int nt36672e_on(struct nt36672e_panel *nt36672e)
 {
-	struct mipi_dsi_device *dsi = ctx->dsi;
-	const struct panel_desc *desc = ctx->desc;
-	int ret = 0;
+	struct mipi_dsi_multi_context ctx = { .dsi = nt36672e->dsi };
+	const struct panel_desc *desc = nt36672e->desc;
 
-	dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+	nt36672e->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
 
-	if (desc->init_sequence) {
-		ret = desc->init_sequence(dsi);
-		if (ret < 0) {
-			dev_err(&dsi->dev, "panel init sequence failed: %d\n", ret);
-			return ret;
-		}
-	}
+	if (desc->init_sequence)
+		desc->init_sequence(&ctx);
 
-	ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
-	if (ret < 0) {
-		dev_err(&dsi->dev, "Failed to exit sleep mode: %d\n", ret);
-		return ret;
-	}
-	msleep(120);
+	mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 120);
 
-	ret = mipi_dsi_dcs_set_display_on(dsi);
-	if (ret < 0) {
-		dev_err(&dsi->dev, "Failed to set display on: %d\n", ret);
-		return ret;
-	}
-	msleep(100);
+	mipi_dsi_dcs_set_display_on_multi(&ctx);
 
-	return 0;
+	mipi_dsi_msleep(&ctx, 100);
+
+	return ctx.accum_err;
 }
 
-static int nt36672e_off(struct nt36672e_panel *ctx)
+static int nt36672e_off(struct nt36672e_panel *panel)
 {
-	struct mipi_dsi_device *dsi = ctx->dsi;
-	int ret = 0;
+	struct mipi_dsi_multi_context ctx = { .dsi = panel->dsi };
 
-	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+	panel->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
 
-	ret = mipi_dsi_dcs_set_display_off(dsi);
-	if (ret < 0) {
-		dev_err(&dsi->dev, "Failed to set display off: %d\n", ret);
-		return ret;
-	}
-	msleep(20);
+	mipi_dsi_dcs_set_display_off_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 20);
 
-	ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
-	if (ret < 0) {
-		dev_err(&dsi->dev, "Failed to enter sleep mode: %d\n", ret);
-		return ret;
-	}
-	msleep(60);
+	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 60);
 
-	return 0;
+	return ctx.accum_err;
 }
 
 static int nt36672e_panel_prepare(struct drm_panel *panel)
 {
 	struct nt36672e_panel *ctx = to_nt36672e_panel(panel);
 	struct mipi_dsi_device *dsi = ctx->dsi;
-	int ret = 0;
+	int ret;
 
 	ret = nt36672e_power_on(ctx);
 	if (ret < 0)
@@ -450,7 +424,6 @@ static int nt36672e_panel_prepare(struct drm_panel *panel)
 
 	ret = nt36672e_on(ctx);
 	if (ret < 0) {
-		dev_err(&dsi->dev, "Failed to initialize panel: %d\n", ret);
 		if (nt36672e_power_off(ctx))
 			dev_err(&dsi->dev, "power off failed\n");
 		return ret;
@@ -463,11 +436,9 @@ static int nt36672e_panel_unprepare(struct drm_panel *panel)
 {
 	struct nt36672e_panel *ctx = to_nt36672e_panel(panel);
 	struct mipi_dsi_device *dsi = ctx->dsi;
-	int ret = 0;
+	int ret;
 
-	ret = nt36672e_off(ctx);
-	if (ret < 0)
-		dev_err(&dsi->dev, "Failed to un-initialize panel: %d\n", ret);
+	nt36672e_off(ctx);
 
 	ret = nt36672e_power_off(ctx);
 	if (ret < 0)

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v2 1/7] drm/panel: lg-sw43408: add missing error handling
  2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
@ 2024-05-11 23:00  1% ` Dmitry Baryshkov
  2024-05-11 23:00  9% ` [PATCH v2 2/7] drm/mipi-dsi: wrap more functions for streamline handling Dmitry Baryshkov
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Add missing error handling for the mipi_dsi_ functions that actually
return error code instead of silently ignoring it.

Fixes: 069a6c0e94f9 ("drm: panel: Add LG sw43408 panel driver")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 33 ++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c
index 2b3a73696dce..67a98ac508f8 100644
--- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
+++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
@@ -62,16 +62,25 @@ static int sw43408_program(struct drm_panel *panel)
 {
 	struct sw43408_panel *ctx = to_panel_info(panel);
 	struct drm_dsc_picture_parameter_set pps;
+	int ret;
 
 	mipi_dsi_dcs_write_seq(ctx->link, MIPI_DCS_SET_GAMMA_CURVE, 0x02);
 
-	mipi_dsi_dcs_set_tear_on(ctx->link, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
+	ret = mipi_dsi_dcs_set_tear_on(ctx->link, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
+	if (ret < 0) {
+		dev_err(panel->dev, "Failed to set tearing: %d\n", ret);
+		return ret;
+	}
 
 	mipi_dsi_dcs_write_seq(ctx->link, 0x53, 0x0c, 0x30);
 	mipi_dsi_dcs_write_seq(ctx->link, 0x55, 0x00, 0x70, 0xdf, 0x00, 0x70, 0xdf);
 	mipi_dsi_dcs_write_seq(ctx->link, 0xf7, 0x01, 0x49, 0x0c);
 
-	mipi_dsi_dcs_exit_sleep_mode(ctx->link);
+	ret = mipi_dsi_dcs_exit_sleep_mode(ctx->link);
+	if (ret < 0) {
+		dev_err(panel->dev, "Failed to exit sleep mode: %d\n", ret);
+		return ret;
+	}
 
 	msleep(135);
 
@@ -97,14 +106,22 @@ static int sw43408_program(struct drm_panel *panel)
 	mipi_dsi_dcs_write_seq(ctx->link, 0x55, 0x04, 0x61, 0xdb, 0x04, 0x70, 0xdb);
 	mipi_dsi_dcs_write_seq(ctx->link, 0xb0, 0xca);
 
-	mipi_dsi_dcs_set_display_on(ctx->link);
+	ret = mipi_dsi_dcs_set_display_on(ctx->link);
+	if (ret < 0) {
+		dev_err(panel->dev, "Failed to set display on: %d\n", ret);
+		return ret;
+	}
 
 	msleep(50);
 
 	ctx->link->mode_flags &= ~MIPI_DSI_MODE_LPM;
 
 	drm_dsc_pps_payload_pack(&pps, ctx->link->dsc);
-	mipi_dsi_picture_parameter_set(ctx->link, &pps);
+	ret = mipi_dsi_picture_parameter_set(ctx->link, &pps);
+	if (ret < 0) {
+		dev_err(panel->dev, "Failed to set PPS: %d\n", ret);
+		return ret;
+	}
 
 	ctx->link->mode_flags |= MIPI_DSI_MODE_LPM;
 
@@ -113,8 +130,12 @@ static int sw43408_program(struct drm_panel *panel)
 	 * PPS 1 if pps_identifier is 0
 	 * PPS 2 if pps_identifier is 1
 	 */
-	mipi_dsi_compression_mode_ext(ctx->link, true,
-				      MIPI_DSI_COMPRESSION_DSC, 1);
+	ret = mipi_dsi_compression_mode_ext(ctx->link, true,
+					    MIPI_DSI_COMPRESSION_DSC, 1);
+	if (ret < 0) {
+		dev_err(panel->dev, "Failed to set compression mode: %d\n", ret);
+		return ret;
+	}
 
 	return 0;
 }

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more
@ 2024-05-11 23:00  1% Dmitry Baryshkov
  2024-05-11 23:00  1% ` [PATCH v2 1/7] drm/panel: lg-sw43408: add missing error handling Dmitry Baryshkov
                   ` (6 more replies)
  0 siblings, 7 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 23:00 UTC (permalink / raw)
  To: Douglas Anderson, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Neil Armstrong,
	Jessica Zhang, Sam Ravnborg, Sumit Semwal, Caleb Connolly,
	Marijn Suijten, Vinod Koul
  Cc: Cong Yang, dri-devel, linux-kernel, Dmitry Baryshkov

Follow the example of mipi_dsi_generic_write_multi(),
mipi_dsi_dcs_write_buffer_multi(), mipi_dsi_generic_write_seq_multi()
and mipi_dsi_dcs_write_seq_multi(). Define _multi variants for several
other common MIPI DSI functions and use these functions in the panel
code.

This series also includes a fix for the LG SW43408. If the proposed
approach is declined, the fix will be submitted separately.

Depends:
- https://lore.kernel.org/dri-devel/20240508205222.2251854-1-dianders@chromium.org/
- https://lore.kernel.org/dri-devel/20240511021326.288728-1-yangcong5@huaqin.corp-partner.google.com/

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v2:
- Rebased on top of Cong's series
- Fixed mipi_dsi_compression_mode_ext_multi() docs (Doug)
- Added do/while(0) wrapping to mipi_dsi_msleep() macro (Doug)
- Inlined boe_panel_enter_sleep_mode(), ili9882t_enter_sleep_mode()
  (Doug)
- Dropped error prints around nt36672e_on() and nt36672e_off() (Doug)
- Link to v1: https://lore.kernel.org/r/20240510-dsi-panels-upd-api-v1-0-317c78a0dcc8@linaro.org

---
Dmitry Baryshkov (7):
      drm/panel: lg-sw43408: add missing error handling
      drm/mipi-dsi: wrap more functions for streamline handling
      drm/panel: boe-tv101wum-nl6: use wrapped MIPI DCS functions
      drm/panel: ilitek-ili9882t: use wrapped MIPI DCS functions
      drm/panel: innolux-p079zca: use mipi_dsi_dcs_nop_multi()
      drm/panel: novatek-nt36672e: use wrapped MIPI DCS functions
      drm/panel: lg-sw43408: use new streamlined MIPI DSI API

 drivers/gpu/drm/drm_mipi_dsi.c                 | 210 +++++++++
 drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c |  81 +---
 drivers/gpu/drm/panel/panel-ilitek-ili9882t.c  |  48 +-
 drivers/gpu/drm/panel/panel-innolux-p079zca.c  |   9 +-
 drivers/gpu/drm/panel/panel-lg-sw43408.c       |  74 +--
 drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 597 ++++++++++++-------------
 include/drm/drm_mipi_dsi.h                     |  21 +
 7 files changed, 583 insertions(+), 457 deletions(-)
---
base-commit: 7dd7a948b03724e4c63271bd96830059bc62a1ef
change-id: 20240510-dsi-panels-upd-api-479adb2b0e01

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply	[relevance 1%]

* [PATCH v2 6/6] module: add install target for modules.builtin.ranges
  2024-05-11 22:40  1% [PATCH v2 0/6] Generate address range data for built-in modules Kris Van Hees
                   ` (4 preceding siblings ...)
  2024-05-11 22:40  4% ` [PATCH v2 5/6] kbuild: generate modules.builtin.ranges when linking the kernel Kris Van Hees
@ 2024-05-11 22:40  1% ` Kris Van Hees
  5 siblings, 0 replies; 200+ results
From: Kris Van Hees @ 2024-05-11 22:40 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, linux-modules, linux-trace-kernel
  Cc: Kris Van Hees, Nick Alcock, Steven Rostedt, Luis Chamberlain,
	Masami Hiramatsu, Nick Desaulniers, Jiri Olsa, Elena Zannoni

When CONFIG_BUILTIN_MODULE_RANGES is enabled, the modules.builtin.ranges
file should be installed in the module install location.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
---
Changes since v1:
 - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES
---
 scripts/Makefile.modinst | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index b45586aa1de49..e185dacae892a 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -36,6 +36,11 @@ install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo mod
 $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.objs): $(MODLIB)/%: % FORCE
 	$(call cmd,install)
 
+install-$(CONFIG_BUILTIN_MODULE_RANGES) += $(MODLIB)/modules.builtin.ranges
+
+$(MODLIB)/modules.builtin.ranges: modules.builtin.ranges FORCE
+	$(call cmd,install)
+
 endif
 
 modules := $(call read-file, $(MODORDER))
-- 
2.43.0


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH 3/5] block/bdev: lift restrictions on supported blocksize
  @ 2024-05-11 22:57  1%     ` Luis Chamberlain
  0 siblings, 0 replies; 200+ results
From: Luis Chamberlain @ 2024-05-11 22:57 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: hare, Andrew Morton, Pankaj Raghav, linux-nvme, linux-block,
	Hannes Reinecke

On Fri, May 10, 2024 at 11:25:59PM +0100, Matthew Wilcox wrote:
> Not all architectures support THP yet

I noted to Hannes the existing page cache limit, should we have a helper
which also then uses CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE to fallback
to PAGE_SIZE otherwise ?

 Luis

^ permalink raw reply	[relevance 1%]

* [mst-vhost:vhost 54/54] drivers/vdpa/octeon_ep/octep_vdpa_main.c:538:25: error: implicit declaration of function 'readq'; did you mean 'readl'?
@ 2024-05-11 22:55  1% kernel test robot
  0 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 22:55 UTC (permalink / raw)
  To: Srujana Challa
  Cc: oe-kbuild-all, kvm, virtualization, netdev, Michael S. Tsirkin,
	Vamsi Attunuru, Shijith Thotton, Nithin Dabilpuram

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head:   0a0b17725dd921ed0364cd217a100ed0ed85c8c1
commit: 0a0b17725dd921ed0364cd217a100ed0ed85c8c1 [54/54] virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20240512/202405120615.TTwouGSU-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120615.TTwouGSU-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120615.TTwouGSU-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   drivers/vdpa/octeon_ep/octep_vdpa_main.c: In function 'get_device_ready_status':
>> drivers/vdpa/octeon_ep/octep_vdpa_main.c:538:25: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
     538 |         u64 signature = readq(addr + OCTEP_VF_MBOX_DATA(0));
         |                         ^~~~~
         |                         readl
>> drivers/vdpa/octeon_ep/octep_vdpa_main.c:541:17: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
     541 |                 writeq(0, addr + OCTEP_VF_MBOX_DATA(0));
         |                 ^~~~~~
         |                 writel
   cc1: some warnings being treated as errors
--
   In file included from include/linux/device.h:15,
                    from include/linux/pci.h:37,
                    from drivers/vdpa/octeon_ep/octep_vdpa.h:7,
                    from drivers/vdpa/octeon_ep/octep_vdpa_hw.c:6:
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c: In function 'octep_hw_caps_read':
>> drivers/vdpa/octeon_ep/octep_vdpa_hw.c:478:60: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     478 |         dev_info(dev, "common cfg mapped at: 0x%016llx\n", (u64)oct_hw->common_cfg);
         |                                                            ^
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:478:9: note: in expansion of macro 'dev_info'
     478 |         dev_info(dev, "common cfg mapped at: 0x%016llx\n", (u64)oct_hw->common_cfg);
         |         ^~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:479:60: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     479 |         dev_info(dev, "device cfg mapped at: 0x%016llx\n", (u64)oct_hw->dev_cfg);
         |                                                            ^
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:479:9: note: in expansion of macro 'dev_info'
     479 |         dev_info(dev, "device cfg mapped at: 0x%016llx\n", (u64)oct_hw->dev_cfg);
         |         ^~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:480:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     480 |         dev_info(dev, "isr cfg mapped at: 0x%016llx\n", (u64)oct_hw->isr);
         |                                                         ^
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:480:9: note: in expansion of macro 'dev_info'
     480 |         dev_info(dev, "isr cfg mapped at: 0x%016llx\n", (u64)oct_hw->isr);
         |         ^~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:482:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     482 |                  (u64)oct_hw->notify_base, oct_hw->notify_off_multiplier);
         |                  ^
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:481:9: note: in expansion of macro 'dev_info'
     481 |         dev_info(dev, "notify base: 0x%016llx, notify off multiplier: %u\n",
         |         ^~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:514:54: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     514 |         dev_info(dev, "mbox mapped at: 0x%016llx\n", (u64)mbox);
         |                                                      ^
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/vdpa/octeon_ep/octep_vdpa_hw.c:514:9: note: in expansion of macro 'dev_info'
     514 |         dev_info(dev, "mbox mapped at: 0x%016llx\n", (u64)mbox);
         |         ^~~~~~~~


vim +538 drivers/vdpa/octeon_ep/octep_vdpa_main.c

   535	
   536	static bool get_device_ready_status(u8 __iomem *addr)
   537	{
 > 538		u64 signature = readq(addr + OCTEP_VF_MBOX_DATA(0));
   539	
   540		if (signature == OCTEP_DEV_READY_SIGNATURE) {
 > 541			writeq(0, addr + OCTEP_VF_MBOX_DATA(0));
   542			return true;
   543		}
   544	
   545		return false;
   546	}
   547	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* Re: [PATCH 3/5] block/bdev: lift restrictions on supported blocksize
    @ 2024-05-11 22:54  1%   ` Luis Chamberlain
  1 sibling, 0 replies; 200+ results
From: Luis Chamberlain @ 2024-05-11 22:54 UTC (permalink / raw)
  To: hare
  Cc: Andrew Morton, Matthew Wilcox, Pankaj Raghav, linux-nvme,
	linux-block, Hannes Reinecke

On Fri, May 10, 2024 at 12:29:04PM +0200, hare@kernel.org wrote:
> From: Hannes Reinecke <hare@suse.de>
> 
> We now can support blocksizes larger than PAGE_SIZE, so lift
> the restriction.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  block/bdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/block/bdev.c b/block/bdev.c
> index b8e32d933a63..d37aa51b99ed 100644
> --- a/block/bdev.c
> +++ b/block/bdev.c
> @@ -146,8 +146,8 @@ static void set_init_blocksize(struct block_device *bdev)
>  
>  int set_blocksize(struct block_device *bdev, int size)
>  {
> -	/* Size must be a power of two, and between 512 and PAGE_SIZE */
> -	if (size > PAGE_SIZE || size < 512 || !is_power_of_2(size))
> +	/* Size must be a power of two, and larger than 512 */
> +	if (size < 512 || !is_power_of_2(size))

That needs to just be replaced with:

1 << (PAGE_SHIFT + MAX_PAGECACHE_ORDER)

We're not magically shooting to the sky all of a sudden. The large folio
world still has a limit. While that's 2 MiB today, yes, we can go higher
later, but even then, we still have a cap.

  Luis

^ permalink raw reply	[relevance 1%]

* [merged mm-nonmm-stable] fs-proc-fix-softlockup-in-__read_vmcore.patch removed from -mm tree
@ 2024-05-11 22:52  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:52 UTC (permalink / raw)
  To: mm-commits, vgoyal, stable, dyoung, bhe, riel, akpm


The quilt patch titled
     Subject: fs/proc: fix softlockup in __read_vmcore
has been removed from the -mm tree.  Its filename was
     fs-proc-fix-softlockup-in-__read_vmcore.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Rik van Riel <riel@surriel.com>
Subject: fs/proc: fix softlockup in __read_vmcore
Date: Tue, 7 May 2024 09:18:58 -0400

While taking a kernel core dump with makedumpfile on a larger system,
softlockup messages often appear.

While softlockup warnings can be harmless, they can also interfere with
things like RCU freeing memory, which can be problematic when the kdump
kexec image is configured with as little memory as possible.

Avoid the softlockup, and give things like work items and RCU a chance to
do their thing during __read_vmcore by adding a cond_resched.

Link: https://lkml.kernel.org/r/20240507091858.36ff767f@imladris.surriel.com
Signed-off-by: Rik van Riel <riel@surriel.com>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/proc/vmcore.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/proc/vmcore.c~fs-proc-fix-softlockup-in-__read_vmcore
+++ a/fs/proc/vmcore.c
@@ -383,6 +383,8 @@ static ssize_t __read_vmcore(struct iov_
 		/* leave now if filled buffer already */
 		if (!iov_iter_count(iter))
 			return acc;
+
+		cond_resched();
 	}
 
 	list_for_each_entry(m, &vmcore_list, list) {
_

Patches currently in -mm which might be from riel@surriel.com are



^ permalink raw reply	[relevance 1%]

* [merged mm-nonmm-stable] nilfs2-convert-bug_on-in-nilfs_finish_roll_forward-to-warn_on.patch removed from -mm tree
@ 2024-05-11 22:52  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:52 UTC (permalink / raw)
  To: mm-commits, konishi.ryusuke, akpm


The quilt patch titled
     Subject: nilfs2: convert BUG_ON() in nilfs_finish_roll_forward() to WARN_ON()
has been removed from the -mm tree.  Its filename was
     nilfs2-convert-bug_on-in-nilfs_finish_roll_forward-to-warn_on.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Subject: nilfs2: convert BUG_ON() in nilfs_finish_roll_forward() to WARN_ON()
Date: Thu, 9 May 2024 07:14:29 +0900

The BUG_ON check performed on the return value of __getblk() in
nilfs_finish_roll_forward() assumes that a buffer that has been
successfully read once is retrieved with the same parameters and does not
fail (__getblk() does not return an error due to memory allocation
failure).  Also, nilfs_finish_roll_forward() is called at most once during
mount.

Taking these into consideration, rewrite the check to use WARN_ON() to
avoid using BUG_ON().

Link: https://lkml.kernel.org/r/20240508221429.7559-1-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/nilfs2/recovery.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/fs/nilfs2/recovery.c~nilfs2-convert-bug_on-in-nilfs_finish_roll_forward-to-warn_on
+++ a/fs/nilfs2/recovery.c
@@ -699,7 +699,9 @@ static void nilfs_finish_roll_forward(st
 		return;
 
 	bh = __getblk(nilfs->ns_bdev, ri->ri_lsegs_start, nilfs->ns_blocksize);
-	BUG_ON(!bh);
+	if (WARN_ON(!bh))
+		return;  /* should never happen */
+
 	memset(bh->b_data, 0, bh->b_size);
 	set_buffer_dirty(bh);
 	err = sync_dirty_buffer(bh);
_

Patches currently in -mm which might be from konishi.ryusuke@gmail.com are



^ permalink raw reply	[relevance 1%]

* [merged mm-nonmm-stable] scripts-checkpatch-check-unused-parameters-for-function-like-macro.patch removed from -mm tree
@ 2024-05-11 22:52  6% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:52 UTC (permalink / raw)
  To: mm-commits, v-songbaohua, sfr, quic_jjohnson, lukas.bulwahn,
	linux, joe, jcmvbkbc, herbert, dwaipayanray1, corbet, chris,
	chenhuacai, charlemagnelasse, broonie, apw, mac.xxn, akpm


The quilt patch titled
     Subject: scripts: checkpatch: check unused parameters for function-like macro
has been removed from the -mm tree.  Its filename was
     scripts-checkpatch-check-unused-parameters-for-function-like-macro.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Xining Xu <mac.xxn@outlook.com>
Subject: scripts: checkpatch: check unused parameters for function-like macro
Date: Tue, 7 May 2024 15:27:57 +1200

If function-like macros do not utilize a parameter, it might result in a
build warning.  In our coding style guidelines, we advocate for utilizing
static inline functions to replace such macros.  This patch verifies
compliance with the new rule.

For a macro such as the one below,

 #define test(a) do { } while (0)

The test result is as follows.

 WARNING: Argument 'a' is not used in function-like macro
 #21: FILE: mm/init-mm.c:20:
 +#define test(a) do { } while (0)

 total: 0 errors, 1 warnings, 8 lines checked

Link: https://lkml.kernel.org/r/20240507032757.146386-3-21cnbao@gmail.com
Signed-off-by: Xining Xu <mac.xxn@outlook.com>
Tested-by: Barry Song <v-songbaohua@oppo.com>
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Acked-by: Joe Perches <joe@perches.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Huacai Chen <chenhuacai@loongson.cn>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mark Brown <broonie@kernel.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: Charlemagne Lasse <charlemagnelasse@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/dev-tools/checkpatch.rst |   14 ++++++++++++++
 scripts/checkpatch.pl                  |    6 ++++++
 2 files changed, 20 insertions(+)

--- a/Documentation/dev-tools/checkpatch.rst~scripts-checkpatch-check-unused-parameters-for-function-like-macro
+++ a/Documentation/dev-tools/checkpatch.rst
@@ -906,6 +906,20 @@ Macros, Attributes and Symbols
 
     See: https://lore.kernel.org/lkml/1399671106.2912.21.camel@joe-AO725/
 
+  **MACRO_ARG_UNUSED**
+    If function-like macros do not utilize a parameter, it might result
+    in a build warning. We advocate for utilizing static inline functions
+    to replace such macros.
+    For example, for a macro such as the one below::
+
+      #define test(a) do { } while (0)
+
+    there would be a warning like below::
+
+      WARNING: Argument 'a' is not used in function-like macro.
+
+    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#macros-enums-and-rtl
+
   **SINGLE_STATEMENT_DO_WHILE_MACRO**
     For the multi-statement macros, it is necessary to use the do-while
     loop to avoid unpredictable code paths. The do-while loop helps to
--- a/scripts/checkpatch.pl~scripts-checkpatch-check-unused-parameters-for-function-like-macro
+++ a/scripts/checkpatch.pl
@@ -6040,6 +6040,12 @@ sub process {
 					CHK("MACRO_ARG_PRECEDENCE",
 					    "Macro argument '$arg' may be better as '($arg)' to avoid precedence issues\n" . "$herectx");
 				}
+
+# check if this is an unused argument
+				if ($define_stmt !~ /\b$arg\b/) {
+					WARN("MACRO_ARG_UNUSED",
+					     "Argument '$arg' is not used in function-like macro\n" . "$herectx");
+				}
 			}
 
 # check for macros with flow control, but without ## concatenation
_

Patches currently in -mm which might be from mac.xxn@outlook.com are



^ permalink raw reply	[relevance 6%]

* [merged mm-nonmm-stable] documentation-coding-style-ask-function-like-macros-to-evaluate-parameters.patch removed from -mm tree
@ 2024-05-11 22:52  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:52 UTC (permalink / raw)
  To: mm-commits, sfr, quic_jjohnson, mac.xxn, lukas.bulwahn, linux,
	joe, jcmvbkbc, herbert, dwaipayanray1, corbet, chris, chenhuacai,
	charlemagnelasse, broonie, apw, v-songbaohua, akpm


The quilt patch titled
     Subject: Documentation: coding-style: ask function-like macros to evaluate parameters
has been removed from the -mm tree.  Its filename was
     documentation-coding-style-ask-function-like-macros-to-evaluate-parameters.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Barry Song <v-songbaohua@oppo.com>
Subject: Documentation: coding-style: ask function-like macros to evaluate parameters
Date: Tue, 7 May 2024 15:27:56 +1200

Patch series "codingstyle: avoid unused parameters for a function-like
macro", v7.

A function-like macro could result in build warnings such as "unused
variable." This patchset updates the guidance to recommend always using a
static inline function instead and also provides checkpatch support for
this new rule.


This patch (of 2):

Recent commit 77292bb8ca69c80 ("crypto: scomp - remove memcpy if
sg_nents is 1 and pages are lowmem") leads to warnings on xtensa
and loongarch,
   In file included from crypto/scompress.c:12:
   include/crypto/scatterwalk.h: In function 'scatterwalk_pagedone':
   include/crypto/scatterwalk.h:76:30: warning: variable 'page' set but not used [-Wunused-but-set-variable]
      76 |                 struct page *page;
         |                              ^~~~
   crypto/scompress.c: In function 'scomp_acomp_comp_decomp':
>> crypto/scompress.c:174:38: warning: unused variable 'dst_page' [-Wunused-variable]
     174 |                         struct page *dst_page = sg_page(req->dst);
         |

The reason is that flush_dcache_page() is implemented as a noop
macro on these platforms as below,

 #define flush_dcache_page(page) do { } while (0)

The driver code, for itself, seems be quite innocent and placing
maybe_unused seems pointless,

 struct page *dst_page = sg_page(req->dst);

 for (i = 0; i < nr_pages; i++)
 	flush_dcache_page(dst_page + i);

And it should be independent of architectural implementation
differences.

Let's provide guidance on coding style for requesting parameter
evaluation or proposing the migration to a static inline
function.

Link: https://lkml.kernel.org/r/20240507032757.146386-1-21cnbao@gmail.com
Link: https://lkml.kernel.org/r/20240507032757.146386-2-21cnbao@gmail.com
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Suggested-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Acked-by: Joe Perches <joe@perches.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Huacai Chen <chenhuacai@loongson.cn>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Xining Xu <mac.xxn@outlook.com>
Cc: Charlemagne Lasse <charlemagnelasse@gmail.com>
Cc: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/process/coding-style.rst |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

--- a/Documentation/process/coding-style.rst~documentation-coding-style-ask-function-like-macros-to-evaluate-parameters
+++ a/Documentation/process/coding-style.rst
@@ -827,6 +827,29 @@ Macros with multiple statements should b
 				do_this(b, c);		\
 		} while (0)
 
+Function-like macros with unused parameters should be replaced by static
+inline functions to avoid the issue of unused variables:
+
+.. code-block:: c
+
+	static inline void fun(struct foo *foo)
+	{
+	}
+
+Due to historical practices, many files still employ the "cast to (void)"
+approach to evaluate parameters. However, this method is not advisable.
+Inline functions address the issue of "expression with side effects
+evaluated more than once", circumvent unused-variable problems, and
+are generally better documented than macros for some reason.
+
+.. code-block:: c
+
+	/*
+	 * Avoid doing this whenever possible and instead opt for static
+	 * inline functions
+	 */
+	#define macrofun(foo) do { (void) (foo); } while (0)
+
 Things to avoid when using macros:
 
 1) macros that affect control flow:
_

Patches currently in -mm which might be from v-songbaohua@oppo.com are



^ permalink raw reply	[relevance 1%]

* [merged mm-nonmm-stable] nilfs2-use-__field_struct-for-a-bitwise-field.patch removed from -mm tree
@ 2024-05-11 22:52 14% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:52 UTC (permalink / raw)
  To: mm-commits, torvalds, lkp, linux, konishi.ryusuke, bvanassche, akpm


The quilt patch titled
     Subject: nilfs2: use __field_struct() for a bitwise field
has been removed from the -mm tree.  Its filename was
     nilfs2-use-__field_struct-for-a-bitwise-field.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Bart Van Assche <bvanassche@acm.org>
Subject: nilfs2: use __field_struct() for a bitwise field
Date: Tue, 7 May 2024 23:24:54 +0900

As one can see in include/trace/stages/stage4_event_fields.h, the
implementation of __field() uses the is_signed_type() macro.  As one can
see in commit dcf8e5633e2e ("tracing: Define the is_signed_type() macro
once"), there has been an attempt to not make is_signed_type() trigger
sparse warnings for bitwise types.

Despite that change, sparse complains when passing a bitwise type to
is_signed_type().  The reason is that in its definition below, an
inequality comparison will be made against bitwise types, which are random
collections of bits (the casts to bitwise types themselves are
semantically valid and not problematic):

 #define is_signed_type(type) (((type)(-1)) < (__force type)1)

So, as a workaround, follow the example of <trace/events/initcall.h> and
suppress the following sparse warnings by changing __field() into
__field_struct() that doesn't use is_signed_type():

 fs/nilfs2/segment.c: note: in included file (through
   include/trace/trace_events.h, include/trace/define_trace.h,
   include/trace/events/nilfs2.h):
 ./include/trace/events/nilfs2.h:191:1: warning: cast to restricted
   blk_opf_t
 ./include/trace/events/nilfs2.h:191:1: warning: restricted blk_opf_t
   degrades to integer
 ./include/trace/events/nilfs2.h:191:1: warning: restricted blk_opf_t
   degrades to integer

[konishi.ryusuke: describe the reason for the warnings per Linus's explanation]
  Link: https://lkml.kernel.org/r/20240507222041.4876-1-konishi.ryusuke@gmail.com
Link: https://lkml.kernel.org/r/20240507142454.3344-1-konishi.ryusuke@gmail.com
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401092241.I4mm9OWl-lkp@intel.com/
Reported-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Closes: https://lore.kernel.org/all/20240430080019.4242-2-konishi.ryusuke@gmail.com/
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/trace/events/nilfs2.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/include/trace/events/nilfs2.h~nilfs2-use-__field_struct-for-a-bitwise-field
+++ a/include/trace/events/nilfs2.h
@@ -200,7 +200,11 @@ TRACE_EVENT(nilfs2_mdt_submit_block,
 		    __field(struct inode *, inode)
 		    __field(unsigned long, ino)
 		    __field(unsigned long, blkoff)
-		    __field(enum req_op, mode)
+		    /*
+		     * Use field_struct() to avoid is_signed_type() on the
+		     * bitwise type enum req_op.
+		     */
+		    __field_struct(enum req_op, mode)
 	    ),
 
 	    TP_fast_assign(
_

Patches currently in -mm which might be from bvanassche@acm.org are



^ permalink raw reply	[relevance 14%]

* [to-be-updated] selftests-mqueue-fix-5-warnings-about-signed-unsigned-mismatches.patch removed from -mm tree
@ 2024-05-11 22:47  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:47 UTC (permalink / raw)
  To: mm-commits, usama.anjum, sj, shuah, ryan.roberts, kernel, david,
	jhubbard, akpm


The quilt patch titled
     Subject: selftests/mqueue: fix 5 warnings about signed/unsigned mismatches
has been removed from the -mm tree.  Its filename was
     selftests-mqueue-fix-5-warnings-about-signed-unsigned-mismatches.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: John Hubbard <jhubbard@nvidia.com>
Subject: selftests/mqueue: fix 5 warnings about signed/unsigned mismatches
Date: Sun, 5 May 2024 15:13:59 -0700

When building with clang, via:

    make LLVM=1 -C tools/testing/selftest

...clang warns about several cases of using a signed integer for the
priority argument to mq_receive(3), which expects an unsigned int.

Fix this by declaring the type as unsigned int in all cases.

Link: https://lkml.kernel.org/r/20240505221359.65258-1-jhubbard@nvidia.com
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Valentin Obst <kernel@valentinobst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mqueue/mq_perf_tests.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/tools/testing/selftests/mqueue/mq_perf_tests.c~selftests-mqueue-fix-5-warnings-about-signed-unsigned-mismatches
+++ a/tools/testing/selftests/mqueue/mq_perf_tests.c
@@ -323,7 +323,8 @@ void *fake_cont_thread(void *arg)
 void *cont_thread(void *arg)
 {
 	char buff[MSG_SIZE];
-	int i, priority;
+	int i;
+	unsigned int priority;
 
 	for (i = 0; i < num_cpus_to_pin; i++)
 		if (cpu_threads[i] == pthread_self())
@@ -425,7 +426,8 @@ struct test test2[] = {
 void *perf_test_thread(void *arg)
 {
 	char buff[MSG_SIZE];
-	int prio_out, prio_in;
+	int prio_out;
+	unsigned int prio_in;
 	int i;
 	clockid_t clock;
 	pthread_t *t;
_

Patches currently in -mm which might be from jhubbard@nvidia.com are



^ permalink raw reply	[relevance 1%]

* [syzbot] [bcachefs?] INFO: task hung in bch2_fs_read_only_work
@ 2024-05-11 22:46  1% syzbot
  0 siblings, 0 replies; 200+ results
From: syzbot @ 2024-05-11 22:46 UTC (permalink / raw)
  To: bfoster, kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    cf87f46fd34d Merge tag 'drm-fixes-2024-05-11' of https://g..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14c8766c980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=6d14c12b661fb43
dashboard link: https://syzkaller.appspot.com/bug?extid=8996d8f176cf946ef641
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1aa5ad92dfce/disk-cf87f46f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/67c336f7c1c7/vmlinux-cf87f46f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/bb5b717bd2b8/bzImage-cf87f46f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8996d8f176cf946ef641@syzkaller.appspotmail.com

INFO: task kworker/0:5:19779 blocked for more than 143 seconds.
      Not tainted 6.9.0-rc7-syzkaller-00183-gcf87f46fd34d #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:5     state:D stack:28464 pid:19779 tgid:19779 ppid:2      flags:0x00004000
Workqueue: events_long bch2_fs_read_only_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5409 [inline]
 __schedule+0x17e8/0x4a50 kernel/sched/core.c:6746
 __schedule_loop kernel/sched/core.c:6823 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6838
 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6895
 rwsem_down_write_slowpath+0xeeb/0x13b0 kernel/locking/rwsem.c:1178
 __down_write_common+0x1af/0x200 kernel/locking/rwsem.c:1306
 bch2_fs_read_only_work+0x25/0x40 fs/bcachefs/super.c:393
 process_one_work kernel/workqueue.c:3267 [inline]
 process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3348
 worker_thread+0x86d/0xd70 kernel/workqueue.c:3429
 kthread+0x2f2/0x390 kernel/kthread.c:388
 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/29:
 #0: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
 #0: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
 #0: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6614
2 locks held by kworker/u8:6/1095:
2 locks held by getty/4840:
 #0: ffff88802cc100a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b5/0x1e10 drivers/tty/n_tty.c:2201
1 lock held by syz-fuzzer/5098:
5 locks held by syz-executor.4/19737:
3 locks held by kworker/0:5/19779:
 #0: ffff888015079148 ((wq_completion)events_long){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3242 [inline]
 #0: ffff888015079148 ((wq_completion)events_long){+.+.}-{0:0}, at: process_scheduled_works+0x8e0/0x17c0 kernel/workqueue.c:3348
 #1: ffffc9000cf67d00 ((work_completion)(&c->read_only_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3243 [inline]
 #1: ffffc9000cf67d00 ((work_completion)(&c->read_only_work)){+.+.}-{0:0}, at: process_scheduled_works+0x91b/0x17c0 kernel/workqueue.c:3348
 #2: ffff88803de00278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_read_only_work+0x25/0x40 fs/bcachefs/super.c:393
6 locks held by kworker/1:15/19807:
 #0: ffff88801beda548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3242 [inline]
 #0: ffff88801beda548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x8e0/0x17c0 kernel/workqueue.c:3348
 #1: ffffc9000dfb7d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3243 [inline]
 #1: ffffc9000dfb7d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x91b/0x17c0 kernel/workqueue.c:3348
 #2: ffff88802374b190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:990 [inline]
 #2: ffff88802374b190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1fe/0x5150 drivers/usb/core/hub.c:5850
 #3: ffff88802374e518 (&port_dev->status_lock){+.+.}-{3:3}, at: usb_lock_port drivers/usb/core/hub.c:3207 [inline]
 #3: ffff88802374e518 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect drivers/usb/core/hub.c:5419 [inline]
 #3: ffff88802374e518 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect_change drivers/usb/core/hub.c:5662 [inline]
 #3: ffff88802374e518 (&port_dev->status_lock){+.+.}-{3:3}, at: port_event drivers/usb/core/hub.c:5822 [inline]
 #3: ffff88802374e518 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_event+0x25b6/0x5150 drivers/usb/core/hub.c:5904
 #4: ffff888022fb6568 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_connect drivers/usb/core/hub.c:5420 [inline]
 #4: ffff888022fb6568 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_connect_change drivers/usb/core/hub.c:5662 [inline]
 #4: ffff888022fb6568 (hcd->address0_mutex){+.+.}-{3:3}, at: port_event drivers/usb/core/hub.c:5822 [inline]
 #4: ffff888022fb6568 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_event+0x25f4/0x5150 drivers/usb/core/hub.c:5904
 #5: ffffffff8ef0a6b0 (ehci_cf_port_reset_rwsem){.+.+}-{3:3}, at: hub_port_reset+0x1f8/0x1b30 drivers/usb/core/hub.c:3022
2 locks held by syz-executor.3/21870:
2 locks held by syz-executor.5/21874:
2 locks held by syz-executor.1/21881:

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 29 Comm: khungtaskd Not tainted 6.9.0-rc7-syzkaller-00183-gcf87f46fd34d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:223 [inline]
 watchdog+0xfde/0x1020 kernel/hung_task.c:380
 kthread+0x2f2/0x390 kernel/kthread.c:388
 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 21874 Comm: syz-executor.5 Not tainted 6.9.0-rc7-syzkaller-00183-gcf87f46fd34d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:32 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:67 [inline]
RIP: 0010:arch_local_irq_save arch/x86/include/asm/irqflags.h:103 [inline]
RIP: 0010:lock_release+0x16d/0x9f0 kernel/locking/lockdep.c:5770
Code: eb 03 42 80 3c 3b 00 74 08 4c 89 f7 e8 ac 09 88 00 4c 89 6c 24 50 48 c7 84 24 b0 00 00 00 00 00 00 00 9c 8f 84 24 b0 00 00 00 <42> 80 3c 3b 00 74 08 4c 89 f7 e8 94 08 88 00 48 8b 9c 24 b0 00 00
RSP: 0018:ffffc9000bb0f680 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 1ffff92001761ee6 RCX: ffffffff8172abb0
RDX: 0000000000000000 RSI: ffffffff8c1f8240 RDI: ffffffff8c1f8200
RBP: ffffc9000bb0f7b0 R08: ffffffff8fa8f92f R09: 1ffffffff1f51f25
R10: dffffc0000000000 R11: fffffbfff1f51f26 R12: 1ffff92001761edc
R13: ffffffff81cbece7 R14: ffffc9000bb0f730 R15: dffffc0000000000
FS:  00007f5fc8c356c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fadd80ffe00 CR3: 00000000553c2000 CR4: 0000000000350ef0
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 rcu_lock_release include/linux/rcupdate.h:339 [inline]
 rcu_read_unlock include/linux/rcupdate.h:814 [inline]
 filemap_get_entry+0x457/0x4e0 mm/filemap.c:1834
 shmem_get_folio_gfp+0x2a8/0x1f50 mm/shmem.c:1982
 shmem_get_folio mm/shmem.c:2160 [inline]
 shmem_write_begin+0x170/0x4d0 mm/shmem.c:2744
 generic_perform_write+0x324/0x640 mm/filemap.c:3974
 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2920
 call_write_iter include/linux/fs.h:2110 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0xa86/0xcb0 fs/read_write.c:590
 ksys_write+0x1a0/0x2c0 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5fc7e7caaf
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5fc8c34e80 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000001000000 RCX: 00007f5fc7e7caaf
RDX: 0000000001000000 RSI: 00007f5fbdc00000 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000009855
R10: 0000000000000002 R11: 0000000000000293 R12: 0000000000000004
R13: 00007f5fc8c34f80 R14: 00007f5fc8c34f40 R15: 00007f5fbdc00000
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[relevance 1%]

* Re: Ftrace, KASLR and gdb
  @ 2024-05-11 22:44  1%   ` alexandre.ferrieux
  0 siblings, 0 replies; 200+ results
From: alexandre.ferrieux @ 2024-05-11 22:44 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-trace-users

On 10/05/2024 20:12, Steven Rostedt wrote:
> 

Hi Steven. Honoured to be talking to the creator of my preferred toy !

>> Ftrace is a jewel to dig into the kernel, be it for troubleshooting, perf tuning 
>> or just understanding.
>> But when one needs to disassemble the running kernel (eg to move kprobes around 
>> in a function, in order to understand a given code path), KASLR makes it 
>> impossible for gdb to get useful symbol addresses, even with a debug image.
> 
> Really? Can't you just use a function name plus offset? For instance, I
> do this all the time:

Yes, on the ftrace side, obviously name+offset are sufficient. I use them all 
the time, and am delighted with fetchargs.

The problem is rather, on the gdb side, with a production kernel (not the one 
you've just compiled), on a random machine you have a passing access to. First, 
the kernel itself is compressed (vmlinuz), and in many cases getting the vmlinux 
is a pain. So, what ELF binary do you pass to gdb ?

In my case:

   sym2elf /proc/kallsyms > /tmp/kallsyms.elf
   gdb /tmp/kallsyms.elf /proc/kcore
   (gdb) disass vfs_write
   ...

As an added bonus, I see (a snapshot of) globals:

   (gdb) p *(int *)jiffies
   $1 = 92299928

And also I see ftrace's surgical changes if by accident I disassemble a function 
I currently am sniffing ;-)

    echo "p:kprobe_tpacket_rcv tpacket_rcv+26 skb=%di:x64" >> kprobe_events
    (gdb) disass tcpaket_rcv
    Dump of assembler code for function tpacket_rcv:
      0xffffffffb9d79e10 <+0>:     endbr64
      ...
      0xffffffffb9d79e2a <+26>:    jmp    0xffffffffc1389000 <kprobe_optinsn_page>

Of course the latter only serves my curiosity; but it shows I'm looking at the 
"live" code. It matters in other cases of dynamic code, like static branches.

So, is there currently another method to reach the same effect ?

-Alex
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

^ permalink raw reply	[relevance 1%]

* [PATCH v2 5/6] kbuild: generate modules.builtin.ranges when linking the kernel
  2024-05-11 22:40  1% [PATCH v2 0/6] Generate address range data for built-in modules Kris Van Hees
                   ` (3 preceding siblings ...)
  2024-05-11 22:40  4% ` [PATCH v2 4/6] module: script to generate offset ranges for builtin modules Kris Van Hees
@ 2024-05-11 22:40  4% ` Kris Van Hees
  2024-05-11 22:40  1% ` [PATCH v2 6/6] module: add install target for modules.builtin.ranges Kris Van Hees
  5 siblings, 0 replies; 200+ results
From: Kris Van Hees @ 2024-05-11 22:40 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, linux-modules, linux-trace-kernel
  Cc: Kris Van Hees, Nick Alcock, Steven Rostedt, Luis Chamberlain,
	Masami Hiramatsu, Nick Desaulniers, Jiri Olsa, Elena Zannoni

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
---
Changes since v1:
 - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES
---
 scripts/Makefile.vmlinux | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
index c9f3e03124d7f..54095d72f7fd7 100644
--- a/scripts/Makefile.vmlinux
+++ b/scripts/Makefile.vmlinux
@@ -36,6 +36,23 @@ targets += vmlinux
 vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE
 	+$(call if_changed_dep,link_vmlinux)
 
+# module.builtin.ranges
+# ---------------------------------------------------------------------------
+ifdef CONFIG_BUILTIN_MODULE_RANGES
+__default: modules.builtin.ranges
+
+quiet_cmd_modules_builtin_ranges = GEN     $@
+      cmd_modules_builtin_ranges = \
+	$(srctree)/scripts/generate_builtin_ranges.awk \
+	  $(filter-out FORCE,$+) > $@
+
+vmlinux.map: vmlinux
+
+targets += modules.builtin.ranges
+modules.builtin.ranges: modules.builtin.objs vmlinux.map vmlinux.o.map FORCE
+	$(call if_changed,modules_builtin_ranges)
+endif
+
 # Add FORCE to the prequisites of a target to force it to be always rebuilt.
 # ---------------------------------------------------------------------------
 
-- 
2.43.0


^ permalink raw reply related	[relevance 4%]

* [PATCH v2 4/6] module: script to generate offset ranges for builtin modules
  2024-05-11 22:40  1% [PATCH v2 0/6] Generate address range data for built-in modules Kris Van Hees
                   ` (2 preceding siblings ...)
  2024-05-11 22:40  9% ` [PATCH v2 3/6] kbuild: generate a linker map for vmlinux.o Kris Van Hees
@ 2024-05-11 22:40  4% ` Kris Van Hees
  2024-05-11 22:40  4% ` [PATCH v2 5/6] kbuild: generate modules.builtin.ranges when linking the kernel Kris Van Hees
  2024-05-11 22:40  1% ` [PATCH v2 6/6] module: add install target for modules.builtin.ranges Kris Van Hees
  5 siblings, 0 replies; 200+ results
From: Kris Van Hees @ 2024-05-11 22:40 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, linux-modules, linux-trace-kernel
  Cc: Kris Van Hees, Nick Alcock, Steven Rostedt, Luis Chamberlain,
	Masami Hiramatsu, Nick Desaulniers, Jiri Olsa, Elena Zannoni

The offset range data for builtin modules is generated using:
 - modules.builtin.objs: associates object files with module names
 - vmlinux.map: provides load order of sections and offset of first member
    per section
 - vmlinux.o.map: provides offset of object file content per section

The generated data will look like:

.text 00000000-00000000 = _text
.text 0000baf0-0000cb10 amd_uncore
.text 0009bd10-0009c8e0 iosf_mbi
...
.text 008e6660-008e9630 snd_soc_wcd_mbhc
.text 008e9630-008ea610 snd_soc_wcd9335 snd_soc_wcd934x snd_soc_wcd938x
.text 008ea610-008ea780 snd_soc_wcd9335
...
.data 00000000-00000000 = _sdata
.data 0000f020-0000f680 amd_uncore

For each ELF section, it lists the offset of the first symbol.  This can
be used to determine the base address of the section at runtime.

Next, it lists (in strict ascending order) offset ranges in that section
that cover the symbols of one or more builtin modules.  Multiple ranges
can apply to a single module, and ranges can be shared between modules.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
---
Changes since v1:
 - Updated commit msg (vmlinux.o -> vmlinux.map)
---
 scripts/generate_builtin_ranges.awk | 150 ++++++++++++++++++++++++++++
 1 file changed, 150 insertions(+)
 create mode 100755 scripts/generate_builtin_ranges.awk

diff --git a/scripts/generate_builtin_ranges.awk b/scripts/generate_builtin_ranges.awk
new file mode 100755
index 0000000000000..d5d668c97bd7f
--- /dev/null
+++ b/scripts/generate_builtin_ranges.awk
@@ -0,0 +1,150 @@
+#!/usr/bin/gawk -f
+# SPDX-License-Identifier: GPL-2.0
+
+FNR == 1 {
+	FC++;
+}
+
+# (1) Build a mapping to associate object files with built-in module names.
+#
+# The first file argument is used as input (modules.builtin.objs).
+#
+FC == 1 {
+	sub(/:/, "");
+	mod = $1;
+	sub(/([^/]*\/)+/, "", mod);
+	sub(/\.o$/, "", mod);
+	gsub(/-/, "_", mod);
+
+	if (NF > 1) {
+		for (i = 2; i <= NF; i++) {
+			if ($i in mods)
+				mods[$i] = mods[$i] " " mod;
+			else
+				mods[$i] = mod;
+		}
+	} else
+		mods[$1] = mod;
+
+	next;
+}
+
+# (2) Determine the load address for each section.
+#
+# The second file argument is used as input (vmlinux.map).
+# Since some AWK implementations cannot handle large integers, we strip of the
+# first 4 hex digits from the address.  This is safe because the kernel space
+# is not large enough for addresses to extend into those digits.
+#
+FC == 2 && /^\./ && NF > 2 {
+	if (type)
+		delete sect_addend[type];
+
+	if ($1 ~ /percpu/)
+		next;
+
+	raw_addr = $2;
+	addr_prefix = "^" substr($2, 1, 6);
+	sub(addr_prefix, "0x", $2);
+	base = strtonum($2);
+	type = $1;
+	anchor = 0;
+	sect_base[type] = base;
+
+	next;
+}
+
+!type {
+	next;
+}
+
+# (3) We need to determine the base address of the section so that ranges can
+# be expressed based on offsets from the base address.  This accommodates the
+# kernel sections getting loaded at different addresses than what is recorded
+# in vmlinux.map.
+#
+# At runtime, we will need to determine the base address of each section we are
+# interested in.  We do that by recording the offset of the first symbol in the
+# section.  Once we know the address of this symbol in the running kernel, we
+# can calculate the base address of the section.
+#
+# If possible, we use an explicit anchor symbol (sym = .) listed at the base
+# address (offset 0).
+#
+# If there is no such symbol, we record the first symbol in the section along
+# with its offset.
+#
+# We also determine the offset of the first member in the section in case the
+# final linking inserts some content between the start of the section and the
+# first member.  I.e. in that case, vmlinux.map will list the first member at
+# a non-zero offset whereas vmlinux.o.map will list it at offset 0.  We record
+# the addend so we can apply it when processing vmlinux.o.map (next).
+#
+FC == 2 && !anchor && raw_addr == $1 && $3 == "=" && $4 == "." {
+	anchor = sprintf("%s %08x-%08x = %s", type, 0, 0, $2);
+	sect_anchor[type] = anchor;
+
+	next;
+}
+
+FC == 2 && !anchor && $1 ~ /^0x/ && $2 !~ /^0x/ && NF <= 4 {
+	sub(addr_prefix, "0x", $1);
+	addr = strtonum($1) - base;
+	anchor = sprintf("%s %08x-%08x = %s", type, addr, addr, $2);
+	sect_anchor[type] = anchor;
+
+	next;
+}
+
+FC == 2 && base && /^ \./ && $1 == type && NF == 4 {
+	sub(addr_prefix, "0x", $2);
+	addr = strtonum($2);
+	sect_addend[type] = addr - base;
+
+	if (anchor) {
+		base = 0;
+		type = 0;
+	}
+
+	next;
+}
+
+# (4) Collect offset ranges (relative to the section base address) for built-in
+# modules.
+#
+FC == 3 && /^ \./ && NF == 4 && $3 != "0x0" {
+	type = $1;
+	if (!(type in sect_addend))
+		next;
+
+	sub(addr_prefix, "0x", $2);
+	addr = strtonum($2) + sect_addend[type];
+
+	if ($4 in mods)
+		mod = mods[$4];
+	else
+		mod = "";
+
+	if (mod == mod_name)
+		next;
+
+	if (mod_name) {
+		idx = mod_start + sect_base[type] + sect_addend[type];
+		entries[idx] = sprintf("%s %08x-%08x %s", type, mod_start, addr, mod_name);
+		count[type]++;
+	}
+
+	mod_name = mod;
+	mod_start = addr;
+}
+
+END {
+	for (type in count) {
+		if (type in sect_anchor)
+			entries[sect_base[type]] = sect_anchor[type];
+	}
+
+	n = asorti(entries, indices);
+	for (i = 1; i <= n; i++)
+		print entries[indices[i]];
+}
-- 
2.43.0


^ permalink raw reply related	[relevance 4%]

* [PATCH v2 3/6] kbuild: generate a linker map for vmlinux.o
  2024-05-11 22:40  1% [PATCH v2 0/6] Generate address range data for built-in modules Kris Van Hees
  2024-05-11 22:40  4% ` [PATCH v2 1/6] kbuild: add modules.builtin.objs Kris Van Hees
  2024-05-11 22:40  1% ` [PATCH v2 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option Kris Van Hees
@ 2024-05-11 22:40  9% ` Kris Van Hees
  2024-05-11 22:40  4% ` [PATCH v2 4/6] module: script to generate offset ranges for builtin modules Kris Van Hees
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 200+ results
From: Kris Van Hees @ 2024-05-11 22:40 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, linux-modules, linux-trace-kernel
  Cc: Kris Van Hees, Nick Alcock, Steven Rostedt, Luis Chamberlain,
	Masami Hiramatsu, Nick Desaulniers, Jiri Olsa, Elena Zannoni

When CONFIG_BUILTIN_MODULE_RANGES is set, a linker map for vmlinux.o needs
to be generated.  The generation of offset range data for builtin modules
depends on that linker map to know what offsets in an ELF section belong
to an object file for a particular builtin module.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
---
Changes since v1:
 - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES
---
 scripts/Makefile.vmlinux_o | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o
index 508b3294e2cf1..e4a92838780d5 100644
--- a/scripts/Makefile.vmlinux_o
+++ b/scripts/Makefile.vmlinux_o
@@ -45,9 +45,12 @@ objtool-args = $(vmlinux-objtool-args-y) --link
 # Link of vmlinux.o used for section mismatch analysis
 # ---------------------------------------------------------------------------
 
+vmlinux-o-ld-args-$(CONFIG_BUILTIN_MODULE_RANGES)	+= -Map=$@.map
+
 quiet_cmd_ld_vmlinux.o = LD      $@
       cmd_ld_vmlinux.o = \
 	$(LD) ${KBUILD_LDFLAGS} -r -o $@ \
+	$(vmlinux-o-ld-args-y) \
 	$(addprefix -T , $(initcalls-lds)) \
 	--whole-archive vmlinux.a --no-whole-archive \
 	--start-group $(KBUILD_VMLINUX_LIBS) --end-group \
-- 
2.43.0


^ permalink raw reply related	[relevance 9%]

* [PATCH v2 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option
  2024-05-11 22:40  1% [PATCH v2 0/6] Generate address range data for built-in modules Kris Van Hees
  2024-05-11 22:40  4% ` [PATCH v2 1/6] kbuild: add modules.builtin.objs Kris Van Hees
@ 2024-05-11 22:40  1% ` Kris Van Hees
  2024-05-11 22:40  9% ` [PATCH v2 3/6] kbuild: generate a linker map for vmlinux.o Kris Van Hees
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 200+ results
From: Kris Van Hees @ 2024-05-11 22:40 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, linux-modules, linux-trace-kernel
  Cc: Kris Van Hees, Nick Alcock, Alan Maguire, Steven Rostedt,
	Luis Chamberlain, Masami Hiramatsu, Nick Desaulniers, Jiri Olsa,
	Elena Zannoni

The CONFIG_BUILTIN_MODULE_RANGES option controls whether offset range data
is generated for kernel modules that are built into the kernel image.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
---
Changes since v1:
 - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES
 - Moved the config option to the tracers section
---
 kernel/trace/Kconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 47345bf1d4a9f..839a56e971cc0 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -188,6 +188,23 @@ menuconfig FTRACE
 
 if FTRACE
 
+config BUILTIN_MODULE_RANGES
+	bool "Generate address range information for builtin modules"
+	select VMLINUX_MAP
+	help
+	  When modules are built into the kernel, there will be no module name
+	  associated with its symbols in /proc/kallsyms.  Tracers may want to
+	  identify symbols by module name and symbol name regardless of whether
+	  the module is configured as loadable or not.
+
+	  This option generates modules.builtin.ranges in the build tree with
+	  offset ranges (per ELF section) for the module(s) they belong to.
+	  It also records an anchor symbol to determine the load address of the
+	  section.
+
+	  It is fully compatible with CONFIG_RANDOMIZE_BASE and similar late-
+	  address-modification options.
+
 config BOOTTIME_TRACING
 	bool "Boot-time Tracing support"
 	depends on TRACING
-- 
2.43.0


^ permalink raw reply related	[relevance 1%]

* [PATCH v2 1/6] kbuild: add modules.builtin.objs
  2024-05-11 22:40  1% [PATCH v2 0/6] Generate address range data for built-in modules Kris Van Hees
@ 2024-05-11 22:40  4% ` Kris Van Hees
  2024-05-11 22:40  1% ` [PATCH v2 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option Kris Van Hees
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 200+ results
From: Kris Van Hees @ 2024-05-11 22:40 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, linux-modules, linux-trace-kernel
  Cc: Luis Chamberlain, Nick Alcock, Kris Van Hees, Steven Rostedt,
	Masami Hiramatsu, Nick Desaulniers, Jiri Olsa, Elena Zannoni

From: Luis Chamberlain <mcgrof@kernel.org>

The file modules.builtin names all modules that are built into the
kernel; this is checked by modprobe to not fail when trying to load
something built-in. But for tools which want to see which object files
make up each module, we want to help them with such a mapping as it is
not easy to get this otherwise.

We do this by just extending scripts/Makefile.lib with a new variable
and define to capture all object files included in this module, store it
in a new objs= modinfo stanza, then extract it just before linking into
a new file modules.builtin.objs with a layout roughly modelled on a
makefile:

path/to/module.o: path/to/constituent.o path/to/other-constituent.o

Single-file built-in modules get a line reading

path/to/module.o:

Note that the .modinfo section is discarded at the link stage, so the
kernel is not bloated at all (see include/asm-generic/vmlinux.lds.h).

Orabug: 29891866
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
---
Changes since v1:
 - None
---
 .gitignore                      |  2 +-
 Documentation/dontdiff          |  2 +-
 Documentation/kbuild/kbuild.rst |  5 +++++
 Makefile                        |  8 ++++++--
 include/linux/module.h          |  4 +++-
 scripts/Makefile.lib            |  5 ++++-
 scripts/Makefile.modinst        |  6 +++---
 scripts/Makefile.vmlinux_o      | 15 ++++++++++++++-
 8 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index c59dc60ba62ef..62ede8565a2aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,7 +69,7 @@ modules.order
 /System.map
 /Module.markers
 /modules.builtin
-/modules.builtin.modinfo
+/modules.builtin.*
 /modules.nsdeps
 
 #
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index 3c399f132e2db..75b9655e57914 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -179,7 +179,7 @@ mkutf8data
 modpost
 modules-only.symvers
 modules.builtin
-modules.builtin.modinfo
+modules.builtin.*
 modules.nsdeps
 modules.order
 modversions.h*
diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst
index 9c8d1d046ea56..79e104ffee715 100644
--- a/Documentation/kbuild/kbuild.rst
+++ b/Documentation/kbuild/kbuild.rst
@@ -17,6 +17,11 @@ modules.builtin
 This file lists all modules that are built into the kernel. This is used
 by modprobe to not fail when trying to load something builtin.
 
+modules.builtin.objs
+-----------------------
+This file contains object mapping of modules that are built into the kernel
+to their corresponding object files used to build the module.
+
 modules.builtin.modinfo
 -----------------------
 This file contains modinfo from all modules that are built into the kernel.
diff --git a/Makefile b/Makefile
index d51d411d44a82..cc979f9874f5a 100644
--- a/Makefile
+++ b/Makefile
@@ -1140,7 +1140,11 @@ PHONY += vmlinux_o
 vmlinux_o: vmlinux.a $(KBUILD_VMLINUX_LIBS)
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux_o
 
-vmlinux.o modules.builtin.modinfo modules.builtin: vmlinux_o
+MODULES_BUILTIN := modules.builtin.modinfo
+MODULES_BUILTIN += modules.builtin
+MODULES_BUILTIN += modules.builtin.objs
+
+vmlinux.o $(MODULES_BUILTIN): vmlinux_o
 	@:
 
 PHONY += vmlinux
@@ -1476,7 +1480,7 @@ endif # CONFIG_MODULES
 
 # Directories & files removed with 'make clean'
 CLEAN_FILES += vmlinux.symvers modules-only.symvers \
-	       modules.builtin modules.builtin.modinfo modules.nsdeps \
+	       modules.builtin modules.builtin.* modules.nsdeps \
 	       compile_commands.json .thinlto-cache rust/test \
 	       rust-project.json .vmlinux.objs .vmlinux.export.c
 
diff --git a/include/linux/module.h b/include/linux/module.h
index 1153b0d99a808..cbfff06e00cd6 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -180,7 +180,9 @@ extern void cleanup_module(void);
 #ifdef MODULE
 #define MODULE_FILE
 #else
-#define MODULE_FILE	MODULE_INFO(file, KBUILD_MODFILE);
+#define MODULE_FILE					                      \
+			MODULE_INFO(file, KBUILD_MODFILE);                    \
+			MODULE_INFO(objs, KBUILD_MODOBJS);
 #endif
 
 /*
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 3179747cbd2cc..3b3baa78d4fbd 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -118,6 +118,8 @@ modname-multi = $(sort $(foreach m,$(multi-obj-ym),\
 __modname = $(or $(modname-multi),$(basetarget))
 
 modname = $(subst $(space),:,$(__modname))
+modname-objs = $($(modname)-objs) $($(modname)-y) $($(modname)-Y)
+modname-objs-prefixed = $(sort $(strip $(addprefix $(obj)/, $(modname-objs))))
 modfile = $(addprefix $(obj)/,$(__modname))
 
 # target with $(obj)/ and its suffix stripped
@@ -131,7 +133,8 @@ name-fix = $(call stringify,$(call name-fix-token,$1))
 basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget))
 modname_flags  = -DKBUILD_MODNAME=$(call name-fix,$(modname)) \
 		 -D__KBUILD_MODNAME=kmod_$(call name-fix-token,$(modname))
-modfile_flags  = -DKBUILD_MODFILE=$(call stringify,$(modfile))
+modfile_flags  = -DKBUILD_MODFILE=$(call stringify,$(modfile)) \
+                 -DKBUILD_MODOBJS=$(call stringify,$(modfile).o:$(subst $(space),|,$(modname-objs-prefixed)))
 
 _c_flags       = $(filter-out $(CFLAGS_REMOVE_$(target-stem).o), \
                      $(filter-out $(ccflags-remove-y), \
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index 0afd75472679f..b45586aa1de49 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -30,10 +30,10 @@ $(MODLIB)/modules.order: modules.order FORCE
 quiet_cmd_install_modorder = INSTALL $@
       cmd_install_modorder = sed 's:^\(.*\)\.o$$:kernel/\1.ko:' $< > $@
 
-# Install modules.builtin(.modinfo) even when CONFIG_MODULES is disabled.
-install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo)
+# Install modules.builtin(.modinfo,.objs) even when CONFIG_MODULES is disabled.
+install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.objs)
 
-$(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo): $(MODLIB)/%: % FORCE
+$(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.objs): $(MODLIB)/%: % FORCE
 	$(call cmd,install)
 
 endif
diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o
index 6de297916ce68..508b3294e2cf1 100644
--- a/scripts/Makefile.vmlinux_o
+++ b/scripts/Makefile.vmlinux_o
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 PHONY := __default
-__default: vmlinux.o modules.builtin.modinfo modules.builtin
+__default: vmlinux.o modules.builtin.modinfo modules.builtin modules.builtin.objs
 
 include include/config/auto.conf
 include $(srctree)/scripts/Kbuild.include
@@ -87,6 +87,19 @@ targets += modules.builtin
 modules.builtin: modules.builtin.modinfo FORCE
 	$(call if_changed,modules_builtin)
 
+# module.builtin.objs
+# ---------------------------------------------------------------------------
+quiet_cmd_modules_builtin_objs = GEN     $@
+      cmd_modules_builtin_objs = \
+	tr '\0' '\n' < $< | \
+	sed -n 's/^[[:alnum:]:_]*\.objs=//p' | \
+	tr ' ' '\n' | uniq | sed -e 's|:|: |' -e 's:|: :g' | \
+	tr -s ' ' > $@
+
+targets += modules.builtin.objs
+modules.builtin.objs: modules.builtin.modinfo FORCE
+	$(call if_changed,modules_builtin_objs)
+
 # Add FORCE to the prequisites of a target to force it to be always rebuilt.
 # ---------------------------------------------------------------------------
 
-- 
2.43.0


^ permalink raw reply related	[relevance 4%]

* [merged mm-stable] selftests-mm-hugetlb_madv_vs_map-avoid-test-skipping-by-querying-hugepage-size-at-runtime.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, usama.anjum, shuah, anshuman.khandual, dev.jain, akpm


The quilt patch titled
     Subject: selftests/mm: hugetlb_madv_vs_map: avoid test skipping by querying hugepage size at runtime
has been removed from the -mm tree.  Its filename was
     selftests-mm-hugetlb_madv_vs_map-avoid-test-skipping-by-querying-hugepage-size-at-runtime.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Dev Jain <dev.jain@arm.com>
Subject: selftests/mm: hugetlb_madv_vs_map: avoid test skipping by querying hugepage size at runtime
Date: Thu, 9 May 2024 15:24:47 +0530

Currently, the size used in mmap() is statically defined, leading to
skipping of the test on a hugepage size other than 2 MB, since munmap()
won't free the hugepage for a size greater than 2 MB.  Hence, query the
size at runtime.

Also, there is no reason why a hugepage allocation should fail, since we
are using a simple mmap() using MAP_HUGETLB; hence, instead of skipping
the test, make it fail.

Link: https://lkml.kernel.org/r/20240509095447.3791573-1-dev.jain@arm.com
Signed-off-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/hugetlb_madv_vs_map.c |   16 +++++++------
 1 file changed, 9 insertions(+), 7 deletions(-)

--- a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c~selftests-mm-hugetlb_madv_vs_map-avoid-test-skipping-by-querying-hugepage-size-at-runtime
+++ a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c
@@ -27,9 +27,9 @@
 #include "vm_util.h"
 #include "../kselftest.h"
 
-#define MMAP_SIZE (1 << 21)
 #define INLOOP_ITER 100
 
+size_t mmap_size;
 char *huge_ptr;
 
 /* Touch the memory while it is being madvised() */
@@ -44,7 +44,7 @@ void *touch(void *unused)
 void *madv(void *unused)
 {
 	for (int i = 0; i < INLOOP_ITER; i++)
-		madvise(huge_ptr, MMAP_SIZE, MADV_DONTNEED);
+		madvise(huge_ptr, mmap_size, MADV_DONTNEED);
 
 	return NULL;
 }
@@ -59,7 +59,7 @@ void *map_extra(void *unused)
 	void *ptr;
 
 	for (int i = 0; i < INLOOP_ITER; i++) {
-		ptr = mmap(NULL, MMAP_SIZE, PROT_READ | PROT_WRITE,
+		ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE,
 			   MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB,
 			   -1, 0);
 
@@ -93,14 +93,16 @@ int main(void)
 			       free_hugepages);
 	}
 
+	mmap_size = default_huge_page_size();
+
 	while (max--) {
-		huge_ptr = mmap(NULL, MMAP_SIZE, PROT_READ | PROT_WRITE,
+		huge_ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE,
 				MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB,
 				-1, 0);
 
 		if ((unsigned long)huge_ptr == -1) {
-			ksft_exit_skip("Failed to allocated huge page\n");
-			return KSFT_SKIP;
+			ksft_test_result_fail("Failed to allocate huge page\n");
+			return KSFT_FAIL;
 		}
 
 		pthread_create(&thread1, NULL, madv, NULL);
@@ -117,7 +119,7 @@ int main(void)
 		}
 
 		/* Unmap and restart */
-		munmap(huge_ptr, MMAP_SIZE);
+		munmap(huge_ptr, mmap_size);
 	}
 
 	return KSFT_PASS;
_

Patches currently in -mm which might be from dev.jain@arm.com are



^ permalink raw reply	[relevance 1%]

* [merged mm-stable] mm-hugetlb-add-missing-vm_fault_set_hindex-in-hugetlb_fault.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, peterx, muchun.song, liushixin2, axelrasmussen,
	osalvador, akpm


The quilt patch titled
     Subject: mm/hugetlb: add missing VM_FAULT_SET_HINDEX in hugetlb_fault
has been removed from the -mm tree.  Its filename was
     mm-hugetlb-add-missing-vm_fault_set_hindex-in-hugetlb_fault.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Oscar Salvador <osalvador@suse.de>
Subject: mm/hugetlb: add missing VM_FAULT_SET_HINDEX in hugetlb_fault
Date: Thu, 9 May 2024 12:01:47 +0200

Patch series "Minor fixups for hugetlb fault path".

This series contains a couple of fixups for hugetlb_fault and hugetlb_wp
respectively, where a VM_FAULT_SET_HINDEX call was missing.

I did not bother with a Fixes tag because the missing piece here is that
we will not report to userspace the right extension of the faulty area by
adjusting struct kernel_siginfo.si_addr_lsb, but I do not consider that to
be a big issue because I assume that userspace already knows the size of
the mapping anyway.


This patch (of 2):

commit af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more general")
added the code to handle pte_markers in hugetlb faulting path.  In case of
an UFFD_POISON event, a PTE_MARKER_POISONED will be created and we will
return VM_FAULT_HWPOISON_LARGE upon detecting that in the fault path.  Add
the missing VM_FAULT_SET_HINDEX, so the right si_addr_lsb will be passed
to userspace to report the extension of the faulty area.

Link: https://lkml.kernel.org/r/20240509100148.22384-1-osalvador@suse.de
Link: https://lkml.kernel.org/r/20240509100148.22384-2-osalvador@suse.de
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Acked-by: Peter Xu <peterx@redhat.com>
Acked-by: Axel Rasmussen <axelrasmussen@google.com>
Cc: Liu Shixin <liushixin2@huawei.com>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/hugetlb.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/hugetlb.c~mm-hugetlb-add-missing-vm_fault_set_hindex-in-hugetlb_fault
+++ a/mm/hugetlb.c
@@ -6485,7 +6485,8 @@ vm_fault_t hugetlb_fault(struct mm_struc
 				pte_marker_get(pte_to_swp_entry(vmf.orig_pte));
 
 			if (marker & PTE_MARKER_POISONED) {
-				ret = VM_FAULT_HWPOISON_LARGE;
+				ret = VM_FAULT_HWPOISON_LARGE |
+				      VM_FAULT_SET_HINDEX(hstate_index(h));
 				goto out_mutex;
 			}
 		}
_

Patches currently in -mm which might be from osalvador@suse.de are



^ permalink raw reply	[relevance 1%]

* [merged mm-stable] selftests-cgroup-add-tests-to-verify-the-zswap-writeback-path.patch removed from -mm tree
@ 2024-05-11 22:42  5% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, yosryahmed, nphamcs, hannes, chengming.zhou,
	usamaarif642, akpm


The quilt patch titled
     Subject: selftests: cgroup: add tests to verify the zswap writeback path
has been removed from the -mm tree.  Its filename was
     selftests-cgroup-add-tests-to-verify-the-zswap-writeback-path.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Usama Arif <usamaarif642@gmail.com>
Subject: selftests: cgroup: add tests to verify the zswap writeback path
Date: Wed, 8 May 2024 18:13:59 +0100

Attempt writeback with the below steps and check using memory.stat.zswpwb
if zswap writeback occurred:

1. Allocate memory.
2. Reclaim memory equal to the amount that was allocated in step 1.
   This will move it into zswap.
3. Save current zswap usage.
4. Move the memory allocated in step 1 back in from zswap.
5. Set zswap.max to half the amount that was recorded in step 3.
6. Attempt to reclaim memory equal to the amount that was allocated,
   this will either trigger writeback if it's enabled, or reclamation
   will fail if writeback is disabled as there isn't enough zswap
   space.

Link: https://lkml.kernel.org/r/20240508171359.1545744-1-usamaarif642@gmail.com
Signed-off-by: Usama Arif <usamaarif642@gmail.com>
Suggested-by: Nhat Pham <nphamcs@gmail.com>
Acked-by: Yosry Ahmed <yosryahmed@google.com>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/cgroup/test_zswap.c |  130 +++++++++++++++++-
 1 file changed, 129 insertions(+), 1 deletion(-)

--- a/tools/testing/selftests/cgroup/test_zswap.c~selftests-cgroup-add-tests-to-verify-the-zswap-writeback-path
+++ a/tools/testing/selftests/cgroup/test_zswap.c
@@ -50,7 +50,7 @@ static int get_zswap_stored_pages(size_t
 	return read_int("/sys/kernel/debug/zswap/stored_pages", value);
 }
 
-static int get_cg_wb_count(const char *cg)
+static long get_cg_wb_count(const char *cg)
 {
 	return cg_read_key_long(cg, "memory.stat", "zswpwb");
 }
@@ -249,6 +249,132 @@ out:
 }
 
 /*
+ * Attempt writeback with the following steps:
+ * 1. Allocate memory.
+ * 2. Reclaim memory equal to the amount that was allocated in step 1.
+      This will move it into zswap.
+ * 3. Save current zswap usage.
+ * 4. Move the memory allocated in step 1 back in from zswap.
+ * 5. Set zswap.max to half the amount that was recorded in step 3.
+ * 6. Attempt to reclaim memory equal to the amount that was allocated,
+      this will either trigger writeback if it's enabled, or reclamation
+      will fail if writeback is disabled as there isn't enough zswap space.
+ */
+static int attempt_writeback(const char *cgroup, void *arg)
+{
+	long pagesize = sysconf(_SC_PAGESIZE);
+	char *test_group = arg;
+	size_t memsize = MB(4);
+	char buf[pagesize];
+	long zswap_usage;
+	bool wb_enabled;
+	int ret = -1;
+	char *mem;
+
+	wb_enabled = cg_read_long(test_group, "memory.zswap.writeback");
+	mem = (char *)malloc(memsize);
+	if (!mem)
+		return ret;
+
+	/*
+	 * Fill half of each page with increasing data, and keep other
+	 * half empty, this will result in data that is still compressible
+	 * and ends up in zswap, with material zswap usage.
+	 */
+	for (int i = 0; i < pagesize; i++)
+		buf[i] = i < pagesize/2 ? (char) i : 0;
+
+	for (int i = 0; i < memsize; i += pagesize)
+		memcpy(&mem[i], buf, pagesize);
+
+	/* Try and reclaim allocated memory */
+	if (cg_write_numeric(test_group, "memory.reclaim", memsize)) {
+		ksft_print_msg("Failed to reclaim all of the requested memory\n");
+		goto out;
+	}
+
+	zswap_usage = cg_read_long(test_group, "memory.zswap.current");
+
+	/* zswpin */
+	for (int i = 0; i < memsize; i += pagesize) {
+		if (memcmp(&mem[i], buf, pagesize)) {
+			ksft_print_msg("invalid memory\n");
+			goto out;
+		}
+	}
+
+	if (cg_write_numeric(test_group, "memory.zswap.max", zswap_usage/2))
+		goto out;
+
+	/*
+	 * If writeback is enabled, trying to reclaim memory now will trigger a
+	 * writeback as zswap.max is half of what was needed when reclaim ran the first time.
+	 * If writeback is disabled, memory reclaim will fail as zswap is limited and
+	 * it can't writeback to swap.
+	 */
+	ret = cg_write_numeric(test_group, "memory.reclaim", memsize);
+	if (!wb_enabled)
+		ret = (ret == -EAGAIN) ? 0 : -1;
+
+out:
+	free(mem);
+	return ret;
+}
+
+/* Test to verify the zswap writeback path */
+static int test_zswap_writeback(const char *root, bool wb)
+{
+	long zswpwb_before, zswpwb_after;
+	int ret = KSFT_FAIL;
+	char *test_group;
+
+	test_group = cg_name(root, "zswap_writeback_test");
+	if (!test_group)
+		goto out;
+	if (cg_create(test_group))
+		goto out;
+	if (cg_write(test_group, "memory.zswap.writeback", wb ? "1" : "0"))
+		goto out;
+
+	zswpwb_before = get_cg_wb_count(test_group);
+	if (zswpwb_before != 0) {
+		ksft_print_msg("zswpwb_before = %ld instead of 0\n", zswpwb_before);
+		goto out;
+	}
+
+	if (cg_run(test_group, attempt_writeback, (void *) test_group))
+		goto out;
+
+	/* Verify that zswap writeback occurred only if writeback was enabled */
+	zswpwb_after = get_cg_wb_count(test_group);
+	if (zswpwb_after < 0)
+		goto out;
+
+	if (wb != !!zswpwb_after) {
+		ksft_print_msg("zswpwb_after is %ld while wb is %s",
+				zswpwb_after, wb ? "enabled" : "disabled");
+		goto out;
+	}
+
+	ret = KSFT_PASS;
+
+out:
+	cg_destroy(test_group);
+	free(test_group);
+	return ret;
+}
+
+static int test_zswap_writeback_enabled(const char *root)
+{
+	return test_zswap_writeback(root, true);
+}
+
+static int test_zswap_writeback_disabled(const char *root)
+{
+	return test_zswap_writeback(root, false);
+}
+
+/*
  * When trying to store a memcg page in zswap, if the memcg hits its memory
  * limit in zswap, writeback should affect only the zswapped pages of that
  * memcg.
@@ -423,6 +549,8 @@ struct zswap_test {
 	T(test_zswap_usage),
 	T(test_swapin_nozswap),
 	T(test_zswapin),
+	T(test_zswap_writeback_enabled),
+	T(test_zswap_writeback_disabled),
 	T(test_no_kmem_bypass),
 	T(test_no_invasive_cgroup_shrink),
 };
_

Patches currently in -mm which might be from usamaarif642@gmail.com are



^ permalink raw reply	[relevance 5%]

* [merged mm-stable] mm-damon-core-fix-return-value-from-damos_wmark_metric_value.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, sj, yorha.op, akpm


The quilt patch titled
     Subject: mm/damon/core: fix return value from damos_wmark_metric_value
has been removed from the -mm tree.  Its filename was
     mm-damon-core-fix-return-value-from-damos_wmark_metric_value.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Alex Rusuf <yorha.op@gmail.com>
Subject: mm/damon/core: fix return value from damos_wmark_metric_value
Date: Mon, 6 May 2024 11:02:38 -0700

damos_wmark_metric_value's return value is 'unsigned long', so returning
-EINVAL as 'unsigned long' may turn out to be very different from the
expected one (using 2's complement) and treat as usual matric's value. 
So, fix that, checking if returned value is not 0.

Link: https://lkml.kernel.org/r/20240506180238.53842-1-sj@kernel.org
Fixes: ee801b7dd782 ("mm/damon/schemes: activate schemes based on a watermarks mechanism")
Signed-off-by: Alex Rusuf <yorha.op@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/damon/core.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/mm/damon/core.c~mm-damon-core-fix-return-value-from-damos_wmark_metric_value
+++ a/mm/damon/core.c
@@ -1481,12 +1481,14 @@ static bool kdamond_need_stop(struct dam
 	return true;
 }
 
-static unsigned long damos_wmark_metric_value(enum damos_wmark_metric metric)
+static int damos_get_wmark_metric_value(enum damos_wmark_metric metric,
+					unsigned long *metric_value)
 {
 	switch (metric) {
 	case DAMOS_WMARK_FREE_MEM_RATE:
-		return global_zone_page_state(NR_FREE_PAGES) * 1000 /
+		*metric_value = global_zone_page_state(NR_FREE_PAGES) * 1000 /
 		       totalram_pages();
+		return 0;
 	default:
 		break;
 	}
@@ -1501,10 +1503,9 @@ static unsigned long damos_wmark_wait_us
 {
 	unsigned long metric;
 
-	if (scheme->wmarks.metric == DAMOS_WMARK_NONE)
+	if (damos_get_wmark_metric_value(scheme->wmarks.metric, &metric))
 		return 0;
 
-	metric = damos_wmark_metric_value(scheme->wmarks.metric);
 	/* higher than high watermark or lower than low watermark */
 	if (metric > scheme->wmarks.high || scheme->wmarks.low > metric) {
 		if (scheme->wmarks.activated)
_

Patches currently in -mm which might be from yorha.op@gmail.com are



^ permalink raw reply	[relevance 1%]

* [merged mm-stable] mm-do-not-update-memcg-stats-for-nr_file-shmem_pmdmapped.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, shakeel.butt, roman.gushchin, muchun.song, mhocko,
	hannes, david, yosryahmed, akpm


The quilt patch titled
     Subject: mm: do not update memcg stats for NR_{FILE/SHMEM}_PMDMAPPED
has been removed from the -mm tree.  Its filename was
     mm-do-not-update-memcg-stats-for-nr_file-shmem_pmdmapped.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Yosry Ahmed <yosryahmed@google.com>
Subject: mm: do not update memcg stats for NR_{FILE/SHMEM}_PMDMAPPED
Date: Mon, 6 May 2024 19:29:24 +0000

Previously, all NR_VM_EVENT_ITEMS stats were maintained per-memcg,
although some of those fields are not exposed anywhere. Commit
14e0f6c957e39 ("memcg: reduce memory for the lruvec and memcg stats")
changed this such that we only maintain the stats we actually expose
per-memcg via a translation table.

Additionally, commit 514462bbe927b ("memcg: warn for unexpected events
and stats") added a warning if a per-memcg stat update is attempted for
a stat that is not in the translation table. The warning started firing
for the NR_{FILE/SHMEM}_PMDMAPPED stat updates in the rmap code. These
stats are not maintained per-memcg, and hence are not in the translation
table.

Do not use __lruvec_stat_mod_folio() when updating NR_FILE_PMDMAPPED and
NR_SHMEM_PMDMAPPED. Use __mod_node_page_state() instead, which updates
the global per-node stats only.

Link: https://lkml.kernel.org/r/20240506192924.271999-1-yosryahmed@google.com
Fixes: 514462bbe927 ("memcg: warn for unexpected events and stats")
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Reported-by: syzbot+9319a4268a640e26b72b@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/lkml/0000000000001b9d500617c8b23c@google.com
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/rmap.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

--- a/mm/rmap.c~mm-do-not-update-memcg-stats-for-nr_file-shmem_pmdmapped
+++ a/mm/rmap.c
@@ -1435,13 +1435,14 @@ static __always_inline void __folio_add_
 		struct page *page, int nr_pages, struct vm_area_struct *vma,
 		enum rmap_level level)
 {
+	pg_data_t *pgdat = folio_pgdat(folio);
 	int nr, nr_pmdmapped = 0;
 
 	VM_WARN_ON_FOLIO(folio_test_anon(folio), folio);
 
 	nr = __folio_add_rmap(folio, page, nr_pages, level, &nr_pmdmapped);
 	if (nr_pmdmapped)
-		__lruvec_stat_mod_folio(folio, folio_test_swapbacked(folio) ?
+		__mod_node_page_state(pgdat, folio_test_swapbacked(folio) ?
 			NR_SHMEM_PMDMAPPED : NR_FILE_PMDMAPPED, nr_pmdmapped);
 	if (nr)
 		__lruvec_stat_mod_folio(folio, NR_FILE_MAPPED, nr);
@@ -1493,6 +1494,7 @@ static __always_inline void __folio_remo
 		enum rmap_level level)
 {
 	atomic_t *mapped = &folio->_nr_pages_mapped;
+	pg_data_t *pgdat = folio_pgdat(folio);
 	int last, nr = 0, nr_pmdmapped = 0;
 	bool partially_mapped = false;
 	enum node_stat_item idx;
@@ -1540,13 +1542,14 @@ static __always_inline void __folio_remo
 	}
 
 	if (nr_pmdmapped) {
+		/* NR_{FILE/SHMEM}_PMDMAPPED are not maintained per-memcg */
 		if (folio_test_anon(folio))
-			idx = NR_ANON_THPS;
-		else if (folio_test_swapbacked(folio))
-			idx = NR_SHMEM_PMDMAPPED;
+			__lruvec_stat_mod_folio(folio, NR_ANON_THPS, -nr_pmdmapped);
 		else
-			idx = NR_FILE_PMDMAPPED;
-		__lruvec_stat_mod_folio(folio, idx, -nr_pmdmapped);
+			__mod_node_page_state(pgdat,
+					folio_test_swapbacked(folio) ?
+					NR_SHMEM_PMDMAPPED : NR_FILE_PMDMAPPED,
+					-nr_pmdmapped);
 	}
 	if (nr) {
 		idx = folio_test_anon(folio) ? NR_ANON_MAPPED : NR_FILE_MAPPED;
_

Patches currently in -mm which might be from yosryahmed@google.com are



^ permalink raw reply	[relevance 1%]

* [merged mm-stable] docs-mm-damon-maintainer-profile-change-the-maintainers-timezone-from-pst-to-pt.patch removed from -mm tree
@ 2024-05-11 22:42 13% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, shuah, corbet, sj, akpm


The quilt patch titled
     Subject: Docs/mm/damon/maintainer-profile: change the maintainer's timezone from PST to PT
has been removed from the -mm tree.  Its filename was
     docs-mm-damon-maintainer-profile-change-the-maintainers-timezone-from-pst-to-pt.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: Docs/mm/damon/maintainer-profile: change the maintainer's timezone from PST to PT
Date: Fri, 3 May 2024 11:03:17 -0700

The document says the maintainer is working on only PST.  The maintainer
respects daylight saving system, though.  Update the time zone to PT.

Link: https://lkml.kernel.org/r/20240503180318.72798-10-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/mm/damon/maintainer-profile.rst |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/Documentation/mm/damon/maintainer-profile.rst~docs-mm-damon-maintainer-profile-change-the-maintainers-timezone-from-pst-to-pt
+++ a/Documentation/mm/damon/maintainer-profile.rst
@@ -48,9 +48,9 @@ Review cadence
 --------------
 
 The DAMON maintainer does the work on the usual work hour (09:00 to 17:00,
-Mon-Fri) in PST.  The response to patches will occasionally be slow.  Do not
-hesitate to send a ping if you have not heard back within a week of sending a
-patch.
+Mon-Fri) in PT (Pacific Time).  The response to patches will occasionally be
+slow.  Do not hesitate to send a ping if you have not heard back within a week
+of sending a patch.
 
 
 .. [1] https://git.kernel.org/akpm/mm/h/mm-unstable
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 13%]

* [PATCH v2 0/6] Generate address range data for built-in modules
@ 2024-05-11 22:40  1% Kris Van Hees
  2024-05-11 22:40  4% ` [PATCH v2 1/6] kbuild: add modules.builtin.objs Kris Van Hees
                   ` (5 more replies)
  0 siblings, 6 replies; 200+ results
From: Kris Van Hees @ 2024-05-11 22:40 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, linux-modules, linux-trace-kernel
  Cc: Kris Van Hees, Steven Rostedt, Luis Chamberlain,
	Masami Hiramatsu, Nick Desaulniers, Jiri Olsa, Elena Zannoni

Especially for tracing applications, it is convenient to be able to
refer to a symbol using a <module name, symbol name> pair and to be able
to translate an address into a <nodule mname, symbol name> pair.  But
that does not work if the module is built into the kernel because the
object files that comprise the built-in module implementation are simply
linked into the kernel image along with all other kernel object files.

This is especially visible when providing tracing scripts for support
purposes, where the developer of the script targets a particular kernel
version, but does not have control over whether the target system has
a particular module as loadable module or built-in module.  When tracing
symbols within a module, referring them by <module name, symbol name>
pairs is both convenient and aids symbol lookup.  But that naming will
not work if the module name information is lost if the module is built
into the kernel on the target system.

Earlier work addressing this loss of information for built-in modules
involved adding module name information to the kallsyms data, but that
required more invasive code in the kernel proper.  This work never did
get merged into the kernel tree.

All that is really needed is knowing whether a given address belongs to
a particular module (or multiple modules if they share an object file).
Or in other words, whether that address falls within an address range
that is associated with one or more modules.

This patch series is baaed on Luis Chamberlain's patch to generate
modules.builtin.objs, associating built-in modules with their object
files.  Using this data, vmlinux.o.map and vmlinux.map can be parsed in
a single pass to generate a modules.buitin.ranges file with offset range
information (relative to the base address of the associated section) for
built-in modules.  The file gets installed along with the other
modules.builtin.* files.

The impact on the kernel build is minimal because everything is done
using a single-pass AWK script.  The generated data size is minimal as
well, (depending on the exact kernel configuration) usually in the range
of 500-700 lines, with a file size of 20-40KB.

Changes since v1:
 - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES
 - Moved the config option to the tracers section
 - 2nd arg to generate_builtin_ranges.awk should be vmlinux.map

Kris Van Hees (5):
  trace: add CONFIG_BUILTIN_MODULE_RANGES option
  kbuild: generate a linker map for vmlinux.o
  module: script to generate offset ranges for builtin modules
  kbuild: generate modules.builtin.ranges when linking the kernel
  module: add install target for modules.builtin.ranges

Luis Chamberlain (1):
  kbuild: add modules.builtin.objs

 .gitignore                          |   2 +-
 Documentation/dontdiff              |   2 +-
 Documentation/kbuild/kbuild.rst     |   5 ++
 Makefile                            |   8 +-
 include/linux/module.h              |   4 +-
 kernel/trace/Kconfig                |  17 ++++
 scripts/Makefile.lib                |   5 +-
 scripts/Makefile.modinst            |  11 ++-
 scripts/Makefile.vmlinux            |  17 ++++
 scripts/Makefile.vmlinux_o          |  18 ++++-
 scripts/generate_builtin_ranges.awk | 149 ++++++++++++++++++++++++++++++++++++
 11 files changed, 228 insertions(+), 10 deletions(-)
 create mode 100755 scripts/generate_builtin_ranges.awk


base-commit: dd5a440a31fae6e459c0d6271dddd62825505361
-- 
2.42.0


^ permalink raw reply	[relevance 1%]

* [merged mm-stable] docs-mm-damon-design-use-a-list-for-supported-filters.patch removed from -mm tree
@ 2024-05-11 22:42 24% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, shuah, corbet, sj, akpm


The quilt patch titled
     Subject: Docs/mm/damon/design: use a list for supported filters
has been removed from the -mm tree.  Its filename was
     docs-mm-damon-design-use-a-list-for-supported-filters.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: Docs/mm/damon/design: use a list for supported filters
Date: Fri, 3 May 2024 11:03:16 -0700

Filters section is listing currently supported filter types in a normal
paragraph.  Since the number of types are higher than four, it is not easy
to read for only specific types.  Use a list for easier finding of
specific types.

[sj@kernel.org: fix build warning]
  Link: https://lkml.kernel.org/r/20240507161747.52430-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20240503180318.72798-9-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/mm/damon/design.rst |   44 +++++++++++++++-------------
 1 file changed, 25 insertions(+), 19 deletions(-)

--- a/Documentation/mm/damon/design.rst~docs-mm-damon-design-use-a-list-for-supported-filters
+++ a/Documentation/mm/damon/design.rst
@@ -461,26 +461,32 @@ number of filters for each scheme.  Each
 memory, and whether it should exclude the memory of the type (filter-out), or
 all except the memory of the type (filter-in).
 
-Currently, anonymous page, memory cgroup, young page, address range, and DAMON
-monitoring target type filters are supported by the feature.  Some filter
-target types require additional arguments.  The memory cgroup filter type asks
-users to specify the file path of the memory cgroup for the filter.  The
-address range type asks the start and end addresses of the range.  The DAMON
-monitoring target type asks the index of the target from the context's
-monitoring targets list.  Hence, users can apply specific schemes to only
-anonymous pages, non-anonymous pages, pages of specific cgroups, all pages
-excluding those of specific cgroups, pages that not accessed after the last
-access check from the scheme, pages that accessed after the last access check
-from the scheme, pages in specific address range, pages in specific DAMON
-monitoring targets, and any combination of those.
+For efficient handling of filters, some types of filters are handled by the
+core layer, while others are handled by operations set.  In the latter case,
+hence, support of the filter types depends on the DAMON operations set.  In
+case of the core layer-handled filters, the memory regions that excluded by the
+filter are not counted as the scheme has tried to the region.  In contrast, if
+a memory regions is filtered by an operations set layer-handled filter, it is
+counted as the scheme has tried.  This difference affects the statistics.
 
-To handle filters efficiently, the address range and DAMON monitoring target
-type filters are handled by the core layer, while others are handled by
-operations set.  If a memory region is filtered by a core layer-handled filter,
-it is not counted as the scheme has tried to the region.  In contrast, if a
-memory regions is filtered by an operations set layer-handled filter, it is
-counted as the scheme has tried.  The difference in accounting leads to changes
-in the statistics.
+Below types of filters are currently supported.
+
+- anonymous page
+    - Applied to pages that containing data that not stored in files.
+    - Handled by operations set layer.  Supported by only ``paddr`` set.
+- memory cgroup
+    - Applied to pages that belonging to a given cgroup.
+    - Handled by operations set layer.  Supported by only ``paddr`` set.
+- young page
+    - Applied to pages that are accessed after the last access check from the
+      scheme.
+    - Handled by operations set layer.  Supported by only ``paddr`` set.
+- address range
+    - Applied to pages that belonging to a given address range.
+    - Handled by the core logic.
+- DAMON monitoring target
+    - Applied to pages that belonging to a given DAMON monitoring target.
+    - Handled by the core logic.
 
 
 Application Programming Interface
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 24%]

* [merged mm-stable] docs-admin-guide-mm-damon-usage-fix-wrong-schemes-effective-quota-update-command.patch removed from -mm tree
@ 2024-05-11 22:42  8% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, stable, shuah, corbet, sj, akpm


The quilt patch titled
     Subject: Docs/admin-guide/mm/damon/usage: fix wrong schemes effective quota update command
has been removed from the -mm tree.  Its filename was
     docs-admin-guide-mm-damon-usage-fix-wrong-schemes-effective-quota-update-command.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: Docs/admin-guide/mm/damon/usage: fix wrong schemes effective quota update command
Date: Fri, 3 May 2024 11:03:15 -0700

To update effective size quota of DAMOS schemes on DAMON sysfs file
interface, user should write 'update_schemes_effective_quotas' to the
kdamond 'state' file.  But the document is mistakenly saying the input
string as 'update_schemes_effective_bytes'.  Fix it (s/bytes/quotas/).

Link: https://lkml.kernel.org/r/20240503180318.72798-8-sj@kernel.org
Fixes: a6068d6dfa2f ("Docs/admin-guide/mm/damon/usage: document effective_bytes file")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>	[6.9.x]
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/admin-guide/mm/damon/usage.rst |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/Documentation/admin-guide/mm/damon/usage.rst~docs-admin-guide-mm-damon-usage-fix-wrong-schemes-effective-quota-update-command
+++ a/Documentation/admin-guide/mm/damon/usage.rst
@@ -153,7 +153,7 @@ Users can write below commands for the k
 - ``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme
   action tried regions directory for each DAMON-based operation scheme of the
   kdamond.
-- ``update_schemes_effective_bytes``: Update the contents of
+- ``update_schemes_effective_quotas``: Update the contents of
   ``effective_bytes`` files for each DAMON-based operation scheme of the
   kdamond.  For more details, refer to :ref:`quotas directory <sysfs_quotas>`.
 
@@ -342,7 +342,7 @@ Based on the user-specified :ref:`goal <
 effective size quota is further adjusted.  Reading ``effective_bytes`` returns
 the current effective size quota.  The file is not updated in real time, so
 users should ask DAMON sysfs interface to update the content of the file for
-the stats by writing a special keyword, ``update_schemes_effective_bytes`` to
+the stats by writing a special keyword, ``update_schemes_effective_quotas`` to
 the relevant ``kdamonds/<N>/state`` file.
 
 Under ``weights`` directory, three files (``sz_permil``,
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 8%]

* [merged mm-stable] docs-admin-guide-mm-damon-usage-fix-wrong-example-of-damos-filter-matching-sysfs-file.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, stable, shuah, corbet, sj, akpm


The quilt patch titled
     Subject: Docs/admin-guide/mm/damon/usage: fix wrong example of DAMOS filter matching sysfs file
has been removed from the -mm tree.  Its filename was
     docs-admin-guide-mm-damon-usage-fix-wrong-example-of-damos-filter-matching-sysfs-file.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: Docs/admin-guide/mm/damon/usage: fix wrong example of DAMOS filter matching sysfs file
Date: Fri, 3 May 2024 11:03:14 -0700

The example usage of DAMOS filter sysfs files, specifically the part of
'matching' file writing for memcg type filter, is wrong.  The intention is
to exclude pages of a memcg that already getting enough care from a given
scheme, but the example is setting the filter to apply the scheme to only
the pages of the memcg.  Fix it.

Link: https://lkml.kernel.org/r/20240503180318.72798-7-sj@kernel.org
Fixes: 9b7f9322a530 ("Docs/admin-guide/mm/damon/usage: document DAMOS filters of sysfs")
Closes: https://lore.kernel.org/r/20240317191358.97578-1-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>	[6.3.x]
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/admin-guide/mm/damon/usage.rst |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/Documentation/admin-guide/mm/damon/usage.rst~docs-admin-guide-mm-damon-usage-fix-wrong-example-of-damos-filter-matching-sysfs-file
+++ a/Documentation/admin-guide/mm/damon/usage.rst
@@ -434,7 +434,7 @@ pages of all memory cgroups except ``/ha
     # # further filter out all cgroups except one at '/having_care_already'
     echo memcg > 1/type
     echo /having_care_already > 1/memcg_path
-    echo N > 1/matching
+    echo Y > 1/matching
 
 Note that ``anon`` and ``memcg`` filters are currently supported only when
 ``paddr`` :ref:`implementation <sysfs_context>` is being used.
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 1%]

* [merged mm-stable] selftests-damon-_damon_sysfs-use-is-instead-of-==-for-none.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, shuah, corbet, sj, akpm


The quilt patch titled
     Subject: selftests/damon/_damon_sysfs: use 'is' instead of '==' for 'None'
has been removed from the -mm tree.  Its filename was
     selftests-damon-_damon_sysfs-use-is-instead-of-==-for-none.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: selftests/damon/_damon_sysfs: use 'is' instead of '==' for 'None'
Date: Fri, 3 May 2024 11:03:12 -0700

_damon_sysfs.py is using '==' or '!=' for 'None'.  Since 'None' is a
singleton, using 'is' or 'is not' is more efficient.  Use the more
efficient one.

Link: https://lkml.kernel.org/r/20240503180318.72798-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/damon/_damon_sysfs.py |   80 ++++++++--------
 1 file changed, 40 insertions(+), 40 deletions(-)

--- a/tools/testing/selftests/damon/_damon_sysfs.py~selftests-damon-_damon_sysfs-use-is-instead-of-==-for-none
+++ a/tools/testing/selftests/damon/_damon_sysfs.py
@@ -45,11 +45,11 @@ class DamosAccessPattern:
         self.nr_accesses = nr_accesses
         self.age = age
 
-        if self.size == None:
+        if self.size is None:
             self.size = [0, 2**64 - 1]
-        if self.nr_accesses == None:
+        if self.nr_accesses is None:
             self.nr_accesses = [0, 2**64 - 1]
-        if self.age == None:
+        if self.age is None:
             self.age = [0, 2**64 - 1]
 
     def sysfs_dir(self):
@@ -58,27 +58,27 @@ class DamosAccessPattern:
     def stage(self):
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'sz', 'min'), self.size[0])
-        if err != None:
+        if err is not None:
             return err
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'sz', 'max'), self.size[1])
-        if err != None:
+        if err is not None:
             return err
         err = write_file(os.path.join(self.sysfs_dir(), 'nr_accesses', 'min'),
                 self.nr_accesses[0])
-        if err != None:
+        if err is not None:
             return err
         err = write_file(os.path.join(self.sysfs_dir(), 'nr_accesses', 'max'),
                 self.nr_accesses[1])
-        if err != None:
+        if err is not None:
             return err
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'age', 'min'), self.age[0])
-        if err != None:
+        if err is not None:
             return err
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'age', 'max'), self.age[1])
-        if err != None:
+        if err is not None:
             return err
 
 qgoal_metric_user_input = 'user_input'
@@ -137,14 +137,14 @@ class DamosQuota:
 
     def stage(self):
         err = write_file(os.path.join(self.sysfs_dir(), 'bytes'), self.sz)
-        if err != None:
+        if err is not None:
             return err
         err = write_file(os.path.join(self.sysfs_dir(), 'ms'), self.ms)
-        if err != None:
+        if err is not None:
             return err
         err = write_file(os.path.join(self.sysfs_dir(), 'reset_interval_ms'),
                          self.reset_interval_ms)
-        if err != None:
+        if err is not None:
             return err
 
         nr_goals_file = os.path.join(self.sysfs_dir(), 'goals', 'nr_goals')
@@ -201,30 +201,30 @@ class Damos:
 
     def stage(self):
         err = write_file(os.path.join(self.sysfs_dir(), 'action'), self.action)
-        if err != None:
+        if err is not None:
             return err
         err = self.access_pattern.stage()
-        if err != None:
+        if err is not None:
             return err
         err = write_file(os.path.join(self.sysfs_dir(), 'apply_interval_us'),
                          '%d' % self.apply_interval_us)
-        if err != None:
+        if err is not None:
             return err
 
         err = self.quota.stage()
-        if err != None:
+        if err is not None:
             return err
 
         # disable watermarks
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'watermarks', 'metric'), 'none')
-        if err != None:
+        if err is not None:
             return err
 
         # disable filters
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'filters', 'nr_filters'), '0')
-        if err != None:
+        if err is not None:
             return err
 
 class DamonTarget:
@@ -243,7 +243,7 @@ class DamonTarget:
     def stage(self):
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'regions', 'nr_regions'), '0')
-        if err != None:
+        if err is not None:
             return err
         return write_file(
                 os.path.join(self.sysfs_dir(), 'pid_target'), self.pid)
@@ -275,27 +275,27 @@ class DamonAttrs:
     def stage(self):
         err = write_file(os.path.join(self.interval_sysfs_dir(), 'sample_us'),
                 self.sample_us)
-        if err != None:
+        if err is not None:
             return err
         err = write_file(os.path.join(self.interval_sysfs_dir(), 'aggr_us'),
                 self.aggr_us)
-        if err != None:
+        if err is not None:
             return err
         err = write_file(os.path.join(self.interval_sysfs_dir(), 'update_us'),
                 self.update_us)
-        if err != None:
+        if err is not None:
             return err
 
         err = write_file(
                 os.path.join(self.nr_regions_range_sysfs_dir(), 'min'),
                 self.min_nr_regions)
-        if err != None:
+        if err is not None:
             return err
 
         err = write_file(
                 os.path.join(self.nr_regions_range_sysfs_dir(), 'max'),
                 self.max_nr_regions)
-        if err != None:
+        if err is not None:
             return err
 
 class DamonCtx:
@@ -329,24 +329,24 @@ class DamonCtx:
     def stage(self):
         err = write_file(
                 os.path.join(self.sysfs_dir(), 'operations'), self.ops)
-        if err != None:
+        if err is not None:
             return err
         err = self.monitoring_attrs.stage()
-        if err != None:
+        if err is not None:
             return err
 
         nr_targets_file = os.path.join(
                 self.sysfs_dir(), 'targets', 'nr_targets')
         content, err = read_file(nr_targets_file)
-        if err != None:
+        if err is not None:
             return err
         if int(content) != len(self.targets):
             err = write_file(nr_targets_file, '%d' % len(self.targets))
-            if err != None:
+            if err is not None:
                 return err
         for target in self.targets:
             err = target.stage()
-            if err != None:
+            if err is not None:
                 return err
 
         nr_schemes_file = os.path.join(
@@ -356,11 +356,11 @@ class DamonCtx:
             return err
         if int(content) != len(self.schemes):
             err = write_file(nr_schemes_file, '%d' % len(self.schemes))
-            if err != None:
+            if err is not None:
                 return err
         for scheme in self.schemes:
             err = scheme.stage()
-            if err != None:
+            if err is not None:
                 return err
         return None
 
@@ -384,16 +384,16 @@ class Kdamond:
         nr_contexts_file = os.path.join(self.sysfs_dir(),
                 'contexts', 'nr_contexts')
         content, err = read_file(nr_contexts_file)
-        if err != None:
+        if err is not None:
             return err
         if int(content) != len(self.contexts):
             err = write_file(nr_contexts_file, '%d' % len(self.contexts))
-            if err != None:
+            if err is not None:
                 return err
 
         for context in self.contexts:
             err = context.stage()
-            if err != None:
+            if err is not None:
                 return err
         err = write_file(os.path.join(self.sysfs_dir(), 'state'), 'on')
         return err
@@ -401,20 +401,20 @@ class Kdamond:
     def update_schemes_tried_bytes(self):
         err = write_file(os.path.join(self.sysfs_dir(), 'state'),
                 'update_schemes_tried_bytes')
-        if err != None:
+        if err is not None:
             return err
         for context in self.contexts:
             for scheme in context.schemes:
                 content, err = read_file(os.path.join(scheme.sysfs_dir(),
                     'tried_regions', 'total_bytes'))
-                if err != None:
+                if err is not None:
                     return err
                 scheme.tried_bytes = int(content)
 
     def update_schemes_stats(self):
         err = write_file(os.path.join(self.sysfs_dir(), 'state'),
                 'update_schemes_stats')
-        if err != None:
+        if err is not None:
             return err
         for context in self.contexts:
             for scheme in context.schemes:
@@ -423,7 +423,7 @@ class Kdamond:
                              'sz_applied', 'qt_exceeds']:
                     content, err = read_file(
                             os.path.join(scheme.sysfs_dir(), 'stats', stat))
-                    if err != None:
+                    if err is not None:
                         return err
                     stat_values.append(int(content))
                 scheme.stats = DamosStats(*stat_values)
@@ -471,10 +471,10 @@ class Kdamonds:
     def start(self):
         err = write_file(os.path.join(self.sysfs_dir(),  'nr_kdamonds'),
                 '%s' % len(self.kdamonds))
-        if err != None:
+        if err is not None:
             return err
         for kdamond in self.kdamonds:
             err = kdamond.start()
-            if err != None:
+            if err is not None:
                 return err
         return None
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 1%]

* [merged mm-stable] mm-damon-core-initialize-esz_bp-from-damos_quota_init_priv.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, shuah, corbet, sj, akpm


The quilt patch titled
     Subject: mm/damon/core: initialize ->esz_bp from damos_quota_init_priv()
has been removed from the -mm tree.  Its filename was
     mm-damon-core-initialize-esz_bp-from-damos_quota_init_priv.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: mm/damon/core: initialize ->esz_bp from damos_quota_init_priv()
Date: Fri, 3 May 2024 11:03:09 -0700

Patch series "mm/damon: misc fixes and improvements".

Add miscelleneous and non-urgent fixes and improvements for DAMON code,
selftests, and documents.


This patch (of 10):

damos_quota_init_priv() function should initialize all private fields of
struct damos_quota.  However, it is not initializing ->esz_bp field.  This
could result in use of uninitialized variable from
damon_feed_loop_next_input() function.  There is no such issue at the
moment because every caller of the function is passing damos_quota object
that already having the field zero value.  But we cannot guarantee the
future, and the function is not doing what it is promising.  A bug is a
bug.  This fix is for preventing possible future issues.

Link: https://lkml.kernel.org/r/20240503180318.72798-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20240503180318.72798-2-sj@kernel.org
Fixes: 9294a037c015 ("mm/damon/core: implement goal-oriented feedback-driven quota auto-tuning")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/damon/core.c |    1 +
 1 file changed, 1 insertion(+)

--- a/mm/damon/core.c~mm-damon-core-initialize-esz_bp-from-damos_quota_init_priv
+++ a/mm/damon/core.c
@@ -346,6 +346,7 @@ static struct damos_quota *damos_quota_i
 	quota->charged_from = 0;
 	quota->charge_target_from = NULL;
 	quota->charge_addr_from = 0;
+	quota->esz_bp = 0;
 	return quota;
 }
 
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 1%]

* [merged mm-stable] selftests-damon-add-a-test-for-damos-quota-goal.patch removed from -mm tree
@ 2024-05-11 22:42 14% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, shuah, sj, akpm


The quilt patch titled
     Subject: selftests/damon: add a test for DAMOS quota goal
has been removed from the -mm tree.  Its filename was
     selftests-damon-add-a-test-for-damos-quota-goal.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: selftests/damon: add a test for DAMOS quota goal
Date: Thu, 2 May 2024 10:27:18 -0700

Add a selftest for DAMOS quota goal.  It tests the feature by setting a
user_input metric based goal, change the current feedback, and check if
the effective quota size is increased and decreased as expected.

Link: https://lkml.kernel.org/r/20240502172718.74166-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/damon/Makefile            |    2 
 tools/testing/selftests/damon/damos_quota_goal.py |   77 ++++++++++++
 2 files changed, 78 insertions(+), 1 deletion(-)

--- /dev/null
+++ a/tools/testing/selftests/damon/damos_quota_goal.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-2.0
+
+import subprocess
+import time
+
+import _damon_sysfs
+
+def main():
+    # access two 10 MiB memory regions, 2 second per each
+    sz_region = 10 * 1024 * 1024
+    proc = subprocess.Popen(['./access_memory', '2', '%d' % sz_region, '2000'])
+
+    goal = _damon_sysfs.DamosQuotaGoal(
+            metric=_damon_sysfs.qgoal_metric_user_input, target_value=10000)
+    kdamonds = _damon_sysfs.Kdamonds([_damon_sysfs.Kdamond(
+            contexts=[_damon_sysfs.DamonCtx(
+                ops='vaddr',
+                targets=[_damon_sysfs.DamonTarget(pid=proc.pid)],
+                schemes=[_damon_sysfs.Damos(
+                    action='stat',
+                    quota=_damon_sysfs.DamosQuota(
+                        goals=[goal], reset_interval_ms=100),
+                    )] # schemes
+                )] # contexts
+            )]) # kdamonds
+
+    err = kdamonds.start()
+    if err != None:
+        print('kdamond start failed: %s' % err)
+        exit(1)
+
+    score_values_to_test = [0, 15000, 5000, 18000]
+    while proc.poll() == None:
+        if len(score_values_to_test) == 0:
+            time.sleep(0.1)
+            continue
+
+        goal.current_value = score_values_to_test.pop(0)
+        expect_increase = goal.current_value < goal.target_value
+
+        err = kdamonds.kdamonds[0].commit_schemes_quota_goals()
+        if err is not None:
+            print('commit_schemes_quota_goals failed: %s' % err)
+            exit(1)
+
+        err = kdamonds.kdamonds[0].update_schemes_effective_quotas()
+        if err is not None:
+            print('before-update_schemes_effective_quotas failed: %s' % err)
+            exit(1)
+        last_effective_bytes = goal.effective_bytes
+
+        time.sleep(0.5)
+
+        err = kdamonds.kdamonds[0].update_schemes_effective_quotas()
+        if err is not None:
+            print('after-update_schemes_effective_quotas failed: %s' % err)
+            exit(1)
+
+        print('score: %s, effective quota: %d -> %d (%.3fx)' % (
+            goal.current_value, last_effective_bytes, goal.effective_bytes,
+            goal.effective_bytes / last_effective_bytes
+            if last_effective_bytes != 0 else -1.0))
+
+        if last_effective_bytes == goal.effective_bytes:
+            print('efective bytes not changed: %d' % goal.effective_bytes)
+            exit(1)
+
+        increased = last_effective_bytes < goal.effective_bytes
+        if expect_increase != increased:
+            print('expectation of increase (%s) != increased (%s)' %
+                  (expect_increase, increased))
+            exit(1)
+        last_effective_bytes = goal.effective_bytes
+
+if __name__ == '__main__':
+    main()
--- a/tools/testing/selftests/damon/Makefile~selftests-damon-add-a-test-for-damos-quota-goal
+++ a/tools/testing/selftests/damon/Makefile
@@ -16,7 +16,7 @@ TEST_PROGS += debugfs_target_ids_pid_lea
 TEST_PROGS += sysfs.sh sysfs_update_removed_scheme_dir.sh
 TEST_PROGS += sysfs_update_schemes_tried_regions_hang.py
 TEST_PROGS += sysfs_update_schemes_tried_regions_wss_estimation.py
-TEST_PROGS += damos_quota.py damos_apply_interval.py
+TEST_PROGS += damos_quota.py damos_quota_goal.py damos_apply_interval.py
 TEST_PROGS += reclaim.sh lru_sort.sh
 
 include ../lib.mk
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 14%]

* [merged mm-stable] selftests-damon-_damon_sysfs-support-quota-goals.patch removed from -mm tree
@ 2024-05-11 22:42  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:42 UTC (permalink / raw)
  To: mm-commits, shuah, sj, akpm


The quilt patch titled
     Subject: selftests/damon/_damon_sysfs: support quota goals
has been removed from the -mm tree.  Its filename was
     selftests-damon-_damon_sysfs-support-quota-goals.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: selftests/damon/_damon_sysfs: support quota goals
Date: Thu, 2 May 2024 10:27:17 -0700

Patch series "selftests/damon: add DAMOS quota goal test".

Extend DAMON selftest-purpose sysfs wrapper to support DAMOS quota goal,
and implement a simple selftest for the feature using it.


This patch (of 2):

The DAMON sysfs test purpose wrapper, _damon_sysfs.py, is not supporting
quota goals.  Implement the support for testing the feature.  The test
will be implemented and added by the following commit.

Link: https://lkml.kernel.org/r/20240502172718.74166-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20240502172718.74166-2-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/damon/_damon_sysfs.py |   84 +++++++++++++++-
 1 file changed, 83 insertions(+), 1 deletion(-)

--- a/tools/testing/selftests/damon/_damon_sysfs.py~selftests-damon-_damon_sysfs-support-quota-goals
+++ a/tools/testing/selftests/damon/_damon_sysfs.py
@@ -70,16 +70,56 @@ class DamosAccessPattern:
         if err != None:
             return err
 
+qgoal_metric_user_input = 'user_input'
+qgoal_metric_some_mem_psi_us = 'some_mem_psi_us'
+qgoal_metrics = [qgoal_metric_user_input, qgoal_metric_some_mem_psi_us]
+
+class DamosQuotaGoal:
+    metric = None
+    target_value = None
+    current_value = None
+    effective_bytes = None
+    quota = None            # owner quota
+    idx = None
+
+    def __init__(self, metric, target_value=10000, current_value=0):
+        self.metric = metric
+        self.target_value = target_value
+        self.current_value = current_value
+
+    def sysfs_dir(self):
+        return os.path.join(self.quota.sysfs_dir(), 'goals', '%d' % self.idx)
+
+    def stage(self):
+        err = write_file(os.path.join(self.sysfs_dir(), 'target_metric'),
+                         self.metric)
+        if err is not None:
+            return err
+        err = write_file(os.path.join(self.sysfs_dir(), 'target_value'),
+                         self.target_value)
+        if err is not None:
+            return err
+        err = write_file(os.path.join(self.sysfs_dir(), 'current_value'),
+                         self.current_value)
+        if err is not None:
+            return err
+        return None
+
 class DamosQuota:
     sz = None                   # size quota, in bytes
     ms = None                   # time quota
+    goals = None                # quota goals
     reset_interval_ms = None    # quota reset interval
     scheme = None               # owner scheme
 
-    def __init__(self, sz=0, ms=0, reset_interval_ms=0):
+    def __init__(self, sz=0, ms=0, goals=None, reset_interval_ms=0):
         self.sz = sz
         self.ms = ms
         self.reset_interval_ms = reset_interval_ms
+        self.goals = goals if goals is not None else []
+        for idx, goal in enumerate(self.goals):
+            goal.idx = idx
+            goal.quota = self
 
     def sysfs_dir(self):
         return os.path.join(self.scheme.sysfs_dir(), 'quotas')
@@ -96,6 +136,20 @@ class DamosQuota:
         if err != None:
             return err
 
+        nr_goals_file = os.path.join(self.sysfs_dir(), 'goals', 'nr_goals')
+        content, err = read_file(nr_goals_file)
+        if err is not None:
+            return err
+        if int(content) != len(self.goals):
+            err = write_file(nr_goals_file, len(self.goals))
+            if err is not None:
+                return err
+        for goal in self.goals:
+            err = goal.stage()
+            if err is not None:
+                return err
+        return None
+
 class DamosStats:
     nr_tried = None
     sz_tried = None
@@ -361,6 +415,34 @@ class Kdamond:
                     stat_values.append(int(content))
                 scheme.stats = DamosStats(*stat_values)
 
+    def update_schemes_effective_quotas(self):
+        err = write_file(os.path.join(self.sysfs_dir(), 'state'),
+                         'update_schemes_effective_quotas')
+        if err is not None:
+            return err
+        for context in self.contexts:
+            for scheme in context.schemes:
+                for goal in scheme.quota.goals:
+                    content, err = read_file(
+                            os.path.join(scheme.quota.sysfs_dir(),
+                                         'effective_bytes'))
+                    if err is not None:
+                        return err
+                    goal.effective_bytes = int(content)
+        return None
+
+    def commit_schemes_quota_goals(self):
+        for context in self.contexts:
+            for scheme in context.schemes:
+                for goal in scheme.quota.goals:
+                    err = goal.stage()
+                    if err is not None:
+                        print('commit_schemes_quota_goals failed stagign: %s'%
+                              err)
+                        exit(1)
+        return write_file(os.path.join(self.sysfs_dir(), 'state'),
+                         'commit_schemes_quota_goals')
+
 class Kdamonds:
     kdamonds = []
 
_

Patches currently in -mm which might be from sj@kernel.org are



^ permalink raw reply	[relevance 1%]

* Re: [PATCH] modules: Drop the .export_symbol section from the final modules
  @ 2024-05-11 22:41  0% ` Luis Chamberlain
  0 siblings, 0 replies; 200+ results
From: Luis Chamberlain @ 2024-05-11 22:41 UTC (permalink / raw)
  To: wangyao, Masahiro Yamada
  Cc: masahiroy, ainux.wang, linux-modules, linux-kernel

On Wed, Apr 17, 2024 at 01:35:30PM +0800, wangyao@lemote.com wrote:
> From: Wang Yao <wangyao@lemote.com>
> 
> Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")
> forget drop the .export_symbol section from the final modules.
> 
> Signed-off-by: Wang Yao <wangyao@lemote.com>

Masahiro, commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by
modpost") was your change, wanna address / take it through your
tree? It makes sense to me though.

  Luis

> ---
>  scripts/module.lds.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/module.lds.S b/scripts/module.lds.S
> index bf5bcf2836d8..89ff01a22634 100644
> --- a/scripts/module.lds.S
> +++ b/scripts/module.lds.S
> @@ -13,6 +13,7 @@ SECTIONS {
>  	/DISCARD/ : {
>  		*(.discard)
>  		*(.discard.*)
> +		*(.export_symbol)
>  	}
>  
>  	__ksymtab		0 : { *(SORT(___ksymtab+*)) }
> -- 
> 2.27.0
> 

^ permalink raw reply	[relevance 0%]

* [folded-merged] docs-mm-damon-design-use-a-list-for-supported-filters-fix.patch removed from -mm tree
@ 2024-05-11 22:40 25% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 22:40 UTC (permalink / raw)
  To: mm-commits, sfr, sj, akpm


The quilt patch titled
     Subject: Docs/mm/damon/design: fix build warning
has been removed from the -mm tree.  Its filename was
     docs-mm-damon-design-use-a-list-for-supported-filters-fix.patch

This patch was dropped because it was folded into docs-mm-damon-design-use-a-list-for-supported-filters.patch

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: Docs/mm/damon/design: fix build warning
Date: Tue, 7 May 2024 09:17:47 -0700

Commit b7138c7d40b0 ("Docs/mm/damon/design: use a list for supported
filters") of mm-unstable tree is causing below warning and error with
'make htmldocs'.

    Documentation/mm/damon/design.rst:482: ERROR: Unexpected indentation.
    Documentation/mm/damon/design.rst:483: WARNING: Block quote ends without a blank line; unexpected unindent.

The problem caused by wrong indentation for nested list items.  Fix the
wrong indentation.

Link: https://lkml.kernel.org/r/20240507161747.52430-1-sj@kernel.org
Fixes: b7138c7d40b0 ("Docs/mm/damon/design: use a list for supported filters")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/20240507162623.4d94d455@canb.auug.org.au
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/mm/damon/design.rst |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

--- a/Documentation/mm/damon/design.rst~docs-mm-damon-design-use-a-list-for-supported-filters-fix
+++ a/Documentation/mm/damon/design.rst
@@ -472,21 +472,21 @@ counted as the scheme has tried.  This d
 Below types of filters are currently supported.
 
 - anonymous page
-  - Applied to pages that containing data that not stored in files.
-  - Handled by operations set layer.  Supported by only ``paddr`` set.
+    - Applied to pages that containing data that not stored in files.
+    - Handled by operations set layer.  Supported by only ``paddr`` set.
 - memory cgroup
-  - Applied to pages that belonging to a given cgroup.
-  - Handled by operations set layer.  Supported by only ``paddr`` set.
+    - Applied to pages that belonging to a given cgroup.
+    - Handled by operations set layer.  Supported by only ``paddr`` set.
 - young page
-  - Applied to pages that are accessed after the last access check from the
-    scheme.
-  - Handled by operations set layer.  Supported by only ``paddr`` set.
+    - Applied to pages that are accessed after the last access check from the
+      scheme.
+    - Handled by operations set layer.  Supported by only ``paddr`` set.
 - address range
-  - Applied to pages that belonging to a given address range.
-  - Handled by the core logic.
+    - Applied to pages that belonging to a given address range.
+    - Handled by the core logic.
 - DAMON monitoring target
-  - Applied to pages that belonging to a given DAMON monitoring target.
-  - Handled by the core logic.
+    - Applied to pages that belonging to a given DAMON monitoring target.
+    - Handled by the core logic.
 
 
 Application Programming Interface
_

Patches currently in -mm which might be from sj@kernel.org are

selftests-damon-_damon_sysfs-support-quota-goals.patch
selftests-damon-add-a-test-for-damos-quota-goal.patch
mm-damon-core-initialize-esz_bp-from-damos_quota_init_priv.patch
selftests-damon-_damon_sysfs-check-errors-from-nr_schemes-file-reads.patch
selftests-damon-_damon_sysfs-find-sysfs-mount-point-from-proc-mounts.patch
selftests-damon-_damon_sysfs-use-is-instead-of-==-for-none.patch
selftests-damon-classify-tests-for-functionalities-and-regressions.patch
docs-admin-guide-mm-damon-usage-fix-wrong-example-of-damos-filter-matching-sysfs-file.patch
docs-admin-guide-mm-damon-usage-fix-wrong-schemes-effective-quota-update-command.patch
docs-mm-damon-design-use-a-list-for-supported-filters.patch
docs-mm-damon-maintainer-profile-change-the-maintainers-timezone-from-pst-to-pt.patch
docs-mm-damon-maintainer-profile-allow-posting-patches-based-on-damon-next-tree.patch


^ permalink raw reply	[relevance 25%]

* Re: [PATCH v4 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log()
  @ 2024-05-11 22:35  1% ` kernel test robot
  0 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 22:35 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: llvm, oe-kbuild-all

Hi Ilpo,

kernel test robot noticed the following build errors:

[auto build test ERROR on pci/next]
[also build test ERROR on pci/for-linus linus/master v6.9-rc7 next-20240510]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ilpo-J-rvinen/PCI-Don-t-expose-pcie_read_tlp_log-outside-of-PCI-subsystem/20240510-181053
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20240510100730.18805-7-ilpo.jarvinen%40linux.intel.com
patch subject: [PATCH v4 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log()
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20240512/202405120622.EamQ5vz3-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120622.EamQ5vz3-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120622.EamQ5vz3-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pci/pcie/tlp.c:34:12: error: no member named 'dpc_rp_log_size' in 'struct pci_dev'
      34 |         if (pdev->dpc_rp_log_size >= 5)
         |             ~~~~  ^
   drivers/pci/pcie/tlp.c:35:16: error: no member named 'dpc_rp_log_size' in 'struct pci_dev'
      35 |                 return pdev->dpc_rp_log_size - 1;
         |                        ~~~~  ^
   drivers/pci/pcie/tlp.c:37:15: error: no member named 'dpc_rp_log_size' in 'struct pci_dev'
      37 |         return pdev->dpc_rp_log_size;
         |                ~~~~  ^
   3 errors generated.


vim +34 drivers/pci/pcie/tlp.c

    24	
    25	/**
    26	 * dpc_tlp_log_len - Calculates DPC RP PIO TLP Header/Prefix Log length
    27	 * @dev: PCIe device
    28	 *
    29	 * Return: TLP Header/Prefix Log length
    30	 */
    31	unsigned int dpc_tlp_log_len(struct pci_dev *pdev)
    32	{
    33		/* Remove ImpSpec Log register from the count */
  > 34		if (pdev->dpc_rp_log_size >= 5)
    35			return pdev->dpc_rp_log_size - 1;
    36	
    37		return pdev->dpc_rp_log_size;
    38	}
    39	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* [PATCH v2] docs: document python version used for compilation
@ 2024-05-11 22:32  1% Dmitry Baryshkov
  0 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:32 UTC (permalink / raw)
  To: Jonathan Corbet, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten
  Cc: workflows, linux-doc, linux-kernel, Masahiro Yamada,
	linux-arm-msm, dri-devel, freedreno, Jon Hunter

The drm/msm driver had adopted using Python3 script to generate register
header files instead of shipping pre-generated header files. Document
the minimal Python version supported by the script. Per request by Jon
Hunter, the script is required to be compatible with Python 3.5.

Python is documented as an optional dependency, as it is required only
in a limited set of kernel configurations (following the example of
other optional dependencies).

Cc: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Depends: https://lore.kernel.org/dri-devel/20240507230440.3384949-1-quic_abhinavk@quicinc.com/
---
Changes in v2:
- Expanded documentation for the Python usage.
- Link to v1: https://lore.kernel.org/r/20240509-python-version-v1-1-a7dda3a95b5f@linaro.org
---
 Documentation/process/changes.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index 5685d7bfe4d0..30f17e3f954f 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -63,6 +63,7 @@ cpio                   any              cpio --version
 GNU tar                1.28             tar --version
 gtags (optional)       6.6.5            gtags --version
 mkimage (optional)     2017.01          mkimage --version
+Python (optional)      3.5.x            python3 --version
 ====================== ===============  ========================================
 
 .. [#f1] Sphinx is needed only to build the Kernel documentation
@@ -198,6 +199,13 @@ platforms. The tool is available via the ``u-boot-tools`` package or can be
 built from the U-Boot source code. See the instructions at
 https://docs.u-boot.org/en/latest/build/tools.html#building-tools-for-linux
 
+Python
+------
+
+Python is required to generate register headers for the drm/msm driver or to
+build the linker script if the kernel is built using Clang compiler if LTO
+(Link Time Optimisation) is enabled.
+
 System utilities
 ****************
 

---
base-commit: e8bd80985f8ed4c04e36209228163fcf06496763
change-id: 20240509-python-version-a8b6ca2125ff

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply related	[relevance 1%]

* [Buildroot] [git commit] package/libnss: bump version to 3.100
@ 2024-05-11 22:23  1% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 22:23 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=e22e55abe471fabb9cdbdde1d63d1f5bbabe56df
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/libnss/libnss.hash | 4 ++--
 package/libnss/libnss.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libnss/libnss.hash b/package/libnss/libnss.hash
index 8c7c807f79..1a69398f0d 100644
--- a/package/libnss/libnss.hash
+++ b/package/libnss/libnss.hash
@@ -1,4 +1,4 @@
-# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_99_RTM/src/SHA256SUMS
-sha256  5cd5c2c8406a376686e6fa4b9c2de38aa280bea07bf927c0d521ba07c88b09bd  nss-3.99.tar.gz
+# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_100_RTM/src/SHA256SUMS
+sha256  1e35373ce9cb5b776f678bb341b0625c437520d09ebd91d1abd622e072e38d88  nss-3.100.tar.gz
 # Locally calculated
 sha256  a20c1a32d1f8102432360b42e932869f7c11c7cdbacf9cac554c422132af47f4  nss/COPYING
diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
index 671228ec8f..944089ae09 100644
--- a/package/libnss/libnss.mk
+++ b/package/libnss/libnss.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBNSS_VERSION = 3.99
+LIBNSS_VERSION = 3.100
 LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz
 LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(subst .,_,$(LIBNSS_VERSION))_RTM/src
 LIBNSS_DISTDIR = dist
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 1%]

* [PATCH] ip(7), ipv6(7): small fixes: network byte order, etc
@ 2024-05-11 22:16  1% Askar Safin
  0 siblings, 0 replies; 200+ results
From: Askar Safin @ 2024-05-11 22:16 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

Signed-off-by: Askar Safin <safinaskar@zohomail.com>
---
 man/man7/ip.7   |  2 +-
 man/man7/ipv6.7 | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/man/man7/ip.7 b/man/man7/ip.7
index 4fc9bde..8678979 100644
--- a/man/man7/ip.7
+++ b/man/man7/ip.7
@@ -198,7 +198,7 @@ The
 member of
 .I struct in_addr
 contains the host interface address in network byte order.
-.I in_addr
+.I s_addr
 should be assigned one of the
 .B INADDR_*
 values
diff --git a/man/man7/ipv6.7 b/man/man7/ipv6.7
index d9241cc..e38658f 100644
--- a/man/man7/ipv6.7
+++ b/man/man7/ipv6.7
@@ -105,7 +105,7 @@ Only differences are described in this man page.
 .P
 To bind an
 .B AF_INET6
-socket to any process, the local address should be copied from the
+socket to any interface, the address should be copied from the
 .I in6addr_any
 variable which has
 .I in6_addr
@@ -138,14 +138,14 @@ its source address will be mapped to v6.
 .EX
 struct sockaddr_in6 {
     sa_family_t     sin6_family;   /* AF_INET6 */
-    in_port_t       sin6_port;     /* port number */
+    in_port_t       sin6_port;     /* port number in network byte order */
     uint32_t        sin6_flowinfo; /* IPv6 flow information */
     struct in6_addr sin6_addr;     /* IPv6 address */
     uint32_t        sin6_scope_id; /* Scope ID (new in Linux 2.4) */
 };
 \&
 struct in6_addr {
-    unsigned char   s6_addr[16];   /* IPv6 address */
+    unsigned char   s6_addr[16];   /* IPv6 address in network byte order */
 };
 .EE
 .in
@@ -154,14 +154,14 @@ struct in6_addr {
 is always set to
 .BR AF_INET6 ;
 .I sin6_port
-is the protocol port (see
+is the protocol port in network byte order (see
 .I sin_port
 in
 .BR ip (7));
 .I sin6_flowinfo
 is the IPv6 flow identifier;
 .I sin6_addr
-is the 128-bit IPv6 address.
+is the 128-bit IPv6 address in network byte order.
 .I sin6_scope_id
 is an ID depending on the scope of the address.
 It is new in Linux 2.4.
-- 
2.43.0


^ permalink raw reply related	[relevance 1%]

* [Buildroot] [git commit] docs/website/index.html: refer to Gitlab and lore
@ 2024-05-11 22:17 14% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 22:17 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=3e3bcd633875db0e1f366e86fe8763b5b2d9112e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Our index.html page still points to git.buildroot.net as the Git
repository, and to the defunct gmane for the mailing list
activity. Fix these by pointing to Gitlab and lore respectively.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 docs/website/index.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/website/index.html b/docs/website/index.html
index 300adbb83d..d68436c721 100644
--- a/docs/website/index.html
+++ b/docs/website/index.html
@@ -133,14 +133,14 @@
   <div class="row">
     <div class="col-sm-6">
       <div class="panel panel-primary">
-	<div class="panel-heading"><a href="http://git.buildroot.net/buildroot"><h5>Recent commits</h5></a></div>
+	<div class="panel-heading"><a href="https://gitlab.com/buildroot.org/buildroot/"><h5>Recent commits</h5></a></div>
 	<div class="panel-box panel-body ellipsis" id="commit-activity">
 	</div>
       </div>
     </div>
     <div class="col-sm-6" >
       <div class="panel panel-primary">
-	<div class="panel-heading"><a href="http://dir.gmane.org/gmane.comp.lib.uclibc.buildroot"><h5>Recent discussions</h5></a></div>
+	<div class="panel-heading"><a href="https://lore.kernel.org/buildroot/"><h5>Recent discussions</h5></a></div>
 	<div class="panel-box panel-body ellipsis" id="mailing-list-activity">
 	</div>
       </div>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 14%]

* Re: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
                     ` (2 preceding siblings ...)
  2024-05-11 19:18  1% ` kernel test robot
@ 2024-05-11 22:14  1% ` kernel test robot
  3 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 22:14 UTC (permalink / raw)
  To: Yasin Lee, jic23
  Cc: oe-kbuild-all, lars, swboyd, nuno.a, andy.shevchenko,
	u.kleine-koenig, linux-iio, linux-kernel, yasin.lee.x,
	yasin.lee.x

Hi Yasin,

kernel test robot noticed the following build errors:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.9-rc7 next-20240510]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yasin-Lee/iio-proximity-hx9031as-Add-TYHX-HX9031AS-HX9023S-sensor-driver/20240510-173839
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/SN7PR12MB8101EDFA7F91A59761095A28A4E72%40SN7PR12MB8101.namprd12.prod.outlook.com
patch subject: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
config: i386-randconfig-054-20240512 (https://download.01.org/0day-ci/archive/20240512/202405120555.YC05dspc-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120555.YC05dspc-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120555.YC05dspc-lkp@intel.com/

All errors (new ones prefixed by >>, old ones prefixed by <<):

WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp1255.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-14.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-gaelic.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-romanian.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-roman.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_ucs2_utils.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8data.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8-selftest.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/smb/common/cifs_arc4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/smb/common/cifs_md4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/trusted-keys/trusted.o
WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/encrypted-keys/encrypted-keys.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hexdump.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/find_bit_benchmark.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_firmware.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ida.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_module.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_scanf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_bitmap.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_xarray.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_memcat_p.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_meminit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_objpool.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpio/gpio-mc33880.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/pci-stub.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_accel.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_DAC1064.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_Ti3026.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/vfb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/da9121-regulator.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/max20411-regulator.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/tps6286x-regulator.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/goldfish.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/ati-agp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/amd-k7-agp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/intel-agp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/intel-gtt.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/nvidia-agp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/sis-agp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/sworks-agp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/dtlk.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-w1.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/timberdale.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cxl/cxl_pci.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spi/spi-altera-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/hisi-spmi-controller.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/touchscreen/cyttsp_i2c_common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-goldfish.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/tuners/tda9887.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/rc/rc-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/watchdog/menz69_wdt.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/cbmem.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-a4tech.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-apple.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-aureal.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-belkin.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-cherry.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-cypress.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-dr.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-emsff.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-elecom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-evision.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-gyration.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-ite.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-kensington.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-kye.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-lcpower.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-lenovo.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-maltron.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-mf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-microsoft.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-monterey.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-pl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-petalynx.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-primax.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-semitek.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-speedlink.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-gaff.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-tivo.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-topseed.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-twinhan.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-zpff.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-viewsonic.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/goldfish/goldfish_pipe.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_simpleondemand.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_powersave.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_userspace.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/cxl_pmu.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-gpio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-scom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/chips/cfi_util.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/maps/map_funcs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_cif.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_aec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_netx.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_mf624.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/pcmcia_rsrc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iio/buffer/kfifo_buf.o
>> ERROR: modpost: "__udivdi3" [drivers/iio/proximity/hx9031as.ko] undefined!

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* drivers/of/unittest.c:1195 of_unittest_reg() error: uninitialized symbol 'addr'.
@ 2024-05-11 22:04  1% kernel test robot
  0 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 22:04 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Frank Rowand <frowand.list@gmail.com>
CC: Rob Herring <robh@kernel.org>
CC: Stephen Boyd <sboyd@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cf87f46fd34d6c19283d9625a7822f20d90b64a4
commit: 7b937cc243e5b1df8780a0aa743ce800df6c68d1 of: Create of_root if no dtb provided by firmware
date:   9 weeks ago
:::::: branch date: 24 hours ago
:::::: commit date: 9 weeks ago
config: sparc-randconfig-r081-20240512 (https://download.01.org/0day-ci/archive/20240512/202405120620.HFCq9U8K-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202405120620.HFCq9U8K-lkp@intel.com/

New smatch warnings:
drivers/of/unittest.c:1195 of_unittest_reg() error: uninitialized symbol 'addr'.

Old smatch warnings:
drivers/of/unittest.c:854 of_unittest_changeset() error: potential null dereference 'n1'.  (__of_node_dup returns null)
drivers/of/unittest.c:855 of_unittest_changeset() error: potential null dereference 'n2'.  (__of_node_dup returns null)
drivers/of/unittest.c:856 of_unittest_changeset() error: potential null dereference 'n21'.  (__of_node_dup returns null)
drivers/of/unittest.c:1283 of_unittest_parse_interrupts() warn: bitwise AND condition is false here
drivers/of/unittest.c:1360 of_unittest_parse_interrupts_extended() warn: bitwise AND condition is false here
drivers/of/unittest.c:1522 of_unittest_platform_populate() warn: bitwise AND condition is false here

vim +/addr +1195 drivers/of/unittest.c

3d5089c4263d35 Rob Herring 2023-03-28  1179  
ff61bacd77f258 Rob Herring 2023-03-28  1180  static void __init of_unittest_reg(void)
ff61bacd77f258 Rob Herring 2023-03-28  1181  {
ff61bacd77f258 Rob Herring 2023-03-28  1182  	struct device_node *np;
ff61bacd77f258 Rob Herring 2023-03-28  1183  	int ret;
ff61bacd77f258 Rob Herring 2023-03-28  1184  	u64 addr, size;
ff61bacd77f258 Rob Herring 2023-03-28  1185  
ff61bacd77f258 Rob Herring 2023-03-28  1186  	np = of_find_node_by_path("/testcase-data/address-tests/bus@80000000/device@1000");
ff61bacd77f258 Rob Herring 2023-03-28  1187  	if (!np) {
ff61bacd77f258 Rob Herring 2023-03-28  1188  		pr_err("missing testcase data\n");
ff61bacd77f258 Rob Herring 2023-03-28  1189  		return;
ff61bacd77f258 Rob Herring 2023-03-28  1190  	}
ff61bacd77f258 Rob Herring 2023-03-28  1191  
ff61bacd77f258 Rob Herring 2023-03-28  1192  	ret = of_property_read_reg(np, 0, &addr, &size);
ff61bacd77f258 Rob Herring 2023-03-28  1193  	unittest(!ret, "of_property_read_reg(%pOF) returned error %d\n",
ff61bacd77f258 Rob Herring 2023-03-28  1194  		np, ret);
ff61bacd77f258 Rob Herring 2023-03-28 @1195  	unittest(addr == 0x1000, "of_property_read_reg(%pOF) untranslated address (%llx) incorrect\n",
ff61bacd77f258 Rob Herring 2023-03-28  1196  		np, addr);
ff61bacd77f258 Rob Herring 2023-03-28  1197  
ff61bacd77f258 Rob Herring 2023-03-28  1198  	of_node_put(np);
ff61bacd77f258 Rob Herring 2023-03-28  1199  }
ff61bacd77f258 Rob Herring 2023-03-28  1200  

:::::: The code at line 1195 was first introduced by commit
:::::: ff61bacd77f258bd2ed145efb69e5449b115d4fe of/address: Add of_property_read_reg() helper

:::::: TO: Rob Herring <robh@kernel.org>
:::::: CC: Rob Herring <robh@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* [PATCH v4 9/9] arm64: dts: qcom: sm8150-hdk: rename Type-C HS endpoints
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
                   ` (7 preceding siblings ...)
  2024-05-11 22:04  1% ` [PATCH v4 8/9] arm64: dts: qcom: x1e80100: " Dmitry Baryshkov
@ 2024-05-11 22:04  1% ` Dmitry Baryshkov
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

Follow other Qualcomm platforms and rename pm8150b_role_switch_in to
pm8150_hs_in. Corresponding port is described as HS port rather than
role switching.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts
index 6cb6f503fdac..e9b9abc18746 100644
--- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts
@@ -556,7 +556,7 @@ ports {
 
 			port@0 {
 				reg = <0>;
-				pm8150b_role_switch_in: endpoint {
+				pm8150b_hs_in: endpoint {
 					remote-endpoint = <&usb_1_dwc3_hs>;
 				};
 			};
@@ -708,7 +708,7 @@ &usb_1_dwc3 {
 };
 
 &usb_1_dwc3_hs {
-	remote-endpoint = <&pm8150b_role_switch_in>;
+	remote-endpoint = <&pm8150b_hs_in>;
 };
 
 &usb_1_dwc3_ss {

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v4 8/9] arm64: dts: qcom: x1e80100: describe USB signals properly
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
                   ` (6 preceding siblings ...)
  2024-05-11 22:04  1% ` [PATCH v4 7/9] arm64: dts: qcom: sc8280xp: " Dmitry Baryshkov
@ 2024-05-11 22:04  1% ` Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 9/9] arm64: dts: qcom: sm8150-hdk: rename Type-C HS endpoints Dmitry Baryshkov
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

Follow example of other platforms. Rename HS graph nodes to contain
'dwc3_hs' and link SS lanes from DWC3 controllers to QMP PHYs.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 149 +++++++++++++++++++++++++++++++--
 1 file changed, 141 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 5f90a0b3c016..cf8d8d5b1870 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -2543,6 +2543,33 @@ usb_1_ss0_qmpphy: phy@fd5000 {
 			#phy-cells = <1>;
 
 			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					usb_1_ss0_qmpphy_out: endpoint {
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					usb_1_ss0_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_1_ss0_dwc3_ss>;
+					};
+				};
+
+				port@2 {
+					reg = <2>;
+
+					usb_1_ss0_qmpphy_dp_in: endpoint {
+					};
+				};
+			};
 		};
 
 		usb_1_ss1_hsphy: phy@fd9000 {
@@ -2583,6 +2610,33 @@ usb_1_ss1_qmpphy: phy@fda000 {
 			#phy-cells = <1>;
 
 			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					usb_1_ss1_qmpphy_out: endpoint {
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					usb_1_ss1_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_1_ss1_dwc3_ss>;
+					};
+				};
+
+				port@2 {
+					reg = <2>;
+
+					usb_1_ss1_qmpphy_dp_in: endpoint {
+					};
+				};
+			};
 		};
 
 		usb_1_ss2_hsphy: phy@fde000 {
@@ -2623,6 +2677,33 @@ usb_1_ss2_qmpphy: phy@fdf000 {
 			#phy-cells = <1>;
 
 			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					usb_1_ss2_qmpphy_out: endpoint {
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					usb_1_ss2_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_1_ss2_dwc3_ss>;
+					};
+				};
+
+				port@2 {
+					reg = <2>;
+
+					usb_1_ss2_qmpphy_dp_in: endpoint {
+					};
+				};
+			};
 		};
 
 		cnoc_main: interconnect@1500000 {
@@ -3445,8 +3526,23 @@ usb_1_ss2_dwc3: usb@a000000 {
 
 				dma-coherent;
 
-				port {
-					usb_1_ss2_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_1_ss2_dwc3_hs: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_1_ss2_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_1_ss2_qmpphy_usb_ss_in>;
+						};
 					};
 				};
 			};
@@ -3514,8 +3610,15 @@ usb_2_dwc3: usb@a200000 {
 				phy-names = "usb2-phy";
 				maximum-speed = "high-speed";
 
-				port {
-					usb_2_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_2_dwc3_hs: endpoint {
+						};
 					};
 				};
 			};
@@ -3590,8 +3693,23 @@ usb_1_ss0_dwc3: usb@a600000 {
 
 				dma-coherent;
 
-				port {
-					usb_1_ss0_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_1_ss0_dwc3_hs: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_1_ss0_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_1_ss0_qmpphy_usb_ss_in>;
+						};
 					};
 				};
 			};
@@ -3673,8 +3791,23 @@ usb_1_ss1_dwc3: usb@a800000 {
 
 				dma-coherent;
 
-				port {
-					usb_1_ss1_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_1_ss1_dwc3_hs: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_1_ss1_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_1_ss1_qmpphy_usb_ss_in>;
+						};
 					};
 				};
 			};

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v4 7/9] arm64: dts: qcom: sc8280xp: describe USB signals properly
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
                   ` (5 preceding siblings ...)
  2024-05-11 22:04  1% ` [PATCH v4 6/9] arm64: dts: qcom: sc8180x: describe USB signals properly Dmitry Baryshkov
@ 2024-05-11 22:04  1% ` Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 8/9] arm64: dts: qcom: x1e80100: " Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 9/9] arm64: dts: qcom: sm8150-hdk: rename Type-C HS endpoints Dmitry Baryshkov
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

Follow example of other platforms. Rename HS graph nodes to contain
'dwc3_hs' and link SS lanes from DWC3 controllers to QMP PHYs.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts          | 20 ++++----
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts     | 20 ++++----
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi             | 54 ++++++++++++++++++++--
 3 files changed, 70 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index 41215567b3ae..a2627ab4db9a 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -56,7 +56,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con0_hs: endpoint {
-						remote-endpoint = <&usb_0_role_switch>;
+						remote-endpoint = <&usb_0_dwc3_hs>;
 					};
 				};
 
@@ -91,7 +91,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con1_hs: endpoint {
-						remote-endpoint = <&usb_1_role_switch>;
+						remote-endpoint = <&usb_1_dwc3_hs>;
 					};
 				};
 
@@ -675,6 +675,10 @@ &usb_0_dwc3 {
 	dr_mode = "host";
 };
 
+&usb_0_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con0_hs>;
+};
+
 &usb_0_hsphy {
 	vdda-pll-supply = <&vreg_l9d>;
 	vdda18-supply = <&vreg_l1c>;
@@ -700,10 +704,6 @@ &usb_0_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con0_ss>;
 };
 
-&usb_0_role_switch {
-	remote-endpoint = <&pmic_glink_con0_hs>;
-};
-
 &usb_1 {
 	status = "okay";
 };
@@ -712,6 +712,10 @@ &usb_1_dwc3 {
 	dr_mode = "host";
 };
 
+&usb_1_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con1_hs>;
+};
+
 &usb_1_hsphy {
 	vdda-pll-supply = <&vreg_l4b>;
 	vdda18-supply = <&vreg_l1c>;
@@ -737,10 +741,6 @@ &usb_1_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con1_ss>;
 };
 
-&usb_1_role_switch {
-	remote-endpoint = <&pmic_glink_con1_hs>;
-};
-
 &xo_board_clk {
 	clock-frequency = <38400000>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index e937732abede..cd914fffcf06 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -117,7 +117,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con0_hs: endpoint {
-						remote-endpoint = <&usb_0_role_switch>;
+						remote-endpoint = <&usb_0_dwc3_hs>;
 					};
 				};
 
@@ -152,7 +152,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con1_hs: endpoint {
-						remote-endpoint = <&usb_1_role_switch>;
+						remote-endpoint = <&usb_1_dwc3_hs>;
 					};
 				};
 
@@ -1131,6 +1131,10 @@ &usb_0_dwc3 {
 	dr_mode = "host";
 };
 
+&usb_0_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con0_hs>;
+};
+
 &usb_0_hsphy {
 	vdda-pll-supply = <&vreg_l9d>;
 	vdda18-supply = <&vreg_l1c>;
@@ -1156,10 +1160,6 @@ &usb_0_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con0_ss>;
 };
 
-&usb_0_role_switch {
-	remote-endpoint = <&pmic_glink_con0_hs>;
-};
-
 &usb_1 {
 	status = "okay";
 };
@@ -1168,6 +1168,10 @@ &usb_1_dwc3 {
 	dr_mode = "host";
 };
 
+&usb_1_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con1_hs>;
+};
+
 &usb_1_hsphy {
 	vdda-pll-supply = <&vreg_l4b>;
 	vdda18-supply = <&vreg_l1c>;
@@ -1193,10 +1197,6 @@ &usb_1_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con1_ss>;
 };
 
-&usb_1_role_switch {
-	remote-endpoint = <&pmic_glink_con1_hs>;
-};
-
 &usb_2 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index 0549ba1fbeea..e87196b2ace0 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -3222,6 +3222,14 @@ port@0 {
 					usb_0_qmpphy_out: endpoint {};
 				};
 
+				port@1 {
+					reg = <1>;
+
+					usb_0_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_0_dwc3_ss>;
+					};
+				};
+
 				port@2 {
 					reg = <2>;
 
@@ -3275,6 +3283,14 @@ port@0 {
 					usb_1_qmpphy_out: endpoint {};
 				};
 
+				port@1 {
+					reg = <1>;
+
+					usb_1_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_ss>;
+					};
+				};
+
 				port@2 {
 					reg = <2>;
 
@@ -3560,8 +3576,23 @@ usb_0_dwc3: usb@a600000 {
 				phys = <&usb_0_hsphy>, <&usb_0_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
 
-				port {
-					usb_0_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_0_dwc3_hs: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_0_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_0_qmpphy_usb_ss_in>;
+						};
 					};
 				};
 			};
@@ -3622,8 +3653,23 @@ usb_1_dwc3: usb@a800000 {
 				phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
 
-				port {
-					usb_1_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_1_dwc3_hs: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_1_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_1_qmpphy_usb_ss_in>;
+						};
 					};
 				};
 			};

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v4 6/9] arm64: dts: qcom: sc8180x: describe USB signals properly
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2024-05-11 22:04  1% ` [PATCH v4 5/9] arm64: dts: qcom: sc8180x: switch USB+DP QMP PHYs to new bindings Dmitry Baryshkov
@ 2024-05-11 22:04  1% ` Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 7/9] arm64: dts: qcom: sc8280xp: " Dmitry Baryshkov
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

Follow example of other platforms. Rename HS graph nodes to contain
'dwc3_hs' and link SS lanes from DWC3 controllers to QMP PHYs.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 16 ++++----
 arch/arm64/boot/dts/qcom/sc8180x-primus.dts        | 20 +++++-----
 arch/arm64/boot/dts/qcom/sc8180x.dtsi              | 46 +++++++++++++++++++---
 3 files changed, 58 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
index 6af99116c715..5b226577f9d8 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
+++ b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
@@ -68,7 +68,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con0_hs: endpoint {
-						remote-endpoint = <&usb_prim_role_switch>;
+						remote-endpoint = <&usb_prim_dwc3_hs>;
 					};
 				};
 
@@ -103,7 +103,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con1_hs: endpoint {
-						remote-endpoint = <&usb_sec_role_switch>;
+						remote-endpoint = <&usb_sec_dwc3_hs>;
 					};
 				};
 
@@ -582,6 +582,10 @@ &usb_prim_dwc3 {
 	dr_mode = "host";
 };
 
+&usb_prim_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con0_hs>;
+};
+
 &usb_prim_qmpphy_dp_in {
 	remote-endpoint = <&mdss_dp0_out>;
 };
@@ -590,8 +594,8 @@ &usb_prim_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con0_ss>;
 };
 
-&usb_prim_role_switch {
-	remote-endpoint = <&pmic_glink_con0_hs>;
+&usb_sec_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con1_hs>;
 };
 
 &usb_sec_hsphy {
@@ -619,10 +623,6 @@ &usb_sec_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con1_ss>;
 };
 
-&usb_sec_role_switch {
-	remote-endpoint = <&pmic_glink_con1_hs>;
-};
-
 &usb_sec {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8180x-primus.dts b/arch/arm64/boot/dts/qcom/sc8180x-primus.dts
index bfee60c93ccc..65d923497a05 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x-primus.dts
+++ b/arch/arm64/boot/dts/qcom/sc8180x-primus.dts
@@ -71,7 +71,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con0_hs: endpoint {
-						remote-endpoint = <&usb_prim_role_switch>;
+						remote-endpoint = <&usb_prim_dwc3_hs>;
 					};
 				};
 
@@ -106,7 +106,7 @@ port@0 {
 					reg = <0>;
 
 					pmic_glink_con1_hs: endpoint {
-						remote-endpoint = <&usb_sec_role_switch>;
+						remote-endpoint = <&usb_sec_dwc3_hs>;
 					};
 				};
 
@@ -648,6 +648,10 @@ &usb_prim_dwc3 {
 	dr_mode = "host";
 };
 
+&usb_prim_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con0_hs>;
+};
+
 &usb_prim_qmpphy_dp_in {
 	remote-endpoint = <&mdss_dp0_out>;
 };
@@ -656,10 +660,6 @@ &usb_prim_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con0_ss>;
 };
 
-&usb_prim_role_switch {
-	remote-endpoint = <&pmic_glink_con0_hs>;
-};
-
 &usb_sec_hsphy {
 	vdda-pll-supply = <&vreg_l5e_0p88>;
 	vdda18-supply = <&vreg_l12a_1p8>;
@@ -685,10 +685,6 @@ &usb_sec_qmpphy_out {
 	remote-endpoint = <&pmic_glink_con1_ss>;
 };
 
-&usb_sec_role_switch {
-	remote-endpoint = <&pmic_glink_con1_hs>;
-};
-
 &usb_sec {
 	status = "okay";
 };
@@ -697,6 +693,10 @@ &usb_sec_dwc3 {
 	dr_mode = "host";
 };
 
+&usb_sec_dwc3_hs {
+	remote-endpoint = <&pmic_glink_con1_hs>;
+};
+
 &wifi {
 	memory-region = <&wlan_mem>;
 
diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
index 897c0f51a612..2d2cbbff4e13 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
@@ -2547,7 +2547,9 @@ port@0 {
 				port@1 {
 					reg = <1>;
 
-					usb_prim_qmpphy_usb_ss_in: endpoint {};
+					usb_prim_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_prim_dwc3_ss>;
+					};
 				};
 
 				port@2 {
@@ -2592,7 +2594,9 @@ port@0 {
 				port@1 {
 					reg = <1>;
 
-					usb_sec_qmpphy_usb_ss_in: endpoint {};
+					usb_sec_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_sec_dwc3_ss>;
+					};
 				};
 
 				port@2 {
@@ -2672,8 +2676,23 @@ usb_prim_dwc3: usb@a600000 {
 				phys = <&usb_prim_hsphy>, <&usb_prim_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
 
-				port {
-					usb_prim_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_prim_dwc3_hs: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_prim_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_prim_qmpphy_usb_ss_in>;
+						};
 					};
 				};
 			};
@@ -2729,8 +2748,23 @@ usb_sec_dwc3: usb@a800000 {
 				phys = <&usb_sec_hsphy>, <&usb_sec_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
 
-				port {
-					usb_sec_role_switch: endpoint {
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_sec_dwc3_hs: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_sec_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_sec_qmpphy_usb_ss_in>;
+						};
 					};
 				};
 			};

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v4 5/9] arm64: dts: qcom: sc8180x: switch USB+DP QMP PHYs to new bindings
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2024-05-11 22:04  5% ` [PATCH v4 4/9] arm64: dts: qcom: sm8250: add a link between DWC3 and QMP PHY Dmitry Baryshkov
@ 2024-05-11 22:04  1% ` Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 6/9] arm64: dts: qcom: sc8180x: describe USB signals properly Dmitry Baryshkov
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

To follow other Qualcomm platforms, update QMP USB+DP PHYs to use newer
bindings rather than old bindings which had PHYs as subdevices.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8180x.dtsi | 122 ++++++++++++----------------------
 1 file changed, 41 insertions(+), 81 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
index b92b6fb73057..897c0f51a612 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
@@ -12,6 +12,7 @@
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 #include <dt-bindings/interconnect/qcom,sc8180x.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/phy/phy-qcom-qmp.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
 #include <dt-bindings/thermal/thermal.h>
@@ -2511,28 +2512,25 @@ usb_sec_hsphy: phy@88e3000 {
 			status = "disabled";
 		};
 
-		usb_prim_qmpphy: phy@88e9000 {
+		usb_prim_qmpphy: phy@88e8000 {
 			compatible = "qcom,sc8180x-qmp-usb3-dp-phy";
-			reg = <0 0x088e9000 0 0x18c>,
-			      <0 0x088e8000 0 0x38>,
-			      <0 0x088ea000 0 0x40>;
-			reg-names = "reg-base", "dp_com";
+			reg = <0 0x088e8000 0 0x3000>;
+
 			clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
-				 <&rpmhcc RPMH_CXO_CLK>,
 				 <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
-				 <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
+				 <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+				 <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
 			clock-names = "aux",
-				      "ref_clk_src",
 				      "ref",
-				      "com_aux";
+				      "com_aux",
+				      "usb3_pipe";
+
 			resets = <&gcc GCC_USB3_DP_PHY_PRIM_SP0_BCR>,
 				 <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>;
 			reset-names = "phy", "common";
 
 			#clock-cells = <1>;
-			#address-cells = <2>;
-			#size-cells = <2>;
-			ranges;
+			#phy-cells = <1>;
 
 			status = "disabled";
 
@@ -2546,59 +2544,38 @@ port@0 {
 					usb_prim_qmpphy_out: endpoint {};
 				};
 
+				port@1 {
+					reg = <1>;
+
+					usb_prim_qmpphy_usb_ss_in: endpoint {};
+				};
+
 				port@2 {
 					reg = <2>;
 
 					usb_prim_qmpphy_dp_in: endpoint {};
 				};
 			};
-
-			usb_prim_ssphy: usb3-phy@88e9200 {
-				reg = <0 0x088e9200 0 0x200>,
-				      <0 0x088e9400 0 0x200>,
-				      <0 0x088e9c00 0 0x218>,
-				      <0 0x088e9600 0 0x200>,
-				      <0 0x088e9800 0 0x200>,
-				      <0 0x088e9a00 0 0x100>;
-				#phy-cells = <0>;
-				clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
-				clock-names = "pipe0";
-				clock-output-names = "usb3_prim_phy_pipe_clk_src";
-			};
-
-			usb_prim_dpphy: dp-phy@88ea200 {
-				reg = <0 0x088ea200 0 0x200>,
-				      <0 0x088ea400 0 0x200>,
-				      <0 0x088eaa00 0 0x200>,
-				      <0 0x088ea600 0 0x200>,
-				      <0 0x088ea800 0 0x200>;
-				#clock-cells = <1>;
-				#phy-cells = <0>;
-			};
 		};
 
 		usb_sec_qmpphy: phy@88ee000 {
 			compatible = "qcom,sc8180x-qmp-usb3-dp-phy";
-			reg = <0 0x088ee000 0 0x18c>,
-			      <0 0x088ed000 0 0x10>,
-			      <0 0x088ef000 0 0x40>;
-			reg-names = "reg-base", "dp_com";
+			reg = <0 0x088ed000 0 0x3000>;
+
 			clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
-				 <&rpmhcc RPMH_CXO_CLK>,
 				 <&gcc GCC_USB3_SEC_CLKREF_CLK>,
-				 <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
+				 <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>,
+				 <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
 			clock-names = "aux",
-				      "ref_clk_src",
 				      "ref",
-				      "com_aux";
+				      "com_aux",
+				      "usb3_pipe";
 			resets = <&gcc GCC_USB3_DP_PHY_SEC_BCR>,
 				 <&gcc GCC_USB3_PHY_SEC_BCR>;
 			reset-names = "phy", "common";
 
 			#clock-cells = <1>;
-			#address-cells = <2>;
-			#size-cells = <2>;
-			ranges;
+			#phy-cells = <1>;
 
 			status = "disabled";
 
@@ -2612,37 +2589,18 @@ port@0 {
 					usb_sec_qmpphy_out: endpoint {};
 				};
 
+				port@1 {
+					reg = <1>;
+
+					usb_sec_qmpphy_usb_ss_in: endpoint {};
+				};
+
 				port@2 {
 					reg = <2>;
 
 					usb_sec_qmpphy_dp_in: endpoint {};
 				};
 			};
-
-			usb_sec_ssphy: usb3-phy@88e9200 {
-				reg = <0 0x088ee200 0 0x200>,
-				      <0 0x088ee400 0 0x200>,
-				      <0 0x088eec00 0 0x218>,
-				      <0 0x088ee600 0 0x200>,
-				      <0 0x088ee800 0 0x200>,
-				      <0 0x088eea00 0 0x100>;
-				#phy-cells = <0>;
-				clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
-				clock-names = "pipe0";
-				clock-output-names = "usb3_sec_phy_pipe_clk_src";
-			};
-
-			usb_sec_dpphy: dp-phy@88ef200 {
-				reg = <0 0x088ef200 0 0x200>,
-				      <0 0x088ef400 0 0x200>,
-				      <0 0x088efa00 0 0x200>,
-				      <0 0x088ef600 0 0x200>,
-				      <0 0x088ef800 0 0x200>;
-				#clock-cells = <1>;
-				#phy-cells = <0>;
-				clock-output-names = "qmp_dptx1_phy_pll_link_clk",
-						     "qmp_dptx1_phy_pll_vco_div_clk";
-			};
 		};
 
 		system-cache-controller@9200000 {
@@ -2711,7 +2669,7 @@ usb_prim_dwc3: usb@a600000 {
 				iommus = <&apps_smmu 0x140 0>;
 				snps,dis_u2_susphy_quirk;
 				snps,dis_enblslpm_quirk;
-				phys = <&usb_prim_hsphy>, <&usb_prim_ssphy>;
+				phys = <&usb_prim_hsphy>, <&usb_prim_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
 
 				port {
@@ -2768,7 +2726,7 @@ usb_sec_dwc3: usb@a800000 {
 				iommus = <&apps_smmu 0x160 0>;
 				snps,dis_u2_susphy_quirk;
 				snps,dis_enblslpm_quirk;
-				phys = <&usb_sec_hsphy>, <&usb_sec_ssphy>;
+				phys = <&usb_sec_hsphy>, <&usb_sec_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
 
 				port {
@@ -3086,9 +3044,10 @@ mdss_dp0: displayport-controller@ae90000 {
 
 				assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
 						  <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
-				assigned-clock-parents = <&usb_prim_dpphy 0>, <&usb_prim_dpphy 1>;
+				assigned-clock-parents = <&usb_prim_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+							 <&usb_prim_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
 
-				phys = <&usb_prim_dpphy>;
+				phys = <&usb_prim_qmpphy QMP_USB43DP_DP_PHY>;
 				phy-names = "dp";
 
 				#sound-dai-cells = <0>;
@@ -3163,9 +3122,10 @@ mdss_dp1: displayport-controller@ae98000 {
 
 				assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK1_CLK_SRC>,
 						  <&dispcc DISP_CC_MDSS_DP_PIXEL2_CLK_SRC>;
-				assigned-clock-parents = <&usb_sec_dpphy 0>, <&usb_sec_dpphy 1>;
+				assigned-clock-parents = <&usb_sec_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+							 <&usb_sec_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
 
-				phys = <&usb_sec_dpphy>;
+				phys = <&usb_sec_qmpphy QMP_USB43DP_DP_PHY>;
 				phy-names = "dp";
 
 				#sound-dai-cells = <0>;
@@ -3312,12 +3272,12 @@ dispcc: clock-controller@af00000 {
 				 <&mdss_dsi0_phy 1>,
 				 <&mdss_dsi1_phy 0>,
 				 <&mdss_dsi1_phy 1>,
-				 <&usb_prim_dpphy 0>,
-				 <&usb_prim_dpphy 1>,
+				 <&usb_prim_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+				 <&usb_prim_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>,
 				 <&edp_phy 0>,
 				 <&edp_phy 1>,
-				 <&usb_sec_dpphy 0>,
-				 <&usb_sec_dpphy 1>;
+				 <&usb_sec_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+				 <&usb_sec_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
 			clock-names = "bi_tcxo",
 				      "dsi0_phy_pll_out_byteclk",
 				      "dsi0_phy_pll_out_dsiclk",

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v4 4/9] arm64: dts: qcom: sm8250: add a link between DWC3 and QMP PHY
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2024-05-11 22:04  1% ` [PATCH v4 3/9] arm64: dts: qcom: sm8250: describe HS signals properly Dmitry Baryshkov
@ 2024-05-11 22:04  5% ` Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 5/9] arm64: dts: qcom: sc8180x: switch USB+DP QMP PHYs to new bindings Dmitry Baryshkov
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

The SuperSpeed signals originate from the DWC3 host controller and then
are routed through the Combo QMP PHY, where they are multiplexed with
the DisplayPort signals. Add corresponding OF graph link.

Reported-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 0ec473ceb3d2..d6c8c6c2eced 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3947,6 +3947,10 @@ port@0 {
 
 				port@1 {
 					reg = <1>;
+
+					usb_1_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_ss_out>;
+					};
 				};
 
 				port@2 {
@@ -4225,8 +4229,24 @@ usb_1_dwc3: usb@a600000 {
 				phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
 
-				port {
-					usb_1_dwc3_hs_out: endpoint {};
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						usb_1_dwc3_hs_out: endpoint {
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						usb_1_dwc3_ss_out: endpoint {
+							remote-endpoint = <&usb_1_qmpphy_usb_ss_in>;
+						};
+					};
 				};
 			};
 		};

-- 
2.39.2


^ permalink raw reply related	[relevance 5%]

* [PATCH v4 3/9] arm64: dts: qcom: sm8250: describe HS signals properly
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
  2024-05-11 22:04  4% ` [PATCH v4 1/9] dt-bindings: clk: qcom,dispcc-sm8x50: describe additional DP clocks Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 2/9] arm64: dts: qcom: sc8180x: correct dispcc clocks Dmitry Baryshkov
@ 2024-05-11 22:04  1% ` Dmitry Baryshkov
  2024-05-11 22:04  5% ` [PATCH v4 4/9] arm64: dts: qcom: sm8250: add a link between DWC3 and QMP PHY Dmitry Baryshkov
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

The OF graph should describe physical signals. There is no 'role switch'
signal between Type-C connector and the DWC3 USB controller. Rename
endpoints to mention USB HS signal instead (this follows the example
lead by other plaforms, including QRB2210 RB1, QRB4210 RB2 and all PMIC
GLINK platforms).

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb5165-rb5.dts                 | 8 ++++----
 arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 8 ++++----
 arch/arm64/boot/dts/qcom/sm8250.dtsi                     | 2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
index cd0db4f31d4a..44239d1e57e9 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
@@ -1356,8 +1356,8 @@ &usb_1_dwc3 {
 	usb-role-switch;
 };
 
-&usb_1_role_switch_out {
-	remote-endpoint = <&pm8150b_role_switch_in>;
+&usb_1_dwc3_hs_out {
+	remote-endpoint = <&pm8150b_hs_in>;
 };
 
 &usb_1_hsphy {
@@ -1465,8 +1465,8 @@ ports {
 
 			port@0 {
 				reg = <0>;
-				pm8150b_role_switch_in: endpoint {
-					remote-endpoint = <&usb_1_role_switch_out>;
+				pm8150b_hs_in: endpoint {
+					remote-endpoint = <&usb_1_dwc3_hs_out>;
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 41f117474872..3596dd328c31 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -659,8 +659,8 @@ ports {
 			port@0 {
 				reg = <0>;
 
-				pm8150b_role_switch_in: endpoint {
-					remote-endpoint = <&usb_1_role_switch_out>;
+				pm8150b_hs_in: endpoint {
+					remote-endpoint = <&usb_1_dwc3_hs_out>;
 				};
 			};
 		};
@@ -725,8 +725,8 @@ &usb_1_hsphy {
 	status = "okay";
 };
 
-&usb_1_role_switch_out {
-	remote-endpoint = <&pm8150b_role_switch_in>;
+&usb_1_dwc3_hs_out {
+	remote-endpoint = <&pm8150b_hs_in>;
 };
 
 &ufs_mem_hc {
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 8ccade628f1f..0ec473ceb3d2 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4226,7 +4226,7 @@ usb_1_dwc3: usb@a600000 {
 				phy-names = "usb2-phy", "usb3-phy";
 
 				port {
-					usb_1_role_switch_out: endpoint {};
+					usb_1_dwc3_hs_out: endpoint {};
 				};
 			};
 		};

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v4 2/9] arm64: dts: qcom: sc8180x: correct dispcc clocks
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
  2024-05-11 22:04  4% ` [PATCH v4 1/9] dt-bindings: clk: qcom,dispcc-sm8x50: describe additional DP clocks Dmitry Baryshkov
@ 2024-05-11 22:04  1% ` Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 3/9] arm64: dts: qcom: sm8250: describe HS signals properly Dmitry Baryshkov
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

Correct the clocks being used by the display clock controller on the
SC8180X platform (to match the schema):
- Drop the sleep clock
- Add DSI clocks
- Reorder eDP / DP clocks

This changes the order of clocks, however it should be noted that the
clock list was neither correct nor followed the schema beforehand.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8180x.dtsi | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
index 067712310560..b92b6fb73057 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
@@ -3308,21 +3308,27 @@ dispcc: clock-controller@af00000 {
 			compatible = "qcom,sc8180x-dispcc";
 			reg = <0 0x0af00000 0 0x20000>;
 			clocks = <&rpmhcc RPMH_CXO_CLK>,
-				 <&sleep_clk>,
+				 <&mdss_dsi0_phy 0>,
+				 <&mdss_dsi0_phy 1>,
+				 <&mdss_dsi1_phy 0>,
+				 <&mdss_dsi1_phy 1>,
 				 <&usb_prim_dpphy 0>,
 				 <&usb_prim_dpphy 1>,
-				 <&usb_sec_dpphy 0>,
-				 <&usb_sec_dpphy 1>,
 				 <&edp_phy 0>,
-				 <&edp_phy 1>;
+				 <&edp_phy 1>,
+				 <&usb_sec_dpphy 0>,
+				 <&usb_sec_dpphy 1>;
 			clock-names = "bi_tcxo",
-				      "sleep_clk",
+				      "dsi0_phy_pll_out_byteclk",
+				      "dsi0_phy_pll_out_dsiclk",
+				      "dsi1_phy_pll_out_byteclk",
+				      "dsi1_phy_pll_out_dsiclk",
 				      "dp_phy_pll_link_clk",
 				      "dp_phy_pll_vco_div_clk",
-				      "dptx1_phy_pll_link_clk",
-				      "dptx1_phy_pll_vco_div_clk",
 				      "edp_phy_pll_link_clk",
-				      "edp_phy_pll_vco_div_clk";
+				      "edp_phy_pll_vco_div_clk",
+				      "dptx1_phy_pll_link_clk",
+				      "dptx1_phy_pll_vco_div_clk";
 			power-domains = <&rpmhpd SC8180X_MMCX>;
 			required-opps = <&rpmhpd_opp_low_svs>;
 			#clock-cells = <1>;

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v4 1/9] dt-bindings: clk: qcom,dispcc-sm8x50: describe additional DP clocks
  2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
@ 2024-05-11 22:04  4% ` Dmitry Baryshkov
  2024-05-11 22:04  1% ` [PATCH v4 2/9] arm64: dts: qcom: sc8180x: correct dispcc clocks Dmitry Baryshkov
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

On the affected Qualcomm platforms the display clock controller has
additional DP input clocks, describe them in DT schema.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../bindings/clock/qcom,dispcc-sm8x50.yaml         | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
index 59cc88a52f6b..5831579b572e 100644
--- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
@@ -27,6 +27,7 @@ properties:
       - qcom,sm8350-dispcc
 
   clocks:
+    minItems: 7
     items:
       - description: Board XO source
       - description: Byte clock from DSI PHY0
@@ -35,8 +36,15 @@ properties:
       - description: Pixel clock from DSI PHY1
       - description: Link clock from DP PHY
       - description: VCO DIV clock from DP PHY
+      - description: Link clock from eDP PHY
+      - description: VCO DIV clock from eDP PHY
+      - description: Link clock from DP1 PHY
+      - description: VCO DIV clock from DP1 PHY
+      - description: Link clock from DP2 PHY
+      - description: VCO DIV clock from DP2 PHY
 
   clock-names:
+    minItems: 7
     items:
       - const: bi_tcxo
       - const: dsi0_phy_pll_out_byteclk
@@ -45,6 +53,12 @@ properties:
       - const: dsi1_phy_pll_out_dsiclk
       - const: dp_phy_pll_link_clk
       - const: dp_phy_pll_vco_div_clk
+      - const: edp_phy_pll_link_clk
+      - const: edp_phy_pll_vco_div_clk
+      - const: dptx1_phy_pll_link_clk
+      - const: dptx1_phy_pll_vco_div_clk
+      - const: dptx2_phy_pll_link_clk
+      - const: dptx2_phy_pll_vco_div_clk
 
   '#clock-cells':
     const: 1
@@ -68,6 +82,20 @@ properties:
       A phandle to an OPP node describing required MMCX performance point.
     maxItems: 1
 
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: qcom,sc8180x-dispcc
+    then:
+      properties:
+        clocks:
+          maxItems: 7
+        clock-names:
+          maxItems: 7
+
 required:
   - compatible
   - reg

-- 
2.39.2


^ permalink raw reply related	[relevance 4%]

* [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals
@ 2024-05-11 22:04  1% Dmitry Baryshkov
  2024-05-11 22:04  4% ` [PATCH v4 1/9] dt-bindings: clk: qcom,dispcc-sm8x50: describe additional DP clocks Dmitry Baryshkov
                   ` (8 more replies)
  0 siblings, 9 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 22:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bryan O'Donoghue
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

Rename the HS link between usb-c-connector and the DWC3 USB controller.
Add missing graph connection between the QMP PHY and DWC3 USB
controller.

Reported-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v4:
- Rebased on top of next to remove conflict with USB MP patchset
- Fixed commit message (Bryan)
- Link to v3: https://lore.kernel.org/r/20240401-typec-fix-sm8250-v3-0-604dce3ad103@linaro.org

Changes in v3:
- Fixed dispcc bindings / clock inputs on sc8180x (Rob Herring)
- Link to v2: https://lore.kernel.org/r/20240331-typec-fix-sm8250-v2-0-857acb6bd88e@linaro.org

Changes in v2:
- Fixed other platforms in addition to sm8250 (Bryan)
- Link to v1: https://lore.kernel.org/r/20240322-typec-fix-sm8250-v1-0-1ac22b333ea9@linaro.org

---
Dmitry Baryshkov (9):
      dt-bindings: clk: qcom,dispcc-sm8x50: describe additional DP clocks
      arm64: dts: qcom: sc8180x: correct dispcc clocks
      arm64: dts: qcom: sm8250: describe HS signals properly
      arm64: dts: qcom: sm8250: add a link between DWC3 and QMP PHY
      arm64: dts: qcom: sc8180x: switch USB+DP QMP PHYs to new bindings
      arm64: dts: qcom: sc8180x: describe USB signals properly
      arm64: dts: qcom: sc8280xp: describe USB signals properly
      arm64: dts: qcom: x1e80100: describe USB signals properly
      arm64: dts: qcom: sm8150-hdk: rename Type-C HS endpoints

 .../bindings/clock/qcom,dispcc-sm8x50.yaml         |  28 ++++
 arch/arm64/boot/dts/qcom/qrb5165-rb5.dts           |   8 +-
 .../arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts |  16 +-
 arch/arm64/boot/dts/qcom/sc8180x-primus.dts        |  20 +--
 arch/arm64/boot/dts/qcom/sc8180x.dtsi              | 182 ++++++++++-----------
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts          |  20 +--
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts     |  20 +--
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi             |  54 +++++-
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts            |   4 +-
 .../boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi  |   8 +-
 arch/arm64/boot/dts/qcom/sm8250.dtsi               |  24 ++-
 arch/arm64/boot/dts/qcom/x1e80100.dtsi             | 149 ++++++++++++++++-
 12 files changed, 380 insertions(+), 153 deletions(-)
---
base-commit: 75fa778d74b786a1608d55d655d42b480a6fa8bd
change-id: 20240322-typec-fix-sm8250-33c47a03a056

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply	[relevance 1%]

* Re: [PATCH v7 04/14] iommu/arm-smmu-v3: Make changing domains be hitless for ATS
  @ 2024-05-11 21:56  1%     ` Nicolin Chen
  0 siblings, 0 replies; 200+ results
From: Nicolin Chen @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: iommu, Joerg Roedel, linux-arm-kernel, Robin Murphy, Will Deacon,
	Eric Auger, Jean-Philippe Brucker, Moritz Fischer,
	Michael Shavit, patches, Shameerali Kolothum Thodi

Hi Jason,

Overall this patch makes the driver look much cleaner. Just a
few small comments/nitpickings below.

On Wed, May 08, 2024 at 03:57:12PM -0300, Jason Gunthorpe wrote:


>  static void arm_smmu_v3_write_ste_test_s2_to_abort(struct kunit *test)
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 532fe17f28bfe5..01e970f6ee4363 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

> -static void arm_smmu_disable_ats(struct arm_smmu_master *master,
> -				 struct arm_smmu_domain *smmu_domain)
> -{
> -	if (!master->ats_enabled)
> -		return;
> -
> -	pci_disable_ats(to_pci_dev(master->dev));
> -	/*
> -	 * Ensure ATS is disabled at the endpoint before we issue the
> -	 * ATC invalidation via the SMMU.
> -	 */
> -	wmb();
> -	arm_smmu_atc_inv_master(master);
> -	atomic_dec(&smmu_domain->nr_ats_masters);
> -}
> -

Maybe we could keep the function for symmetry, since prepare()
still calls pci_disable_ats() + wmb()?

> +/*
> + * Prepare to attach a domain to a master. If disable_ats is not set this will
> + * turn on ATS if supported. smmu_domain can be NULL if the domain being

This function doesn't turn on ATS actually, but commit() does.

Should it be more accurate "If disable_ats is set this will turn
off ATS if enabled"?

> + * attached does not have a page table and does not require invalidation
> + * tracking.
> + */
> +static int arm_smmu_attach_prepare(struct arm_smmu_master *master,
> +				   struct iommu_domain *domain,
> +				   struct attach_state *state)
> +{
> +	struct arm_smmu_domain *smmu_domain =
> +		to_smmu_domain_devices(domain);

This could fit into a single line.

> -static int arm_smmu_attach_dev_ste(struct device *dev,
> -				   struct arm_smmu_ste *ste)
> +static int arm_smmu_attach_dev_ste(struct iommu_domain *domain,
> +				   struct device *dev, struct arm_smmu_ste *ste)

How about arm_smmu_domain_attach_dev_ste?

>  void arm_smmu_make_cdtable_ste(struct arm_smmu_ste *target,
> -			       struct arm_smmu_master *master);
> +			       struct arm_smmu_master *master,
> +			       bool ats_enabled);
>  void arm_smmu_make_s2_domain_ste(struct arm_smmu_ste *target,
>  				 struct arm_smmu_master *master,
> -				 struct arm_smmu_domain *smmu_domain);
> +				 struct arm_smmu_domain *smmu_domain,
> +				 bool ats_enabled);

We seem to pass state.want_ats all the time. So maybe just name
it "bool want_ats", given that "ats_enabled" is only true after
commit() that always comes after these two functions?

Thanks
Nicolin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[relevance 1%]

* Re: [PATCH v7 04/14] iommu/arm-smmu-v3: Make changing domains be hitless for ATS
@ 2024-05-11 21:56  1%     ` Nicolin Chen
  0 siblings, 0 replies; 200+ results
From: Nicolin Chen @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: iommu, Joerg Roedel, linux-arm-kernel, Robin Murphy, Will Deacon,
	Eric Auger, Jean-Philippe Brucker, Moritz Fischer,
	Michael Shavit, patches, Shameerali Kolothum Thodi

Hi Jason,

Overall this patch makes the driver look much cleaner. Just a
few small comments/nitpickings below.

On Wed, May 08, 2024 at 03:57:12PM -0300, Jason Gunthorpe wrote:


>  static void arm_smmu_v3_write_ste_test_s2_to_abort(struct kunit *test)
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 532fe17f28bfe5..01e970f6ee4363 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

> -static void arm_smmu_disable_ats(struct arm_smmu_master *master,
> -				 struct arm_smmu_domain *smmu_domain)
> -{
> -	if (!master->ats_enabled)
> -		return;
> -
> -	pci_disable_ats(to_pci_dev(master->dev));
> -	/*
> -	 * Ensure ATS is disabled at the endpoint before we issue the
> -	 * ATC invalidation via the SMMU.
> -	 */
> -	wmb();
> -	arm_smmu_atc_inv_master(master);
> -	atomic_dec(&smmu_domain->nr_ats_masters);
> -}
> -

Maybe we could keep the function for symmetry, since prepare()
still calls pci_disable_ats() + wmb()?

> +/*
> + * Prepare to attach a domain to a master. If disable_ats is not set this will
> + * turn on ATS if supported. smmu_domain can be NULL if the domain being

This function doesn't turn on ATS actually, but commit() does.

Should it be more accurate "If disable_ats is set this will turn
off ATS if enabled"?

> + * attached does not have a page table and does not require invalidation
> + * tracking.
> + */
> +static int arm_smmu_attach_prepare(struct arm_smmu_master *master,
> +				   struct iommu_domain *domain,
> +				   struct attach_state *state)
> +{
> +	struct arm_smmu_domain *smmu_domain =
> +		to_smmu_domain_devices(domain);

This could fit into a single line.

> -static int arm_smmu_attach_dev_ste(struct device *dev,
> -				   struct arm_smmu_ste *ste)
> +static int arm_smmu_attach_dev_ste(struct iommu_domain *domain,
> +				   struct device *dev, struct arm_smmu_ste *ste)

How about arm_smmu_domain_attach_dev_ste?

>  void arm_smmu_make_cdtable_ste(struct arm_smmu_ste *target,
> -			       struct arm_smmu_master *master);
> +			       struct arm_smmu_master *master,
> +			       bool ats_enabled);
>  void arm_smmu_make_s2_domain_ste(struct arm_smmu_ste *target,
>  				 struct arm_smmu_master *master,
> -				 struct arm_smmu_domain *smmu_domain);
> +				 struct arm_smmu_domain *smmu_domain,
> +				 bool ats_enabled);

We seem to pass state.want_ats all the time. So maybe just name
it "bool want_ats", given that "ats_enabled" is only true after
commit() that always comes after these two functions?

Thanks
Nicolin

^ permalink raw reply	[relevance 1%]

* [PATCH v8 4/5] soc: qcom: add pd-mapper implementation
  2024-05-11 21:56  1% [PATCH v8 0/5] soc: qcom: add in-kernel pd-mapper implementation Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2024-05-11 21:56  1% ` [PATCH v8 3/5] soc: qcom: pdr: extract PDR message marshalling data Dmitry Baryshkov
@ 2024-05-11 21:56  3% ` Dmitry Baryshkov
  2024-05-11 21:56  1% ` [PATCH v8 5/5] remoteproc: qcom: enable in-kernel PD mapper Dmitry Baryshkov
  4 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Sibi Sankar, Mathieu Poirier
  Cc: linux-arm-msm, linux-kernel, linux-remoteproc, Johan Hovold,
	Xilin Wu, Bryan O'Donoghue, Steev Klimaszewski,
	Alexey Minnekhanov

Existing userspace protection domain mapper implementation has several
issue. It doesn't play well with CONFIG_EXTRA_FIRMWARE, it doesn't
reread JSON files if firmware location is changed (or if firmware was
not available at the time pd-mapper was started but the corresponding
directory is mounted later), etc.

Provide in-kernel service implementing protection domain mapping
required to work with several services, which are provided by the DSP
firmware.

This module is loaded automatically by the remoteproc drivers when
necessary via the symbol dependency. It uses a root node to match a
protection domains map for a particular board. It is not possible to
implement it as a 'driver' as there is no corresponding device.

Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/soc/qcom/Kconfig          |  11 +
 drivers/soc/qcom/Makefile         |   1 +
 drivers/soc/qcom/pdr_internal.h   |  14 +
 drivers/soc/qcom/qcom_pd_mapper.c | 676 ++++++++++++++++++++++++++++++++++++++
 drivers/soc/qcom/qcom_pdr_msg.c   |  34 ++
 5 files changed, 736 insertions(+)

diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 95973c6b828f..0a2f2bfd7863 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -72,6 +72,17 @@ config QCOM_OCMEM
 	  requirements. This is typically used by the GPU, camera/video, and
 	  audio components on some Snapdragon SoCs.
 
+config QCOM_PD_MAPPER
+	tristate "Qualcomm Protection Domain Mapper"
+	select QCOM_QMI_HELPERS
+	depends on NET && QRTR
+	default QCOM_RPROC_COMMON
+	help
+	  The Protection Domain Mapper maps registered services to the domains
+	  and instances handled by the remote DSPs. This is a kernel-space
+	  implementation of the service. It is a simpler alternative to the
+	  userspace daemon.
+
 config QCOM_PDR_HELPERS
 	tristate
 	select QCOM_QMI_HELPERS
diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile
index 3110ac3288bc..d3560f861085 100644
--- a/drivers/soc/qcom/Makefile
+++ b/drivers/soc/qcom/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o
 obj-$(CONFIG_QCOM_GSBI)	+=	qcom_gsbi.o
 obj-$(CONFIG_QCOM_MDT_LOADER)	+= mdt_loader.o
 obj-$(CONFIG_QCOM_OCMEM)	+= ocmem.o
+obj-$(CONFIG_QCOM_PD_MAPPER)	+= qcom_pd_mapper.o
 obj-$(CONFIG_QCOM_PDR_HELPERS)	+= pdr_interface.o
 obj-$(CONFIG_QCOM_PDR_MSG)	+= qcom_pdr_msg.o
 obj-$(CONFIG_QCOM_PMIC_GLINK)	+= pmic_glink.o
diff --git a/drivers/soc/qcom/pdr_internal.h b/drivers/soc/qcom/pdr_internal.h
index 7e5bb5a95275..8d17f7fb79e7 100644
--- a/drivers/soc/qcom/pdr_internal.h
+++ b/drivers/soc/qcom/pdr_internal.h
@@ -13,6 +13,8 @@
 #define SERVREG_SET_ACK_REQ				0x23
 #define SERVREG_RESTART_PD_REQ				0x24
 
+#define SERVREG_LOC_PFR_REQ				0x24
+
 #define SERVREG_DOMAIN_LIST_LENGTH			32
 #define SERVREG_RESTART_PD_REQ_MAX_LEN			67
 #define SERVREG_REGISTER_LISTENER_REQ_LEN		71
@@ -20,6 +22,7 @@
 #define SERVREG_GET_DOMAIN_LIST_REQ_MAX_LEN		74
 #define SERVREG_STATE_UPDATED_IND_MAX_LEN		79
 #define SERVREG_GET_DOMAIN_LIST_RESP_MAX_LEN		2389
+#define SERVREG_LOC_PFR_RESP_MAX_LEN			10
 
 struct servreg_location_entry {
 	char name[SERVREG_NAME_LENGTH + 1];
@@ -79,6 +82,15 @@ struct servreg_set_ack_resp {
 	struct qmi_response_type_v01 resp;
 };
 
+struct servreg_loc_pfr_req {
+	char service[SERVREG_NAME_LENGTH + 1];
+	char reason[257];
+};
+
+struct servreg_loc_pfr_resp {
+	struct qmi_response_type_v01 rsp;
+};
+
 extern const struct qmi_elem_info servreg_location_entry_ei[];
 extern const struct qmi_elem_info servreg_get_domain_list_req_ei[];
 extern const struct qmi_elem_info servreg_get_domain_list_resp_ei[];
@@ -89,5 +101,7 @@ extern const struct qmi_elem_info servreg_restart_pd_resp_ei[];
 extern const struct qmi_elem_info servreg_state_updated_ind_ei[];
 extern const struct qmi_elem_info servreg_set_ack_req_ei[];
 extern const struct qmi_elem_info servreg_set_ack_resp_ei[];
+extern const struct qmi_elem_info servreg_loc_pfr_req_ei[];
+extern const struct qmi_elem_info servreg_loc_pfr_resp_ei[];
 
 #endif
diff --git a/drivers/soc/qcom/qcom_pd_mapper.c b/drivers/soc/qcom/qcom_pd_mapper.c
new file mode 100644
index 000000000000..ecb64f06527f
--- /dev/null
+++ b/drivers/soc/qcom/qcom_pd_mapper.c
@@ -0,0 +1,676 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Qualcomm Protection Domain mapper
+ *
+ * Copyright (c) 2023 Linaro Ltd.
+ */
+
+#include <linux/auxiliary_bus.h>
+#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/refcount.h>
+#include <linux/soc/qcom/qmi.h>
+
+#include "pdr_internal.h"
+
+#define SERVREG_QMI_VERSION 0x101
+#define SERVREG_QMI_INSTANCE 0
+
+#define TMS_SERVREG_SERVICE "tms/servreg"
+
+struct qcom_pdm_domain_data {
+	const char *domain;
+	u32 instance_id;
+	/* NULL-terminated array */
+	const char * services[];
+};
+
+struct qcom_pdm_domain {
+	struct list_head list;
+	const char *name;
+	u32 instance_id;
+};
+
+struct qcom_pdm_service {
+	struct list_head list;
+	struct list_head domains;
+	const char *name;
+};
+
+struct qcom_pdm_data {
+	refcount_t refcnt;
+	struct qmi_handle handle;
+	struct list_head services;
+};
+
+static DEFINE_MUTEX(qcom_pdm_mutex); /* protects __qcom_pdm_data */
+static struct qcom_pdm_data *__qcom_pdm_data;
+
+static struct qcom_pdm_service *qcom_pdm_find(struct qcom_pdm_data *data,
+					      const char *name)
+{
+	struct qcom_pdm_service *service;
+
+	list_for_each_entry(service, &data->services, list) {
+		if (!strcmp(service->name, name))
+			return service;
+	}
+
+	return NULL;
+}
+
+static int qcom_pdm_add_service_domain(struct qcom_pdm_data *data,
+				       const char *service_name,
+				       const char *domain_name,
+				       u32 instance_id)
+{
+	struct qcom_pdm_service *service;
+	struct qcom_pdm_domain *domain;
+
+	service = qcom_pdm_find(data, service_name);
+	if (service) {
+		list_for_each_entry(domain, &service->domains, list) {
+			if (!strcmp(domain->name, domain_name))
+				return -EBUSY;
+		}
+	} else {
+		service = kzalloc(sizeof(*service), GFP_KERNEL);
+		if (!service)
+			return -ENOMEM;
+
+		INIT_LIST_HEAD(&service->domains);
+		service->name = service_name;
+
+		list_add_tail(&service->list, &data->services);
+	}
+
+	domain = kzalloc(sizeof(*domain), GFP_KERNEL);
+	if (!domain) {
+		if (list_empty(&service->domains)) {
+			list_del(&service->list);
+			kfree(service);
+		}
+
+		return -ENOMEM;
+	}
+
+	domain->name = domain_name;
+	domain->instance_id = instance_id;
+	list_add_tail(&domain->list, &service->domains);
+
+	return 0;
+}
+
+static int qcom_pdm_add_domain(struct qcom_pdm_data *data,
+			       const struct qcom_pdm_domain_data *domain)
+{
+	int ret;
+	int i;
+
+	ret = qcom_pdm_add_service_domain(data,
+					  TMS_SERVREG_SERVICE,
+					  domain->domain,
+					  domain->instance_id);
+	if (ret)
+		return ret;
+
+	for (i = 0; domain->services[i]; i++) {
+		ret = qcom_pdm_add_service_domain(data,
+						  domain->services[i],
+						  domain->domain,
+						  domain->instance_id);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
+
+}
+
+static void qcom_pdm_free_domains(struct qcom_pdm_data *data)
+{
+	struct qcom_pdm_service *service, *tservice;
+	struct qcom_pdm_domain *domain, *tdomain;
+
+	list_for_each_entry_safe(service, tservice, &data->services, list) {
+		list_for_each_entry_safe(domain, tdomain, &service->domains, list) {
+			list_del(&domain->list);
+			kfree(domain);
+		}
+
+		list_del(&service->list);
+		kfree(service);
+	}
+}
+
+static void qcom_pdm_get_domain_list(struct qmi_handle *qmi,
+				     struct sockaddr_qrtr *sq,
+				     struct qmi_txn *txn,
+				     const void *decoded)
+{
+	struct qcom_pdm_data *data = container_of(qmi, struct qcom_pdm_data, handle);
+	const struct servreg_get_domain_list_req *req = decoded;
+	struct servreg_get_domain_list_resp *rsp;
+	struct qcom_pdm_service *service;
+	u32 offset;
+	int ret;
+
+	rsp = kzalloc(sizeof(*rsp), GFP_KERNEL);
+	if (!rsp)
+		return;
+
+	offset = req->domain_offset_valid ? req->domain_offset : 0;
+
+	rsp->resp.result = QMI_RESULT_SUCCESS_V01;
+	rsp->resp.error = QMI_ERR_NONE_V01;
+
+	rsp->db_rev_count_valid = true;
+	rsp->db_rev_count = 1;
+
+	rsp->total_domains_valid = true;
+	rsp->total_domains = 0;
+
+	mutex_lock(&qcom_pdm_mutex);
+
+	service = qcom_pdm_find(data, req->service_name);
+	if (service) {
+		struct qcom_pdm_domain *domain;
+
+		rsp->domain_list_valid = true;
+		rsp->domain_list_len = 0;
+
+		list_for_each_entry(domain, &service->domains, list) {
+			u32 i = rsp->total_domains++;
+
+			if (i >= offset && i < SERVREG_DOMAIN_LIST_LENGTH) {
+				u32 j = rsp->domain_list_len++;
+
+				strscpy(rsp->domain_list[j].name, domain->name,
+					sizeof(rsp->domain_list[i].name));
+				rsp->domain_list[j].instance = domain->instance_id;
+
+				pr_debug("PDM: found %s / %d\n", domain->name,
+					 domain->instance_id);
+			}
+		}
+	}
+
+	pr_debug("PDM: service '%s' offset %d returning %d domains (of %d)\n", req->service_name,
+		 req->domain_offset_valid ? req->domain_offset : -1, rsp->domain_list_len, rsp->total_domains);
+
+	ret = qmi_send_response(qmi, sq, txn, SERVREG_GET_DOMAIN_LIST_REQ,
+				SERVREG_GET_DOMAIN_LIST_RESP_MAX_LEN,
+				servreg_get_domain_list_resp_ei, rsp);
+	if (ret)
+		pr_err("Error sending servreg response: %d\n", ret);
+
+	mutex_unlock(&qcom_pdm_mutex);
+
+	kfree(rsp);
+}
+
+static void qcom_pdm_pfr(struct qmi_handle *qmi,
+			 struct sockaddr_qrtr *sq,
+			 struct qmi_txn *txn,
+			 const void *decoded)
+{
+	const struct servreg_loc_pfr_req *req = decoded;
+	struct servreg_loc_pfr_resp rsp = {};
+	int ret;
+
+	pr_warn_ratelimited("PDM: service '%s' crash: '%s'\n", req->service, req->reason);
+
+	rsp.rsp.result = QMI_RESULT_SUCCESS_V01;
+	rsp.rsp.error = QMI_ERR_NONE_V01;
+
+	ret = qmi_send_response(qmi, sq, txn, SERVREG_LOC_PFR_REQ,
+				SERVREG_LOC_PFR_RESP_MAX_LEN,
+				servreg_loc_pfr_resp_ei, &rsp);
+	if (ret)
+		pr_err("Error sending servreg response: %d\n", ret);
+}
+
+static const struct qmi_msg_handler qcom_pdm_msg_handlers[] = {
+	{
+		.type = QMI_REQUEST,
+		.msg_id = SERVREG_GET_DOMAIN_LIST_REQ,
+		.ei = servreg_get_domain_list_req_ei,
+		.decoded_size = sizeof(struct servreg_get_domain_list_req),
+		.fn = qcom_pdm_get_domain_list,
+	},
+	{
+		.type = QMI_REQUEST,
+		.msg_id = SERVREG_LOC_PFR_REQ,
+		.ei = servreg_loc_pfr_req_ei,
+		.decoded_size = sizeof(struct servreg_loc_pfr_req),
+		.fn = qcom_pdm_pfr,
+	},
+	{ },
+};
+
+static const struct qcom_pdm_domain_data adsp_audio_pd = {
+	.domain = "msm/adsp/audio_pd",
+	.instance_id = 74,
+	.services = {
+		"avs/audio",
+		NULL,
+	},
+};
+
+static const struct qcom_pdm_domain_data adsp_charger_pd = {
+	.domain = "msm/adsp/charger_pd",
+	.instance_id = 74,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data adsp_root_pd = {
+	.domain = "msm/adsp/root_pd",
+	.instance_id = 74,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data adsp_root_pd_pdr = {
+	.domain = "msm/adsp/root_pd",
+	.instance_id = 74,
+	.services = {
+		"tms/pdr_enabled",
+		NULL,
+	},
+};
+
+static const struct qcom_pdm_domain_data adsp_sensor_pd = {
+	.domain = "msm/adsp/sensor_pd",
+	.instance_id = 74,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data msm8996_adsp_audio_pd = {
+	.domain = "msm/adsp/audio_pd",
+	.instance_id = 4,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data msm8996_adsp_root_pd = {
+	.domain = "msm/adsp/root_pd",
+	.instance_id = 4,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data cdsp_root_pd = {
+	.domain = "msm/cdsp/root_pd",
+	.instance_id = 76,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data slpi_root_pd = {
+	.domain = "msm/slpi/root_pd",
+	.instance_id = 90,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data slpi_sensor_pd = {
+	.domain = "msm/slpi/sensor_pd",
+	.instance_id = 90,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data mpss_root_pd = {
+	.domain = "msm/modem/root_pd",
+	.instance_id = 180,
+	.services = {
+		NULL,
+	},
+};
+
+static const struct qcom_pdm_domain_data mpss_root_pd_gps = {
+	.domain = "msm/modem/root_pd",
+	.instance_id = 180,
+	.services = {
+		"gps/gps_service",
+		NULL,
+	},
+};
+
+static const struct qcom_pdm_domain_data mpss_root_pd_gps_pdr = {
+	.domain = "msm/modem/root_pd",
+	.instance_id = 180,
+	.services = {
+		"gps/gps_service",
+		"tms/pdr_enabled",
+		NULL,
+	},
+};
+
+static const struct qcom_pdm_domain_data msm8996_mpss_root_pd = {
+	.domain = "msm/modem/root_pd",
+	.instance_id = 100,
+	.services = { NULL },
+};
+
+static const struct qcom_pdm_domain_data mpss_wlan_pd = {
+	.domain = "msm/modem/wlan_pd",
+	.instance_id = 180,
+	.services = {
+		"kernel/elf_loader",
+		"wlan/fw",
+		NULL,
+	},
+};
+
+static const struct qcom_pdm_domain_data *msm8996_domains[] = {
+	&msm8996_adsp_audio_pd,
+	&msm8996_adsp_root_pd,
+	&msm8996_mpss_root_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *msm8998_domains[] = {
+	&mpss_root_pd,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *qcm2290_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&adsp_sensor_pd,
+	&mpss_root_pd_gps,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *qcs404_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&adsp_sensor_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sc7180_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd_pdr,
+	&adsp_sensor_pd,
+	&mpss_root_pd_gps_pdr,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sc7280_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd_pdr,
+	&adsp_charger_pd,
+	&adsp_sensor_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd_gps_pdr,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sc8180x_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&adsp_charger_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd_gps,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sc8280xp_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd_pdr,
+	&adsp_charger_pd,
+	&cdsp_root_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sdm660_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&adsp_sensor_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sdm670_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sdm845_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd,
+	&mpss_wlan_pd,
+	&slpi_root_pd,
+	&slpi_sensor_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sm6115_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&adsp_sensor_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd_gps,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sm6350_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&adsp_sensor_pd,
+	&cdsp_root_pd,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sm8150_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd_gps,
+	&mpss_wlan_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sm8250_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&cdsp_root_pd,
+	&slpi_root_pd,
+	&slpi_sensor_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sm8350_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd_pdr,
+	&adsp_charger_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd_gps,
+	&slpi_root_pd,
+	&slpi_sensor_pd,
+	NULL,
+};
+
+static const struct qcom_pdm_domain_data *sm8550_domains[] = {
+	&adsp_audio_pd,
+	&adsp_root_pd,
+	&adsp_charger_pd,
+	&adsp_sensor_pd,
+	&cdsp_root_pd,
+	&mpss_root_pd_gps,
+	NULL,
+};
+
+static const struct of_device_id qcom_pdm_domains[] = {
+	{ .compatible = "qcom,apq8064", .data = NULL, },
+	{ .compatible = "qcom,apq8074", .data = NULL, },
+	{ .compatible = "qcom,apq8084", .data = NULL, },
+	{ .compatible = "qcom,apq8096", .data = msm8996_domains, },
+	{ .compatible = "qcom,msm8226", .data = NULL, },
+	{ .compatible = "qcom,msm8974", .data = NULL, },
+	{ .compatible = "qcom,msm8996", .data = msm8996_domains, },
+	{ .compatible = "qcom,msm8998", .data = msm8998_domains, },
+	{ .compatible = "qcom,qcm2290", .data = qcm2290_domains, },
+	{ .compatible = "qcom,qcs404", .data = qcs404_domains, },
+	{ .compatible = "qcom,sc7180", .data = sc7180_domains, },
+	{ .compatible = "qcom,sc7280", .data = sc7280_domains, },
+	{ .compatible = "qcom,sc8180x", .data = sc8180x_domains, },
+	{ .compatible = "qcom,sc8280xp", .data = sc8280xp_domains, },
+	{ .compatible = "qcom,sda660", .data = sdm660_domains, },
+	{ .compatible = "qcom,sdm660", .data = sdm660_domains, },
+	{ .compatible = "qcom,sdm670", .data = sdm670_domains, },
+	{ .compatible = "qcom,sdm845", .data = sdm845_domains, },
+	{ .compatible = "qcom,sm4250", .data = sm6115_domains, },
+	{ .compatible = "qcom,sm6115", .data = sm6115_domains, },
+	{ .compatible = "qcom,sm6350", .data = sm6350_domains, },
+	{ .compatible = "qcom,sm8150", .data = sm8150_domains, },
+	{ .compatible = "qcom,sm8250", .data = sm8250_domains, },
+	{ .compatible = "qcom,sm8350", .data = sm8350_domains, },
+	{ .compatible = "qcom,sm8450", .data = sm8350_domains, },
+	{ .compatible = "qcom,sm8550", .data = sm8550_domains, },
+	{ .compatible = "qcom,sm8650", .data = sm8550_domains, },
+	{},
+};
+
+static void qcom_pdm_stop(struct qcom_pdm_data *data)
+{
+	qcom_pdm_free_domains(data);
+
+	/* The server is removed automatically */
+	qmi_handle_release(&data->handle);
+
+	kfree(data);
+}
+
+static struct qcom_pdm_data *qcom_pdm_start(void)
+{
+	const struct qcom_pdm_domain_data * const *domains;
+	const struct of_device_id *match;
+	struct qcom_pdm_data *data;
+	struct device_node *root;
+	int ret, i;
+
+	root = of_find_node_by_path("/");
+	if (!root)
+		return ERR_PTR(-ENODEV);
+
+	match = of_match_node(qcom_pdm_domains, root);
+	of_node_put(root);
+	if (!match) {
+		pr_notice("PDM: no support for the platform, userspace daemon might be required.\n");
+		return ERR_PTR(-ENODEV);
+	}
+
+	domains = match->data;
+	if (!domains) {
+		pr_debug("PDM: no domains\n");
+		return ERR_PTR(-ENODEV);
+	}
+
+	data = kzalloc(sizeof(*data), GFP_KERNEL);
+	if (!data)
+		return ERR_PTR(-ENOMEM);
+
+	INIT_LIST_HEAD(&data->services);
+
+	ret = qmi_handle_init(&data->handle, SERVREG_GET_DOMAIN_LIST_REQ_MAX_LEN,
+			      NULL, qcom_pdm_msg_handlers);
+	if (ret) {
+		kfree(data);
+		return ERR_PTR(ret);
+	}
+
+	refcount_set(&data->refcnt, 1);
+
+	for (i = 0; domains[i]; i++) {
+		ret = qcom_pdm_add_domain(data, domains[i]);
+		if (ret)
+			goto err_stop;
+	}
+
+	ret = qmi_add_server(&data->handle, SERVREG_LOCATOR_SERVICE,
+			     SERVREG_QMI_VERSION, SERVREG_QMI_INSTANCE);
+	if (ret) {
+		pr_err("PDM: error adding server %d\n", ret);
+		goto err_stop;
+	}
+
+	return data;
+
+err_stop:
+	qcom_pdm_stop(data);
+
+	return ERR_PTR(ret);
+}
+
+static int qcom_pdm_probe(struct auxiliary_device *auxdev,
+			  const struct auxiliary_device_id *id)
+
+{
+	struct qcom_pdm_data *data;
+	int ret = 0;
+
+	mutex_lock(&qcom_pdm_mutex);
+
+	if (!__qcom_pdm_data) {
+		data = qcom_pdm_start();
+
+		if (IS_ERR(data))
+			ret = PTR_ERR(data);
+		else
+			__qcom_pdm_data = data;
+	}
+
+	auxiliary_set_drvdata(auxdev, __qcom_pdm_data);
+
+	mutex_unlock(&qcom_pdm_mutex);
+
+	return ret;
+}
+
+static void qcom_pdm_remove(struct auxiliary_device *auxdev)
+{
+	struct qcom_pdm_data *data;
+
+	data = auxiliary_get_drvdata(auxdev);
+	if (!data)
+		return;
+
+	if (refcount_dec_and_mutex_lock(&data->refcnt, &qcom_pdm_mutex)) {
+		__qcom_pdm_data = NULL;
+		qcom_pdm_stop(data);
+		mutex_unlock(&qcom_pdm_mutex);
+	}
+}
+
+static const struct auxiliary_device_id qcom_pdm_table[] = {
+	{ .name = "qcom_common.pd-mapper" },
+	{},
+};
+MODULE_DEVICE_TABLE(auxiliary, qcom_pdm_table);
+
+static struct auxiliary_driver qcom_pdm_drv = {
+	.name = "qcom-pdm-mapper",
+	.id_table = qcom_pdm_table,
+	.probe = qcom_pdm_probe,
+	.remove = qcom_pdm_remove,
+};
+module_auxiliary_driver(qcom_pdm_drv);
+
+MODULE_DESCRIPTION("Qualcomm Protection Domain Mapper");
+MODULE_LICENSE("GPL");
diff --git a/drivers/soc/qcom/qcom_pdr_msg.c b/drivers/soc/qcom/qcom_pdr_msg.c
index 9b46f42aa146..bf3e4a47165e 100644
--- a/drivers/soc/qcom/qcom_pdr_msg.c
+++ b/drivers/soc/qcom/qcom_pdr_msg.c
@@ -315,5 +315,39 @@ const struct qmi_elem_info servreg_set_ack_resp_ei[] = {
 };
 EXPORT_SYMBOL_GPL(servreg_set_ack_resp_ei);
 
+const struct qmi_elem_info servreg_loc_pfr_req_ei[] = {
+	{
+		.data_type = QMI_STRING,
+		.elem_len = SERVREG_NAME_LENGTH + 1,
+		.elem_size = sizeof(char),
+		.array_type = VAR_LEN_ARRAY,
+		.tlv_type = 0x01,
+		.offset = offsetof(struct servreg_loc_pfr_req, service)
+	},
+	{
+		.data_type = QMI_STRING,
+		.elem_len = SERVREG_NAME_LENGTH + 1,
+		.elem_size = sizeof(char),
+		.array_type = VAR_LEN_ARRAY,
+		.tlv_type = 0x02,
+		.offset = offsetof(struct servreg_loc_pfr_req, reason)
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_loc_pfr_req_ei);
+
+const struct qmi_elem_info servreg_loc_pfr_resp_ei[] = {
+	{
+		.data_type = QMI_STRUCT,
+		.elem_len = 1,
+		.elem_size = sizeof_field(struct servreg_loc_pfr_resp, rsp),
+		.tlv_type = 0x02,
+		.offset = offsetof(struct servreg_loc_pfr_resp, rsp),
+		.ei_array = qmi_response_type_v01_ei,
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_loc_pfr_resp_ei);
+
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Qualcomm Protection Domain messages data");

-- 
2.39.2


^ permalink raw reply related	[relevance 3%]

* [PATCH v8 5/5] remoteproc: qcom: enable in-kernel PD mapper
  2024-05-11 21:56  1% [PATCH v8 0/5] soc: qcom: add in-kernel pd-mapper implementation Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2024-05-11 21:56  3% ` [PATCH v8 4/5] soc: qcom: add pd-mapper implementation Dmitry Baryshkov
@ 2024-05-11 21:56  1% ` Dmitry Baryshkov
  4 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Sibi Sankar, Mathieu Poirier
  Cc: linux-arm-msm, linux-kernel, linux-remoteproc, Johan Hovold,
	Xilin Wu, Bryan O'Donoghue, Steev Klimaszewski,
	Alexey Minnekhanov

Request in-kernel protection domain mapper to be started before starting
Qualcomm DSP and release it once DSP is stopped. Once all DSPs are
stopped, the PD mapper will be stopped too.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/remoteproc/qcom_common.c    | 87 +++++++++++++++++++++++++++++++++++++
 drivers/remoteproc/qcom_common.h    | 10 +++++
 drivers/remoteproc/qcom_q6v5_adsp.c |  3 ++
 drivers/remoteproc/qcom_q6v5_mss.c  |  3 ++
 drivers/remoteproc/qcom_q6v5_pas.c  |  3 ++
 drivers/remoteproc/qcom_q6v5_wcss.c |  3 ++
 6 files changed, 109 insertions(+)

diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index 03e5f5d533eb..8c8688f99f0a 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -13,6 +13,7 @@
 #include <linux/notifier.h>
 #include <linux/remoteproc.h>
 #include <linux/remoteproc/qcom_rproc.h>
+#include <linux/auxiliary_bus.h>
 #include <linux/rpmsg/qcom_glink.h>
 #include <linux/rpmsg/qcom_smd.h>
 #include <linux/slab.h>
@@ -25,6 +26,7 @@
 #define to_glink_subdev(d) container_of(d, struct qcom_rproc_glink, subdev)
 #define to_smd_subdev(d) container_of(d, struct qcom_rproc_subdev, subdev)
 #define to_ssr_subdev(d) container_of(d, struct qcom_rproc_ssr, subdev)
+#define to_pdm_subdev(d) container_of(d, struct qcom_rproc_pdm, subdev)
 
 #define MAX_NUM_OF_SS           10
 #define MAX_REGION_NAME_LENGTH  16
@@ -519,5 +521,90 @@ void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr)
 }
 EXPORT_SYMBOL_GPL(qcom_remove_ssr_subdev);
 
+static void pdm_dev_release(struct device *dev)
+{
+	struct auxiliary_device *adev = to_auxiliary_dev(dev);
+
+	kfree(adev);
+}
+
+static int pdm_notify_prepare(struct rproc_subdev *subdev)
+{
+	struct qcom_rproc_pdm *pdm = to_pdm_subdev(subdev);
+	struct auxiliary_device *adev;
+	int ret;
+
+	adev = kzalloc(sizeof(*adev), GFP_KERNEL);
+	if (!adev)
+		return -ENOMEM;
+
+	adev->dev.parent = pdm->dev;
+	adev->dev.release = pdm_dev_release;
+	adev->name = "pd-mapper";
+	adev->id = pdm->index;
+
+	ret = auxiliary_device_init(adev);
+	if (ret) {
+		kfree(adev);
+		return ret;
+	}
+
+	ret = auxiliary_device_add(adev);
+	if (ret) {
+		auxiliary_device_uninit(adev);
+		return ret;
+	}
+
+	pdm->adev = adev;
+
+	return 0;
+}
+
+
+static void pdm_notify_unprepare(struct rproc_subdev *subdev)
+{
+	struct qcom_rproc_pdm *pdm = to_pdm_subdev(subdev);
+
+	if (!pdm->adev)
+		return;
+
+	auxiliary_device_delete(pdm->adev);
+	auxiliary_device_uninit(pdm->adev);
+	pdm->adev = NULL;
+}
+
+/**
+ * qcom_add_pdm_subdev() - register PD Mapper subdevice
+ * @rproc:	rproc handle
+ * @pdm:	PDM subdevice handle
+ *
+ * Register @pdm so that Protection Device mapper service is started when the
+ * DSP is started too.
+ */
+void qcom_add_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm)
+{
+	pdm->dev = &rproc->dev;
+	pdm->index = rproc->index;
+
+	pdm->subdev.prepare = pdm_notify_prepare;
+	pdm->subdev.unprepare = pdm_notify_unprepare;
+
+	rproc_add_subdev(rproc, &pdm->subdev);
+}
+EXPORT_SYMBOL_GPL(qcom_add_pdm_subdev);
+
+/**
+ * qcom_remove_pdm_subdev() - remove PD Mapper subdevice
+ * @rproc:	rproc handle
+ * @pdm:	PDM subdevice handle
+ *
+ * Remove the PD Mapper subdevice.
+ */
+void qcom_remove_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm)
+{
+	rproc_remove_subdev(rproc, &pdm->subdev);
+}
+EXPORT_SYMBOL_GPL(qcom_remove_pdm_subdev);
+
 MODULE_DESCRIPTION("Qualcomm Remoteproc helper driver");
 MODULE_LICENSE("GPL v2");
diff --git a/drivers/remoteproc/qcom_common.h b/drivers/remoteproc/qcom_common.h
index 9ef4449052a9..b07fbaa091a0 100644
--- a/drivers/remoteproc/qcom_common.h
+++ b/drivers/remoteproc/qcom_common.h
@@ -34,6 +34,13 @@ struct qcom_rproc_ssr {
 	struct qcom_ssr_subsystem *info;
 };
 
+struct qcom_rproc_pdm {
+	struct rproc_subdev subdev;
+	struct device *dev;
+	int index;
+	struct auxiliary_device *adev;
+};
+
 void qcom_minidump(struct rproc *rproc, unsigned int minidump_id,
 			void (*rproc_dumpfn_t)(struct rproc *rproc,
 				struct rproc_dump_segment *segment, void *dest, size_t offset,
@@ -52,6 +59,9 @@ void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr,
 			 const char *ssr_name);
 void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr);
 
+void qcom_add_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm);
+void qcom_remove_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm);
+
 #if IS_ENABLED(CONFIG_QCOM_SYSMON)
 struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
 					   const char *name,
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c
index 1d24c9b656a8..572dcb0f055b 100644
--- a/drivers/remoteproc/qcom_q6v5_adsp.c
+++ b/drivers/remoteproc/qcom_q6v5_adsp.c
@@ -112,6 +112,7 @@ struct qcom_adsp {
 	struct dev_pm_domain_list *pd_list;
 
 	struct qcom_rproc_glink glink_subdev;
+	struct qcom_rproc_pdm pdm_subdev;
 	struct qcom_rproc_ssr ssr_subdev;
 	struct qcom_sysmon *sysmon;
 
@@ -726,6 +727,7 @@ static int adsp_probe(struct platform_device *pdev)
 		goto disable_pm;
 
 	qcom_add_glink_subdev(rproc, &adsp->glink_subdev, desc->ssr_name);
+	qcom_add_pdm_subdev(rproc, &adsp->pdm_subdev);
 	qcom_add_ssr_subdev(rproc, &adsp->ssr_subdev, desc->ssr_name);
 	adsp->sysmon = qcom_add_sysmon_subdev(rproc,
 					      desc->sysmon_name,
@@ -755,6 +757,7 @@ static void adsp_remove(struct platform_device *pdev)
 
 	qcom_q6v5_deinit(&adsp->q6v5);
 	qcom_remove_glink_subdev(adsp->rproc, &adsp->glink_subdev);
+	qcom_remove_pdm_subdev(adsp->rproc, &adsp->pdm_subdev);
 	qcom_remove_sysmon_subdev(adsp->sysmon);
 	qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev);
 	qcom_rproc_pds_detach(adsp);
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 1779fc890e10..2a42215ce8e0 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -228,6 +228,7 @@ struct q6v5 {
 
 	struct qcom_rproc_glink glink_subdev;
 	struct qcom_rproc_subdev smd_subdev;
+	struct qcom_rproc_pdm pdm_subdev;
 	struct qcom_rproc_ssr ssr_subdev;
 	struct qcom_sysmon *sysmon;
 	struct platform_device *bam_dmux;
@@ -2102,6 +2103,7 @@ static int q6v5_probe(struct platform_device *pdev)
 	qproc->mba_perm = BIT(QCOM_SCM_VMID_HLOS);
 	qcom_add_glink_subdev(rproc, &qproc->glink_subdev, "mpss");
 	qcom_add_smd_subdev(rproc, &qproc->smd_subdev);
+	qcom_add_pdm_subdev(rproc, &qproc->pdm_subdev);
 	qcom_add_ssr_subdev(rproc, &qproc->ssr_subdev, "mpss");
 	qproc->sysmon = qcom_add_sysmon_subdev(rproc, "modem", 0x12);
 	if (IS_ERR(qproc->sysmon)) {
@@ -2143,6 +2145,7 @@ static void q6v5_remove(struct platform_device *pdev)
 	qcom_q6v5_deinit(&qproc->q6v5);
 	qcom_remove_sysmon_subdev(qproc->sysmon);
 	qcom_remove_ssr_subdev(rproc, &qproc->ssr_subdev);
+	qcom_remove_pdm_subdev(rproc, &qproc->pdm_subdev);
 	qcom_remove_smd_subdev(rproc, &qproc->smd_subdev);
 	qcom_remove_glink_subdev(rproc, &qproc->glink_subdev);
 
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 54d8005d40a3..399c3bc104bd 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -109,6 +109,7 @@ struct qcom_adsp {
 
 	struct qcom_rproc_glink glink_subdev;
 	struct qcom_rproc_subdev smd_subdev;
+	struct qcom_rproc_pdm pdm_subdev;
 	struct qcom_rproc_ssr ssr_subdev;
 	struct qcom_sysmon *sysmon;
 
@@ -771,6 +772,7 @@ static int adsp_probe(struct platform_device *pdev)
 
 	qcom_add_glink_subdev(rproc, &adsp->glink_subdev, desc->ssr_name);
 	qcom_add_smd_subdev(rproc, &adsp->smd_subdev);
+	qcom_add_pdm_subdev(rproc, &adsp->pdm_subdev);
 	adsp->sysmon = qcom_add_sysmon_subdev(rproc,
 					      desc->sysmon_name,
 					      desc->ssctl_id);
@@ -805,6 +807,7 @@ static void adsp_remove(struct platform_device *pdev)
 	qcom_remove_glink_subdev(adsp->rproc, &adsp->glink_subdev);
 	qcom_remove_sysmon_subdev(adsp->sysmon);
 	qcom_remove_smd_subdev(adsp->rproc, &adsp->smd_subdev);
+	qcom_remove_pdm_subdev(adsp->rproc, &adsp->pdm_subdev);
 	qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev);
 	adsp_pds_detach(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
 	device_init_wakeup(adsp->dev, false);
diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index 94f68c919ee6..e913dabae992 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -148,6 +148,7 @@ struct q6v5_wcss {
 	bool requires_force_stop;
 
 	struct qcom_rproc_glink glink_subdev;
+	struct qcom_rproc_pdm pdm_subdev;
 	struct qcom_rproc_ssr ssr_subdev;
 };
 
@@ -1052,6 +1053,7 @@ static int q6v5_wcss_probe(struct platform_device *pdev)
 		return ret;
 
 	qcom_add_glink_subdev(rproc, &wcss->glink_subdev, "q6wcss");
+	qcom_add_pdm_subdev(rproc, &wcss->pdm_subdev);
 	qcom_add_ssr_subdev(rproc, &wcss->ssr_subdev, "q6wcss");
 
 	if (desc->ssctl_id)
@@ -1074,6 +1076,7 @@ static void q6v5_wcss_remove(struct platform_device *pdev)
 	struct q6v5_wcss *wcss = rproc->priv;
 
 	qcom_q6v5_deinit(&wcss->q6v5);
+	qcom_remove_pdm_subdev(rproc, &wcss->pdm_subdev);
 	rproc_del(rproc);
 }
 

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v8 3/5] soc: qcom: pdr: extract PDR message marshalling data
  2024-05-11 21:56  1% [PATCH v8 0/5] soc: qcom: add in-kernel pd-mapper implementation Dmitry Baryshkov
  2024-05-11 21:56  4% ` [PATCH v8 1/5] soc: qcom: pdr: protect locator_addr with the main mutex Dmitry Baryshkov
  2024-05-11 21:56  1% ` [PATCH v8 2/5] soc: qcom: pdr: fix parsing of domains lists Dmitry Baryshkov
@ 2024-05-11 21:56  1% ` Dmitry Baryshkov
  2024-05-11 21:56  3% ` [PATCH v8 4/5] soc: qcom: add pd-mapper implementation Dmitry Baryshkov
  2024-05-11 21:56  1% ` [PATCH v8 5/5] remoteproc: qcom: enable in-kernel PD mapper Dmitry Baryshkov
  4 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Sibi Sankar, Mathieu Poirier
  Cc: linux-arm-msm, linux-kernel, linux-remoteproc, Johan Hovold,
	Xilin Wu, Bryan O'Donoghue, Steev Klimaszewski,
	Alexey Minnekhanov

The in-kernel PD mapper is going to use same message structures as the
QCOM_PDR_HELPERS module. Extract message marshalling data to separate
module that can be used by both PDR helpers and by PD mapper.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/soc/qcom/Kconfig        |   4 +
 drivers/soc/qcom/Makefile       |   1 +
 drivers/soc/qcom/pdr_internal.h | 306 ++------------------------------------
 drivers/soc/qcom/qcom_pdr_msg.c | 319 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 334 insertions(+), 296 deletions(-)

diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 5af33b0e3470..95973c6b828f 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -75,8 +75,12 @@ config QCOM_OCMEM
 config QCOM_PDR_HELPERS
 	tristate
 	select QCOM_QMI_HELPERS
+	select QCOM_PDR_MSG
 	depends on NET
 
+config QCOM_PDR_MSG
+	tristate
+
 config QCOM_PMIC_PDCHARGER_ULOG
 	tristate "Qualcomm PMIC PDCharger ULOG driver"
 	depends on RPMSG
diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile
index ca0bece0dfff..3110ac3288bc 100644
--- a/drivers/soc/qcom/Makefile
+++ b/drivers/soc/qcom/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_QCOM_GSBI)	+=	qcom_gsbi.o
 obj-$(CONFIG_QCOM_MDT_LOADER)	+= mdt_loader.o
 obj-$(CONFIG_QCOM_OCMEM)	+= ocmem.o
 obj-$(CONFIG_QCOM_PDR_HELPERS)	+= pdr_interface.o
+obj-$(CONFIG_QCOM_PDR_MSG)	+= qcom_pdr_msg.o
 obj-$(CONFIG_QCOM_PMIC_GLINK)	+= pmic_glink.o
 obj-$(CONFIG_QCOM_PMIC_GLINK)	+= pmic_glink_altmode.o
 obj-$(CONFIG_QCOM_PMIC_PDCHARGER_ULOG)	+= pmic_pdcharger_ulog.o
diff --git a/drivers/soc/qcom/pdr_internal.h b/drivers/soc/qcom/pdr_internal.h
index 03c282b7f17e..7e5bb5a95275 100644
--- a/drivers/soc/qcom/pdr_internal.h
+++ b/drivers/soc/qcom/pdr_internal.h
@@ -28,83 +28,12 @@ struct servreg_location_entry {
 	u32 instance;
 };
 
-static const struct qmi_elem_info servreg_location_entry_ei[] = {
-	{
-		.data_type      = QMI_STRING,
-		.elem_len       = SERVREG_NAME_LENGTH + 1,
-		.elem_size      = sizeof(char),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0,
-		.offset         = offsetof(struct servreg_location_entry,
-					   name),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_4_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u32),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0,
-		.offset         = offsetof(struct servreg_location_entry,
-					   instance),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_1_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0,
-		.offset         = offsetof(struct servreg_location_entry,
-					   service_data_valid),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_4_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u32),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0,
-		.offset         = offsetof(struct servreg_location_entry,
-					   service_data),
-	},
-	{}
-};
-
 struct servreg_get_domain_list_req {
 	char service_name[SERVREG_NAME_LENGTH + 1];
 	u8 domain_offset_valid;
 	u32 domain_offset;
 };
 
-static const struct qmi_elem_info servreg_get_domain_list_req_ei[] = {
-	{
-		.data_type      = QMI_STRING,
-		.elem_len       = SERVREG_NAME_LENGTH + 1,
-		.elem_size      = sizeof(char),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x01,
-		.offset         = offsetof(struct servreg_get_domain_list_req,
-					   service_name),
-	},
-	{
-		.data_type      = QMI_OPT_FLAG,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x10,
-		.offset         = offsetof(struct servreg_get_domain_list_req,
-					   domain_offset_valid),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_4_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u32),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x10,
-		.offset         = offsetof(struct servreg_get_domain_list_req,
-					   domain_offset),
-	},
-	{}
-};
-
 struct servreg_get_domain_list_resp {
 	struct qmi_response_type_v01 resp;
 	u8 total_domains_valid;
@@ -116,264 +45,49 @@ struct servreg_get_domain_list_resp {
 	struct servreg_location_entry domain_list[SERVREG_DOMAIN_LIST_LENGTH];
 };
 
-static const struct qmi_elem_info servreg_get_domain_list_resp_ei[] = {
-	{
-		.data_type      = QMI_STRUCT,
-		.elem_len       = 1,
-		.elem_size      = sizeof(struct qmi_response_type_v01),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x02,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   resp),
-		.ei_array      = qmi_response_type_v01_ei,
-	},
-	{
-		.data_type      = QMI_OPT_FLAG,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x10,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   total_domains_valid),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_2_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u16),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x10,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   total_domains),
-	},
-	{
-		.data_type      = QMI_OPT_FLAG,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x11,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   db_rev_count_valid),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_2_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u16),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x11,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   db_rev_count),
-	},
-	{
-		.data_type      = QMI_OPT_FLAG,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x12,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   domain_list_valid),
-	},
-	{
-		.data_type      = QMI_DATA_LEN,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x12,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   domain_list_len),
-	},
-	{
-		.data_type      = QMI_STRUCT,
-		.elem_len       = SERVREG_DOMAIN_LIST_LENGTH,
-		.elem_size      = sizeof(struct servreg_location_entry),
-		.array_type	= VAR_LEN_ARRAY,
-		.tlv_type       = 0x12,
-		.offset         = offsetof(struct servreg_get_domain_list_resp,
-					   domain_list),
-		.ei_array      = servreg_location_entry_ei,
-	},
-	{}
-};
-
 struct servreg_register_listener_req {
 	u8 enable;
 	char service_path[SERVREG_NAME_LENGTH + 1];
 };
 
-static const struct qmi_elem_info servreg_register_listener_req_ei[] = {
-	{
-		.data_type      = QMI_UNSIGNED_1_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x01,
-		.offset         = offsetof(struct servreg_register_listener_req,
-					   enable),
-	},
-	{
-		.data_type      = QMI_STRING,
-		.elem_len       = SERVREG_NAME_LENGTH + 1,
-		.elem_size      = sizeof(char),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x02,
-		.offset         = offsetof(struct servreg_register_listener_req,
-					   service_path),
-	},
-	{}
-};
-
 struct servreg_register_listener_resp {
 	struct qmi_response_type_v01 resp;
 	u8 curr_state_valid;
 	enum servreg_service_state curr_state;
 };
 
-static const struct qmi_elem_info servreg_register_listener_resp_ei[] = {
-	{
-		.data_type      = QMI_STRUCT,
-		.elem_len       = 1,
-		.elem_size      = sizeof(struct qmi_response_type_v01),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x02,
-		.offset         = offsetof(struct servreg_register_listener_resp,
-					   resp),
-		.ei_array      = qmi_response_type_v01_ei,
-	},
-	{
-		.data_type      = QMI_OPT_FLAG,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u8),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x10,
-		.offset         = offsetof(struct servreg_register_listener_resp,
-					   curr_state_valid),
-	},
-	{
-		.data_type      = QMI_SIGNED_4_BYTE_ENUM,
-		.elem_len       = 1,
-		.elem_size      = sizeof(enum servreg_service_state),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x10,
-		.offset         = offsetof(struct servreg_register_listener_resp,
-					   curr_state),
-	},
-	{}
-};
-
 struct servreg_restart_pd_req {
 	char service_path[SERVREG_NAME_LENGTH + 1];
 };
 
-static const struct qmi_elem_info servreg_restart_pd_req_ei[] = {
-	{
-		.data_type      = QMI_STRING,
-		.elem_len       = SERVREG_NAME_LENGTH + 1,
-		.elem_size      = sizeof(char),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x01,
-		.offset         = offsetof(struct servreg_restart_pd_req,
-					   service_path),
-	},
-	{}
-};
-
 struct servreg_restart_pd_resp {
 	struct qmi_response_type_v01 resp;
 };
 
-static const struct qmi_elem_info servreg_restart_pd_resp_ei[] = {
-	{
-		.data_type      = QMI_STRUCT,
-		.elem_len       = 1,
-		.elem_size      = sizeof(struct qmi_response_type_v01),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x02,
-		.offset         = offsetof(struct servreg_restart_pd_resp,
-					   resp),
-		.ei_array      = qmi_response_type_v01_ei,
-	},
-	{}
-};
-
 struct servreg_state_updated_ind {
 	enum servreg_service_state curr_state;
 	char service_path[SERVREG_NAME_LENGTH + 1];
 	u16 transaction_id;
 };
 
-static const struct qmi_elem_info servreg_state_updated_ind_ei[] = {
-	{
-		.data_type      = QMI_SIGNED_4_BYTE_ENUM,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u32),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x01,
-		.offset         = offsetof(struct servreg_state_updated_ind,
-					   curr_state),
-	},
-	{
-		.data_type      = QMI_STRING,
-		.elem_len       = SERVREG_NAME_LENGTH + 1,
-		.elem_size      = sizeof(char),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x02,
-		.offset         = offsetof(struct servreg_state_updated_ind,
-					   service_path),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_2_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u16),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x03,
-		.offset         = offsetof(struct servreg_state_updated_ind,
-					   transaction_id),
-	},
-	{}
-};
-
 struct servreg_set_ack_req {
 	char service_path[SERVREG_NAME_LENGTH + 1];
 	u16 transaction_id;
 };
 
-static const struct qmi_elem_info servreg_set_ack_req_ei[] = {
-	{
-		.data_type      = QMI_STRING,
-		.elem_len       = SERVREG_NAME_LENGTH + 1,
-		.elem_size      = sizeof(char),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x01,
-		.offset         = offsetof(struct servreg_set_ack_req,
-					   service_path),
-	},
-	{
-		.data_type      = QMI_UNSIGNED_2_BYTE,
-		.elem_len       = 1,
-		.elem_size      = sizeof(u16),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x02,
-		.offset         = offsetof(struct servreg_set_ack_req,
-					   transaction_id),
-	},
-	{}
-};
-
 struct servreg_set_ack_resp {
 	struct qmi_response_type_v01 resp;
 };
 
-static const struct qmi_elem_info servreg_set_ack_resp_ei[] = {
-	{
-		.data_type      = QMI_STRUCT,
-		.elem_len       = 1,
-		.elem_size      = sizeof(struct qmi_response_type_v01),
-		.array_type	= NO_ARRAY,
-		.tlv_type       = 0x02,
-		.offset         = offsetof(struct servreg_set_ack_resp,
-					   resp),
-		.ei_array       = qmi_response_type_v01_ei,
-	},
-	{}
-};
+extern const struct qmi_elem_info servreg_location_entry_ei[];
+extern const struct qmi_elem_info servreg_get_domain_list_req_ei[];
+extern const struct qmi_elem_info servreg_get_domain_list_resp_ei[];
+extern const struct qmi_elem_info servreg_register_listener_req_ei[];
+extern const struct qmi_elem_info servreg_register_listener_resp_ei[];
+extern const struct qmi_elem_info servreg_restart_pd_req_ei[];
+extern const struct qmi_elem_info servreg_restart_pd_resp_ei[];
+extern const struct qmi_elem_info servreg_state_updated_ind_ei[];
+extern const struct qmi_elem_info servreg_set_ack_req_ei[];
+extern const struct qmi_elem_info servreg_set_ack_resp_ei[];
 
 #endif
diff --git a/drivers/soc/qcom/qcom_pdr_msg.c b/drivers/soc/qcom/qcom_pdr_msg.c
new file mode 100644
index 000000000000..9b46f42aa146
--- /dev/null
+++ b/drivers/soc/qcom/qcom_pdr_msg.c
@@ -0,0 +1,319 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2020 The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/module.h>
+#include <linux/soc/qcom/qmi.h>
+
+#include "pdr_internal.h"
+
+const struct qmi_elem_info servreg_location_entry_ei[] = {
+	{
+		.data_type      = QMI_STRING,
+		.elem_len       = SERVREG_NAME_LENGTH + 1,
+		.elem_size      = sizeof(char),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0,
+		.offset         = offsetof(struct servreg_location_entry,
+					   name),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_4_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u32),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0,
+		.offset         = offsetof(struct servreg_location_entry,
+					   instance),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_1_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0,
+		.offset         = offsetof(struct servreg_location_entry,
+					   service_data_valid),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_4_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u32),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0,
+		.offset         = offsetof(struct servreg_location_entry,
+					   service_data),
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_location_entry_ei);
+
+const struct qmi_elem_info servreg_get_domain_list_req_ei[] = {
+	{
+		.data_type      = QMI_STRING,
+		.elem_len       = SERVREG_NAME_LENGTH + 1,
+		.elem_size      = sizeof(char),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x01,
+		.offset         = offsetof(struct servreg_get_domain_list_req,
+					   service_name),
+	},
+	{
+		.data_type      = QMI_OPT_FLAG,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x10,
+		.offset         = offsetof(struct servreg_get_domain_list_req,
+					   domain_offset_valid),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_4_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u32),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x10,
+		.offset         = offsetof(struct servreg_get_domain_list_req,
+					   domain_offset),
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_get_domain_list_req_ei);
+
+const struct qmi_elem_info servreg_get_domain_list_resp_ei[] = {
+	{
+		.data_type      = QMI_STRUCT,
+		.elem_len       = 1,
+		.elem_size      = sizeof(struct qmi_response_type_v01),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x02,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   resp),
+		.ei_array      = qmi_response_type_v01_ei,
+	},
+	{
+		.data_type      = QMI_OPT_FLAG,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x10,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   total_domains_valid),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_2_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u16),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x10,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   total_domains),
+	},
+	{
+		.data_type      = QMI_OPT_FLAG,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x11,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   db_rev_count_valid),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_2_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u16),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x11,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   db_rev_count),
+	},
+	{
+		.data_type      = QMI_OPT_FLAG,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x12,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   domain_list_valid),
+	},
+	{
+		.data_type      = QMI_DATA_LEN,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x12,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   domain_list_len),
+	},
+	{
+		.data_type      = QMI_STRUCT,
+		.elem_len       = SERVREG_DOMAIN_LIST_LENGTH,
+		.elem_size      = sizeof(struct servreg_location_entry),
+		.array_type	= VAR_LEN_ARRAY,
+		.tlv_type       = 0x12,
+		.offset         = offsetof(struct servreg_get_domain_list_resp,
+					   domain_list),
+		.ei_array      = servreg_location_entry_ei,
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_get_domain_list_resp_ei);
+
+const struct qmi_elem_info servreg_register_listener_req_ei[] = {
+	{
+		.data_type      = QMI_UNSIGNED_1_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x01,
+		.offset         = offsetof(struct servreg_register_listener_req,
+					   enable),
+	},
+	{
+		.data_type      = QMI_STRING,
+		.elem_len       = SERVREG_NAME_LENGTH + 1,
+		.elem_size      = sizeof(char),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x02,
+		.offset         = offsetof(struct servreg_register_listener_req,
+					   service_path),
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_register_listener_req_ei);
+
+const struct qmi_elem_info servreg_register_listener_resp_ei[] = {
+	{
+		.data_type      = QMI_STRUCT,
+		.elem_len       = 1,
+		.elem_size      = sizeof(struct qmi_response_type_v01),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x02,
+		.offset         = offsetof(struct servreg_register_listener_resp,
+					   resp),
+		.ei_array      = qmi_response_type_v01_ei,
+	},
+	{
+		.data_type      = QMI_OPT_FLAG,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x10,
+		.offset         = offsetof(struct servreg_register_listener_resp,
+					   curr_state_valid),
+	},
+	{
+		.data_type      = QMI_SIGNED_4_BYTE_ENUM,
+		.elem_len       = 1,
+		.elem_size      = sizeof(enum servreg_service_state),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x10,
+		.offset         = offsetof(struct servreg_register_listener_resp,
+					   curr_state),
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_register_listener_resp_ei);
+
+const struct qmi_elem_info servreg_restart_pd_req_ei[] = {
+	{
+		.data_type      = QMI_STRING,
+		.elem_len       = SERVREG_NAME_LENGTH + 1,
+		.elem_size      = sizeof(char),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x01,
+		.offset         = offsetof(struct servreg_restart_pd_req,
+					   service_path),
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_restart_pd_req_ei);
+
+const struct qmi_elem_info servreg_restart_pd_resp_ei[] = {
+	{
+		.data_type      = QMI_STRUCT,
+		.elem_len       = 1,
+		.elem_size      = sizeof(struct qmi_response_type_v01),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x02,
+		.offset         = offsetof(struct servreg_restart_pd_resp,
+					   resp),
+		.ei_array      = qmi_response_type_v01_ei,
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_restart_pd_resp_ei);
+
+const struct qmi_elem_info servreg_state_updated_ind_ei[] = {
+	{
+		.data_type      = QMI_SIGNED_4_BYTE_ENUM,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u32),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x01,
+		.offset         = offsetof(struct servreg_state_updated_ind,
+					   curr_state),
+	},
+	{
+		.data_type      = QMI_STRING,
+		.elem_len       = SERVREG_NAME_LENGTH + 1,
+		.elem_size      = sizeof(char),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x02,
+		.offset         = offsetof(struct servreg_state_updated_ind,
+					   service_path),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_2_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u16),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x03,
+		.offset         = offsetof(struct servreg_state_updated_ind,
+					   transaction_id),
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_state_updated_ind_ei);
+
+const struct qmi_elem_info servreg_set_ack_req_ei[] = {
+	{
+		.data_type      = QMI_STRING,
+		.elem_len       = SERVREG_NAME_LENGTH + 1,
+		.elem_size      = sizeof(char),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x01,
+		.offset         = offsetof(struct servreg_set_ack_req,
+					   service_path),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_2_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u16),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x02,
+		.offset         = offsetof(struct servreg_set_ack_req,
+					   transaction_id),
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_set_ack_req_ei);
+
+const struct qmi_elem_info servreg_set_ack_resp_ei[] = {
+	{
+		.data_type      = QMI_STRUCT,
+		.elem_len       = 1,
+		.elem_size      = sizeof(struct qmi_response_type_v01),
+		.array_type	= NO_ARRAY,
+		.tlv_type       = 0x02,
+		.offset         = offsetof(struct servreg_set_ack_resp,
+					   resp),
+		.ei_array       = qmi_response_type_v01_ei,
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(servreg_set_ack_resp_ei);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Qualcomm Protection Domain messages data");

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v8 2/5] soc: qcom: pdr: fix parsing of domains lists
  2024-05-11 21:56  1% [PATCH v8 0/5] soc: qcom: add in-kernel pd-mapper implementation Dmitry Baryshkov
  2024-05-11 21:56  4% ` [PATCH v8 1/5] soc: qcom: pdr: protect locator_addr with the main mutex Dmitry Baryshkov
@ 2024-05-11 21:56  1% ` Dmitry Baryshkov
  2024-05-11 21:56  1% ` [PATCH v8 3/5] soc: qcom: pdr: extract PDR message marshalling data Dmitry Baryshkov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Sibi Sankar, Mathieu Poirier
  Cc: linux-arm-msm, linux-kernel, linux-remoteproc, Johan Hovold,
	Xilin Wu, Bryan O'Donoghue, Steev Klimaszewski,
	Alexey Minnekhanov

While parsing the domains list, start offsets from 0 rather than from
domains_read. The domains_read is equal to the total count of the
domains we have seen, while the domains list in the message starts from
offset 0.

Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/soc/qcom/pdr_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c
index e014dd2d8ab3..d495ee736519 100644
--- a/drivers/soc/qcom/pdr_interface.c
+++ b/drivers/soc/qcom/pdr_interface.c
@@ -422,7 +422,7 @@ static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds)
 		if (ret < 0)
 			goto out;
 
-		for (i = domains_read; i < resp->domain_list_len; i++) {
+		for (i = 0; i < resp->domain_list_len; i++) {
 			entry = &resp->domain_list[i];
 
 			if (strnlen(entry->name, sizeof(entry->name)) == sizeof(entry->name))

-- 
2.39.2


^ permalink raw reply related	[relevance 1%]

* [PATCH v8 1/5] soc: qcom: pdr: protect locator_addr with the main mutex
  2024-05-11 21:56  1% [PATCH v8 0/5] soc: qcom: add in-kernel pd-mapper implementation Dmitry Baryshkov
@ 2024-05-11 21:56  4% ` Dmitry Baryshkov
  2024-05-11 21:56  1% ` [PATCH v8 2/5] soc: qcom: pdr: fix parsing of domains lists Dmitry Baryshkov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Sibi Sankar, Mathieu Poirier
  Cc: linux-arm-msm, linux-kernel, linux-remoteproc, Johan Hovold,
	Xilin Wu, Bryan O'Donoghue, Steev Klimaszewski,
	Alexey Minnekhanov, Neil Armstrong

If the service locator server is restarted fast enough, the PDR can
rewrite locator_addr fields concurrently. Protect them by placing
modification of those fields under the main pdr->lock.

Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/soc/qcom/pdr_interface.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c
index a1b6a4081dea..e014dd2d8ab3 100644
--- a/drivers/soc/qcom/pdr_interface.c
+++ b/drivers/soc/qcom/pdr_interface.c
@@ -76,12 +76,12 @@ static int pdr_locator_new_server(struct qmi_handle *qmi,
 					      locator_hdl);
 	struct pdr_service *pds;
 
+	mutex_lock(&pdr->lock);
 	/* Create a local client port for QMI communication */
 	pdr->locator_addr.sq_family = AF_QIPCRTR;
 	pdr->locator_addr.sq_node = svc->node;
 	pdr->locator_addr.sq_port = svc->port;
 
-	mutex_lock(&pdr->lock);
 	pdr->locator_init_complete = true;
 	mutex_unlock(&pdr->lock);
 
@@ -104,10 +104,10 @@ static void pdr_locator_del_server(struct qmi_handle *qmi,
 
 	mutex_lock(&pdr->lock);
 	pdr->locator_init_complete = false;
-	mutex_unlock(&pdr->lock);
 
 	pdr->locator_addr.sq_node = 0;
 	pdr->locator_addr.sq_port = 0;
+	mutex_unlock(&pdr->lock);
 }
 
 static const struct qmi_ops pdr_locator_ops = {
@@ -365,6 +365,7 @@ static int pdr_get_domain_list(struct servreg_get_domain_list_req *req,
 	if (ret < 0)
 		return ret;
 
+	mutex_lock(&pdr->lock);
 	ret = qmi_send_request(&pdr->locator_hdl,
 			       &pdr->locator_addr,
 			       &txn, SERVREG_GET_DOMAIN_LIST_REQ,
@@ -373,15 +374,16 @@ static int pdr_get_domain_list(struct servreg_get_domain_list_req *req,
 			       req);
 	if (ret < 0) {
 		qmi_txn_cancel(&txn);
-		return ret;
+		goto err_unlock;
 	}
 
 	ret = qmi_txn_wait(&txn, 5 * HZ);
 	if (ret < 0) {
 		pr_err("PDR: %s get domain list txn wait failed: %d\n",
 		       req->service_name, ret);
-		return ret;
+		goto err_unlock;
 	}
+	mutex_unlock(&pdr->lock);
 
 	if (resp->resp.result != QMI_RESULT_SUCCESS_V01) {
 		pr_err("PDR: %s get domain list failed: 0x%x\n",
@@ -390,6 +392,11 @@ static int pdr_get_domain_list(struct servreg_get_domain_list_req *req,
 	}
 
 	return 0;
+
+err_unlock:
+	mutex_unlock(&pdr->lock);
+
+	return ret;
 }
 
 static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds)

-- 
2.39.2


^ permalink raw reply related	[relevance 4%]

* [PATCH v8 0/5] soc: qcom: add in-kernel pd-mapper implementation
@ 2024-05-11 21:56  1% Dmitry Baryshkov
  2024-05-11 21:56  4% ` [PATCH v8 1/5] soc: qcom: pdr: protect locator_addr with the main mutex Dmitry Baryshkov
                   ` (4 more replies)
  0 siblings, 5 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Sibi Sankar, Mathieu Poirier
  Cc: linux-arm-msm, linux-kernel, linux-remoteproc, Johan Hovold,
	Xilin Wu, Bryan O'Donoghue, Steev Klimaszewski,
	Alexey Minnekhanov, Neil Armstrong

Protection domain mapper is a QMI service providing mapping between
'protection domains' and services supported / allowed in these domains.
For example such mapping is required for loading of the WiFi firmware or
for properly starting up the UCSI / altmode / battery manager support.

The existing userspace implementation has several issue. It doesn't play
well with CONFIG_EXTRA_FIRMWARE, it doesn't reread the JSON files if the
firmware location is changed (or if the firmware was not available at
the time pd-mapper was started but the corresponding directory is
mounted later), etc.

However this configuration is largely static and common between
different platforms. Provide in-kernel service implementing static
per-platform data.

To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Sibi Sankar <quic_sibis@quicinc.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-remoteproc@vger.kernel.org
Cc: Johan Hovold <johan+linaro@kernel.org>
Cc: Xilin Wu <wuxilin123@gmail.com>
Cc: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org>
Cc: Steev Klimaszewski <steev@kali.org>
Cc: Alexey Minnekhanov <alexeymin@postmarketos.org>

--

Changes in v8:
- Reworked pd-mapper to register as an rproc_subdev / auxdev
- Dropped Tested-by from Steev and Alexey from the last patch since the
  implementation was changed significantly.
- Add sensors, cdsp and mpss_root domains to 660 config (Alexey
  Minnekhanov)
- Added platform entry for sm4250 (used for qrb4210 / RB2)
- Added locking to the pdr_get_domain_list() (Chris Lew)
- Remove the call to qmi_del_server() and corresponding API (Chris Lew)
- In qmi_handle_init() changed 1024 to a defined constant (Chris Lew)
- Link to v7: https://lore.kernel.org/r/20240424-qcom-pd-mapper-v7-0-05f7fc646e0f@linaro.org

Changes in v7:
- Fixed modular build (Steev)
- Link to v6: https://lore.kernel.org/r/20240422-qcom-pd-mapper-v6-0-f96957d01207@linaro.org

Changes in v6:
- Reworked mutex to fix lockdep issue on deregistration
- Fixed dependencies between PD-mapper and remoteproc to fix modular
  builds (Krzysztof)
- Added EXPORT_SYMBOL_GPL to fix modular builds (Krzysztof)
- Fixed kerneldocs (Krzysztof)
- Removed extra pr_debug messages (Krzysztof)
- Fixed wcss build (Krzysztof)
- Added platforms which do not require protection domain mapping to
  silence the notice on those platforms
- Link to v5: https://lore.kernel.org/r/20240419-qcom-pd-mapper-v5-0-e35b6f847e99@linaro.org

Changes in v5:
- pdr: drop lock in pdr_register_listener, list_lock is already held (Chris Lew)
- pd_mapper: reworked to provide static configuration per platform
  (Bjorn)
- Link to v4: https://lore.kernel.org/r/20240311-qcom-pd-mapper-v4-0-24679cca5c24@linaro.org

Changes in v4:
- Fixed missing chunk, reenabled kfree in qmi_del_server (Konrad)
- Added configuration for sm6350 (Thanks to Luca)
- Removed RFC tag (Konrad)
- Link to v3: https://lore.kernel.org/r/20240304-qcom-pd-mapper-v3-0-6858fa1ac1c8@linaro.org

Changes in RFC v3:
- Send start / stop notifications when PD-mapper domain list is changed
- Reworked the way PD-mapper treats protection domains, register all of
  them in a single batch
- Added SC7180 domains configuration based on TCL Book 14 GO
- Link to v2: https://lore.kernel.org/r/20240301-qcom-pd-mapper-v2-0-5d12a081d9d1@linaro.org

Changes in RFC v2:
- Swapped num_domains / domains (Konrad)
- Fixed an issue with battery not working on sc8280xp
- Added missing configuration for QCS404

---
Dmitry Baryshkov (5):
      soc: qcom: pdr: protect locator_addr with the main mutex
      soc: qcom: pdr: fix parsing of domains lists
      soc: qcom: pdr: extract PDR message marshalling data
      soc: qcom: add pd-mapper implementation
      remoteproc: qcom: enable in-kernel PD mapper

 drivers/remoteproc/qcom_common.c    |  87 +++++
 drivers/remoteproc/qcom_common.h    |  10 +
 drivers/remoteproc/qcom_q6v5_adsp.c |   3 +
 drivers/remoteproc/qcom_q6v5_mss.c  |   3 +
 drivers/remoteproc/qcom_q6v5_pas.c  |   3 +
 drivers/remoteproc/qcom_q6v5_wcss.c |   3 +
 drivers/soc/qcom/Kconfig            |  15 +
 drivers/soc/qcom/Makefile           |   2 +
 drivers/soc/qcom/pdr_interface.c    |  17 +-
 drivers/soc/qcom/pdr_internal.h     | 318 ++---------------
 drivers/soc/qcom/qcom_pd_mapper.c   | 676 ++++++++++++++++++++++++++++++++++++
 drivers/soc/qcom/qcom_pdr_msg.c     | 353 +++++++++++++++++++
 12 files changed, 1190 insertions(+), 300 deletions(-)
---
base-commit: e5119bbdaca76cd3c15c3c975d51d840bbfb2488
change-id: 20240301-qcom-pd-mapper-e12d622d4ad0

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply	[relevance 1%]

* Re: [PATCH v7 1/6] soc: qcom: pdr: protect locator_addr with the main mutex
  @ 2024-05-11 21:52  0%     ` Dmitry Baryshkov
  0 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:52 UTC (permalink / raw)
  To: Chris Lew
  Cc: Bjorn Andersson, Konrad Dybcio, Sibi Sankar, Mathieu Poirier,
	linux-arm-msm, linux-kernel, linux-remoteproc, Johan Hovold,
	Xilin Wu, Bryan O'Donoghue, Neil Armstrong

On Thu, 25 Apr 2024 at 22:30, Chris Lew <quic_clew@quicinc.com> wrote:
>
>
> On 4/24/2024 2:27 AM, Dmitry Baryshkov wrote:
> > If the service locator server is restarted fast enough, the PDR can
> > rewrite locator_addr fields concurrently. Protect them by placing
> > modification of those fields under the main pdr->lock.
> >
> > Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
> > Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >   drivers/soc/qcom/pdr_interface.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c
> > index a1b6a4081dea..19cfe4b41235 100644
> > --- a/drivers/soc/qcom/pdr_interface.c
> > +++ b/drivers/soc/qcom/pdr_interface.c
> > @@ -76,12 +76,12 @@ static int pdr_locator_new_server(struct qmi_handle *qmi,
> >                                             locator_hdl);
> >       struct pdr_service *pds;
> >
> > +     mutex_lock(&pdr->lock);
> >       /* Create a local client port for QMI communication */
> >       pdr->locator_addr.sq_family = AF_QIPCRTR;
> >       pdr->locator_addr.sq_node = svc->node;
> >       pdr->locator_addr.sq_port = svc->port;
> >
> > -     mutex_lock(&pdr->lock);
> >       pdr->locator_init_complete = true;
> >       mutex_unlock(&pdr->lock);
> >
> > @@ -104,10 +104,10 @@ static void pdr_locator_del_server(struct qmi_handle *qmi,
> >
> >       mutex_lock(&pdr->lock);
> >       pdr->locator_init_complete = false;
> > -     mutex_unlock(&pdr->lock);
> >
> >       pdr->locator_addr.sq_node = 0;
> >       pdr->locator_addr.sq_port = 0;
> > +     mutex_unlock(&pdr->lock);
> >   }
> >
> >   static const struct qmi_ops pdr_locator_ops = {
> >
>
> These two functions are provided as qmi_ops handlers in pdr_locator_ops.
> Aren't they serialized in the qmi handle's workqueue since it as an
> ordered_workqueue? Even in a fast pdr scenario I don't think we would
> see a race condition between these two functions.
>
> The other access these two functions do race against is in the
> pdr_notifier_work. I think you would need to protect locator_addr in
> pdr_get_domain_list since the qmi_send_request there uses
> 'pdr->locator_addr'.

Thanks, I missed it initially. I think I'd keep the rest of the
changes and expand the lock to cover pdr_get_domain_list().

>
> Thanks!
> Chris



-- 
With best wishes
Dmitry

^ permalink raw reply	[relevance 0%]

* [folded-merged] selftest-mm-mseal-read-only-elf-memory-segment-fix-4.patch removed from -mm tree
@ 2024-05-11 21:50  1% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 21:50 UTC (permalink / raw)
  To: mm-commits, ryan.roberts, jeffxu, akpm


The quilt patch titled
     Subject: selftest mm/mseal: fix arm build
has been removed from the -mm tree.  Its filename was
     selftest-mm-mseal-read-only-elf-memory-segment-fix-4.patch

This patch was dropped because it was folded into selftest-mm-mseal-read-only-elf-memory-segment.patch

------------------------------------------------------
From: Jeff Xu <jeffxu@chromium.org>
Subject: selftest mm/mseal: fix arm build
Date: Thu, 2 May 2024 22:53:31 +0000

Add include linux/mman.h to fix arm build.  Fix a typo.

Link: https://lkml.kernel.org/r/20240502225331.3806279-2-jeffxu@chromium.org
Signed-off-by: Jeff Xu <jeffxu@chromium.org>
Suggested-by: Ryan Roberts <ryan.roberts@arm.com>
Tested-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> 
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/mseal_test.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/tools/testing/selftests/mm/mseal_test.c~selftest-mm-mseal-read-only-elf-memory-segment-fix-4
+++ a/tools/testing/selftests/mm/mseal_test.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
+#include <linux/mman.h>
 #include <sys/mman.h>
 #include <stdint.h>
 #include <unistd.h>
@@ -29,7 +30,7 @@
 # define PKEY_DISABLE_WRITE     0x2
 #endif
 
-#ifndef PKEY_BITS_PER_KEY
+#ifndef PKEY_BITS_PER_PKEY
 #define PKEY_BITS_PER_PKEY      2
 #endif
 
_

Patches currently in -mm which might be from jeffxu@chromium.org are

mseal-wire-up-mseal-syscall.patch
mseal-add-mseal-syscall.patch
selftest-mm-mseal-memory-sealing.patch
mseal-add-documentation.patch
selftest-mm-mseal-read-only-elf-memory-segment.patch


^ permalink raw reply	[relevance 1%]

* [folded-merged] selftest-mm-mseal-read-only-elf-memory-segment-fix.patch removed from -mm tree
@ 2024-05-11 21:50  2% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 21:50 UTC (permalink / raw)
  To: mm-commits, willy, usama.anjum, torvalds, surenb, sroettger,
	shuah, pedro.falcato, Liam.Howlett, keescook, jorgelo, jeffxu,
	javier.carrasco.cruz, jannh, groeck, gregkh, dave.hansen, corbet,
	amer.shanawany, jeffxu, akpm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 16524 bytes --]


The quilt patch titled
     Subject: selftest mm/mseal: style change
has been removed from the -mm tree.  Its filename was
     selftest-mm-mseal-read-only-elf-memory-segment-fix.patch

This patch was dropped because it was folded into selftest-mm-mseal-read-only-elf-memory-segment.patch

------------------------------------------------------
From: Jeff Xu <jeffxu@chromium.org>
Subject: selftest mm/mseal: style change
Date: Tue, 16 Apr 2024 22:09:44 +0000

remove "assert" from testcase.
remove "return 0"

Link: https://lkml.kernel.org/r/20240416220944.2481203-2-jeffxu@chromium.org
Signed-off-by: Jeff Xu <jeffxu@chromium.org>
Suggested-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Amer Al Shanawany <amer.shanawany@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Jann Horn <jannh@google.com>
Cc: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: Jeff Xu <jeffxu@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jorge Lucangeli Obes <jorgelo@chromium.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Stephen Röttger <sroettger@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/mseal_test.c |  124 ++++++++++++++++------
 tools/testing/selftests/mm/seal_elf.c   |    3 
 2 files changed, 91 insertions(+), 36 deletions(-)

--- a/tools/testing/selftests/mm/mseal_test.c~selftest-mm-mseal-read-only-elf-memory-segment-fix
+++ a/tools/testing/selftests/mm/mseal_test.c
@@ -12,9 +12,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 #include <fcntl.h>
-#include <assert.h>
 #include <sys/ioctl.h>
 #include <sys/vfs.h>
 #include <sys/stat.h>
@@ -189,7 +187,6 @@ static void __write_pkey_reg(u64 pkey_re
 
 	asm volatile(".byte 0x0f,0x01,0xef\n\t"
 			: : "a" (eax), "c" (ecx), "d" (edx));
-	assert(pkey_reg == __read_pkey_reg());
 #endif
 }
 
@@ -214,7 +211,6 @@ static void set_pkey(int pkey, unsigned
 	unsigned long mask = (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE);
 	u64 new_pkey_reg;
 
-	assert(!(pkey_value & ~mask));
 	new_pkey_reg = set_pkey_bits(__read_pkey_reg(), pkey, pkey_value);
 	__write_pkey_reg(new_pkey_reg);
 }
@@ -224,7 +220,6 @@ static void setup_single_address(int siz
 	void *ptr;
 
 	ptr = sys_mmap(NULL, size, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
-	assert(ptr != (void *)-1);
 	*ptrOut = ptr;
 }
 
@@ -234,24 +229,21 @@ static void setup_single_address_rw(int
 	unsigned long mapflags = MAP_ANONYMOUS | MAP_PRIVATE;
 
 	ptr = sys_mmap(NULL, size, PROT_READ | PROT_WRITE, mapflags, -1, 0);
-	assert(ptr != (void *)-1);
 	*ptrOut = ptr;
 }
 
-static void clean_single_address(void *ptr, int size)
+static int clean_single_address(void *ptr, int size)
 {
 	int ret;
-
 	ret = munmap(ptr, size);
-	assert(!ret);
+	return ret;
 }
 
-static void seal_single_address(void *ptr, int size)
+static int seal_single_address(void *ptr, int size)
 {
 	int ret;
-
 	ret = sys_mseal(ptr, size);
-	assert(!ret);
+	return ret;
 }
 
 bool seal_support(void)
@@ -290,6 +282,7 @@ static void test_seal_addseal(void)
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	ret = sys_mseal(ptr, size);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -305,6 +298,7 @@ static void test_seal_unmapped_start(voi
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* munmap 2 pages from ptr. */
 	ret = sys_munmap(ptr, 2 * page_size);
@@ -332,6 +326,7 @@ static void test_seal_unmapped_middle(vo
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* munmap 2 pages from ptr + page. */
 	ret = sys_munmap(ptr + page_size, 2 * page_size);
@@ -363,6 +358,7 @@ static void test_seal_unmapped_end(void)
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* unmap last 2 pages. */
 	ret = sys_munmap(ptr + 2 * page_size, 2 * page_size);
@@ -391,6 +387,7 @@ static void test_seal_multiple_vmas(void
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split the vma into 3. */
 	ret = sys_mprotect(ptr + page_size, 2 * page_size,
@@ -421,6 +418,7 @@ static void test_seal_split_start(void)
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split at middle */
 	ret = sys_mprotect(ptr, 2 * page_size, PROT_READ | PROT_WRITE);
@@ -445,6 +443,7 @@ static void test_seal_split_end(void)
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split at middle */
 	ret = sys_mprotect(ptr, 2 * page_size, PROT_READ | PROT_WRITE);
@@ -469,7 +468,9 @@ static void test_seal_invalid_input(void
 	int ret;
 
 	setup_single_address(8 * page_size, &ptr);
-	clean_single_address(ptr + 4 * page_size, 4 * page_size);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
+	ret = clean_single_address(ptr + 4 * page_size, 4 * page_size);
+	FAIL_TEST_IF_FALSE(!ret);
 
 	/* invalid flag */
 	ret = syscall(__NR_mseal, ptr, size, 0x20);
@@ -502,6 +503,7 @@ static void test_seal_zero_length(void)
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	ret = sys_mprotect(ptr, 0, PROT_READ | PROT_WRITE);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -551,6 +553,7 @@ static void test_seal_twice(void)
 	unsigned long size = 4 * page_size;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	ret = sys_mseal(ptr, size);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -570,9 +573,12 @@ static void test_seal_mprotect(bool seal
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
-	if (seal)
-		seal_single_address(ptr, size);
+	if (seal) {
+		ret = seal_single_address(ptr, size);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	ret = sys_mprotect(ptr, size, PROT_READ | PROT_WRITE);
 	if (seal)
@@ -591,9 +597,12 @@ static void test_seal_start_mprotect(boo
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
-	if (seal)
-		seal_single_address(ptr, page_size);
+	if (seal) {
+		ret = seal_single_address(ptr, page_size);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	/* the first page is sealed. */
 	ret = sys_mprotect(ptr, page_size, PROT_READ | PROT_WRITE);
@@ -618,9 +627,12 @@ static void test_seal_end_mprotect(bool
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
-	if (seal)
-		seal_single_address(ptr + page_size, 3 * page_size);
+	if (seal) {
+		ret = seal_single_address(ptr + page_size, 3 * page_size);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	/* first page is not sealed */
 	ret = sys_mprotect(ptr, page_size, PROT_READ | PROT_WRITE);
@@ -645,9 +657,12 @@ static void test_seal_mprotect_unalign_l
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
-	if (seal)
-		seal_single_address(ptr, page_size * 2 - 1);
+	if (seal) {
+		ret = seal_single_address(ptr, page_size * 2 - 1);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	/* 2 pages are sealed. */
 	ret = sys_mprotect(ptr, page_size * 2, PROT_READ | PROT_WRITE);
@@ -671,8 +686,11 @@ static void test_seal_mprotect_unalign_l
 	int ret;
 
 	setup_single_address(size, &ptr);
-	if (seal)
-		seal_single_address(ptr, page_size * 2 + 1);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
+	if (seal) {
+		ret =  seal_single_address(ptr, page_size * 2 + 1);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	/* 3 pages are sealed. */
 	ret = sys_mprotect(ptr, page_size * 3, PROT_READ | PROT_WRITE);
@@ -696,13 +714,16 @@ static void test_seal_mprotect_two_vma(b
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split */
 	ret = sys_mprotect(ptr, page_size * 2, PROT_READ | PROT_WRITE);
 	FAIL_TEST_IF_FALSE(!ret);
 
-	if (seal)
-		seal_single_address(ptr, page_size * 4);
+	if (seal) {
+		ret = seal_single_address(ptr, page_size * 4);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	ret = sys_mprotect(ptr, page_size * 2, PROT_READ | PROT_WRITE);
 	if (seal)
@@ -728,14 +749,17 @@ static void test_seal_mprotect_two_vma_w
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split as two vma. */
 	ret = sys_mprotect(ptr, page_size * 2, PROT_READ | PROT_WRITE);
 	FAIL_TEST_IF_FALSE(!ret);
 
 	/* mseal can apply across 2 vma, also split them. */
-	if (seal)
-		seal_single_address(ptr + page_size, page_size * 2);
+	if (seal) {
+		ret = seal_single_address(ptr + page_size, page_size * 2);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	/* the first page is not sealed. */
 	ret = sys_mprotect(ptr, page_size, PROT_READ | PROT_WRITE);
@@ -772,10 +796,13 @@ static void test_seal_mprotect_partial_m
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* seal one page. */
-	if (seal)
-		seal_single_address(ptr, page_size);
+	if (seal) {
+		ret = seal_single_address(ptr, page_size);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	/* mprotect first 2 page will fail, since the first page are sealed. */
 	ret = sys_mprotect(ptr, 2 * page_size, PROT_READ | PROT_WRITE);
@@ -795,6 +822,7 @@ static void test_seal_mprotect_two_vma_w
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split. */
 	ret = sys_mprotect(ptr, page_size, PROT_READ | PROT_WRITE);
@@ -837,6 +865,7 @@ static void test_seal_mprotect_split(boo
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split. */
 	ret = sys_mprotect(ptr, page_size, PROT_READ | PROT_WRITE);
@@ -873,6 +902,7 @@ static void test_seal_mprotect_merge(boo
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split one page. */
 	ret = sys_mprotect(ptr, page_size, PROT_READ | PROT_WRITE);
@@ -906,6 +936,7 @@ static void test_seal_munmap(bool seal)
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -936,6 +967,7 @@ static void test_seal_munmap_two_vma(boo
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect to split */
 	ret = sys_mprotect(ptr, page_size * 2, PROT_READ | PROT_WRITE);
@@ -976,6 +1008,7 @@ static void test_seal_munmap_vma_with_ga
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	ret = sys_munmap(ptr + page_size, page_size * 2);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -1007,6 +1040,7 @@ static void test_munmap_start_freed(bool
 	int prot;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* unmap the first page. */
 	ret = sys_munmap(ptr, page_size);
@@ -1045,6 +1079,8 @@ static void test_munmap_end_freed(bool s
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
+
 	/* unmap last page. */
 	ret = sys_munmap(ptr + page_size * 3, page_size);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -1074,6 +1110,8 @@ static void test_munmap_middle_freed(boo
 	int prot;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
+
 	/* unmap 2 pages in the middle. */
 	ret = sys_munmap(ptr + page_size, page_size * 2);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -1116,6 +1154,7 @@ static void test_seal_mremap_shrink(bool
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1144,6 +1183,7 @@ static void test_seal_mremap_expand(bool
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 	/* ummap last 2 pages. */
 	ret = sys_munmap(ptr + 2 * page_size, 2 * page_size);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -1175,8 +1215,11 @@ static void test_seal_mremap_move(bool s
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 	setup_single_address(size, &newPtr);
-	clean_single_address(newPtr, size);
+	FAIL_TEST_IF_FALSE(newPtr != (void *)-1);
+	ret = clean_single_address(newPtr, size);
+	FAIL_TEST_IF_FALSE(!ret);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1205,6 +1248,7 @@ static void test_seal_mmap_overwrite_pro
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1232,6 +1276,7 @@ static void test_seal_mmap_expand(bool s
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 	/* ummap last 4 pages. */
 	ret = sys_munmap(ptr + 8 * page_size, 4 * page_size);
 	FAIL_TEST_IF_FALSE(!ret);
@@ -1262,6 +1307,7 @@ static void test_seal_mmap_shrink(bool s
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1290,7 +1336,9 @@ static void test_seal_mremap_shrink_fixe
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 	setup_single_address(size, &newAddr);
+	FAIL_TEST_IF_FALSE(newAddr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1319,7 +1367,9 @@ static void test_seal_mremap_expand_fixe
 	void *ret2;
 
 	setup_single_address(page_size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 	setup_single_address(size, &newAddr);
+	FAIL_TEST_IF_FALSE(newAddr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(newAddr, size);
@@ -1348,7 +1398,9 @@ static void test_seal_mremap_move_fixed(
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 	setup_single_address(size, &newAddr);
+	FAIL_TEST_IF_FALSE(newAddr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(newAddr, size);
@@ -1375,6 +1427,7 @@ static void test_seal_mremap_move_fixed_
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1406,6 +1459,7 @@ static void test_seal_mremap_move_dontun
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1434,6 +1488,7 @@ static void test_seal_mremap_move_dontun
 	void *ret2;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	if (seal) {
 		ret = sys_mseal(ptr, size);
@@ -1469,6 +1524,7 @@ static void test_seal_merge_and_split(vo
 
 	/* (24 RO) */
 	setup_single_address(24 * page_size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
 	/* use mprotect(NONE) to set out boundary */
 	/* (1 NONE) (22 RO) (1 NONE) */
@@ -1700,9 +1756,12 @@ static void test_seal_discard_ro_anon(bo
 	int ret;
 
 	setup_single_address(size, &ptr);
+	FAIL_TEST_IF_FALSE(ptr != (void *)-1);
 
-	if (seal)
-		seal_single_address(ptr, size);
+	if (seal) {
+		ret = seal_single_address(ptr, size);
+		FAIL_TEST_IF_FALSE(!ret);
+	}
 
 	ret = sys_madvise(ptr, size, MADV_DONTNEED);
 	if (seal)
@@ -1832,5 +1891,4 @@ int main(int argc, char **argv)
 	test_seal_discard_ro_anon_on_pkey(true);
 
 	ksft_finished();
-	return 0;
 }
--- a/tools/testing/selftests/mm/seal_elf.c~selftest-mm-mseal-read-only-elf-memory-segment-fix
+++ a/tools/testing/selftests/mm/seal_elf.c
@@ -12,9 +12,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 #include <fcntl.h>
-#include <assert.h>
 #include <sys/ioctl.h>
 #include <sys/vfs.h>
 #include <sys/stat.h>
@@ -179,5 +177,4 @@ int main(int argc, char **argv)
 	test_seal_elf();
 
 	ksft_finished();
-	return 0;
 }
_

Patches currently in -mm which might be from jeffxu@chromium.org are

mseal-wire-up-mseal-syscall.patch
mseal-add-mseal-syscall.patch
selftest-mm-mseal-memory-sealing.patch
mseal-add-documentation.patch
selftest-mm-mseal-read-only-elf-memory-segment.patch
selftest-mm-mseal-read-only-elf-memory-segment-fix-3.patch
selftest-mm-mseal-read-only-elf-memory-segment-fix-4.patch


^ permalink raw reply	[relevance 2%]

* [folded-merged] mseal-add-mseal-syscall-fix.patch removed from -mm tree
@ 2024-05-11 21:49 10% Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 21:49 UTC (permalink / raw)
  To: mm-commits, willy, usama.anjum, torvalds, surenb, sroettger,
	shuah, pedro.falcato, Liam.Howlett, keescook, jorgelo, jeffxu,
	javier.carrasco.cruz, jannh, groeck, gregkh, dave.hansen, corbet,
	amer.shanawany, jeffxu, akpm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5083 bytes --]


The quilt patch titled
     Subject: mseal: add branch prediction hint
has been removed from the -mm tree.  Its filename was
     mseal-add-mseal-syscall-fix.patch

This patch was dropped because it was folded into mseal-add-mseal-syscall.patch

------------------------------------------------------
From: Jeff Xu <jeffxu@chromium.org>
Subject: mseal: add branch prediction hint
Date: Tue, 23 Apr 2024 19:28:25 +0000

It is unlikely that application calls mm syscall, such as mprotect, on
already sealed mappings, adding branch prediction hint.

Link: https://lkml.kernel.org/r/20240423192825.1273679-2-jeffxu@chromium.org
Signed-off-by: Jeff Xu <jeffxu@chromium.org>
Suggested-by: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Amer Al Shanawany <amer.shanawany@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Jann Horn <jannh@google.com>
Cc: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: Jeff Xu <jeffxu@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jorge Lucangeli Obes <jorgelo@chromium.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Stephen Röttger <sroettger@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/madvise.c  |    2 +-
 mm/mmap.c     |    4 ++--
 mm/mprotect.c |    2 +-
 mm/mremap.c   |    4 ++--
 mm/mseal.c    |    6 +++---
 5 files changed, 9 insertions(+), 9 deletions(-)

--- a/mm/madvise.c~mseal-add-mseal-syscall-fix
+++ a/mm/madvise.c
@@ -1449,7 +1449,7 @@ int do_madvise(struct mm_struct *mm, uns
 	 * Check if the address range is sealed for do_madvise().
 	 * can_modify_mm_madv assumes we have acquired the lock on MM.
 	 */
-	if (!can_modify_mm_madv(mm, start, end, behavior)) {
+	if (unlikely(!can_modify_mm_madv(mm, start, end, behavior))) {
 		error = -EPERM;
 		goto out;
 	}
--- a/mm/mmap.c~mseal-add-mseal-syscall-fix
+++ a/mm/mmap.c
@@ -2740,7 +2740,7 @@ int do_vmi_munmap(struct vma_iterator *v
 	 * Prevent unmapping a sealed VMA.
 	 * can_modify_mm assumes we have acquired the lock on MM.
 	 */
-	if (!can_modify_mm(mm, start, end))
+	if (unlikely(!can_modify_mm(mm, start, end)))
 		return -EPERM;
 
 	 /* arch_unmap() might do unmaps itself.  */
@@ -3163,7 +3163,7 @@ int do_vma_munmap(struct vma_iterator *v
 	 * Prevent unmapping a sealed VMA.
 	 * can_modify_mm assumes we have acquired the lock on MM.
 	 */
-	if (!can_modify_mm(mm, start, end))
+	if (unlikely(!can_modify_mm(mm, start, end)))
 		return -EPERM;
 
 	arch_unmap(mm, start, end);
--- a/mm/mprotect.c~mseal-add-mseal-syscall-fix
+++ a/mm/mprotect.c
@@ -749,7 +749,7 @@ static int do_mprotect_pkey(unsigned lon
 	 * checking if memory is sealed.
 	 * can_modify_mm assumes we have acquired the lock on MM.
 	 */
-	if (!can_modify_mm(current->mm, start, end)) {
+	if (unlikely(!can_modify_mm(current->mm, start, end))) {
 		error = -EPERM;
 		goto out;
 	}
--- a/mm/mremap.c~mseal-add-mseal-syscall-fix
+++ a/mm/mremap.c
@@ -912,7 +912,7 @@ static unsigned long mremap_to(unsigned
 	 *
 	 * can_modify_mm assumes we have acquired the lock on MM.
 	 */
-	if (!can_modify_mm(mm, addr, addr + old_len))
+	if (unlikely(!can_modify_mm(mm, addr, addr + old_len)))
 		return -EPERM;
 
 	if (flags & MREMAP_FIXED) {
@@ -1087,7 +1087,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, a
 	 * Place can_modify_mm here so we can keep the logic related to
 	 * shrink/expand together.
 	 */
-	if (!can_modify_mm(mm, addr, addr + old_len)) {
+	if (unlikely(!can_modify_mm(mm, addr, addr + old_len))) {
 		ret = -EPERM;
 		goto out;
 	}
--- a/mm/mseal.c~mseal-add-mseal-syscall-fix
+++ a/mm/mseal.c
@@ -32,7 +32,7 @@ static inline void set_vma_sealed(struct
  */
 static bool can_modify_vma(struct vm_area_struct *vma)
 {
-	if (vma_is_sealed(vma))
+	if (unlikely(vma_is_sealed(vma)))
 		return false;
 
 	return true;
@@ -75,7 +75,7 @@ bool can_modify_mm(struct mm_struct *mm,
 
 	/* going through each vma to check. */
 	for_each_vma_range(vmi, vma, end) {
-		if (!can_modify_vma(vma))
+		if (unlikely(!can_modify_vma(vma)))
 			return false;
 	}
 
@@ -100,7 +100,7 @@ bool can_modify_mm_madv(struct mm_struct
 
 	/* going through each vma to check. */
 	for_each_vma_range(vmi, vma, end)
-		if (is_ro_anon(vma) && !can_modify_vma(vma))
+		if (unlikely(is_ro_anon(vma) && !can_modify_vma(vma)))
 			return false;
 
 	/* Allow by default. */
_

Patches currently in -mm which might be from jeffxu@chromium.org are

mseal-wire-up-mseal-syscall.patch
mseal-add-mseal-syscall.patch
selftest-mm-mseal-memory-sealing.patch
mseal-add-documentation.patch
selftest-mm-mseal-read-only-elf-memory-segment.patch
selftest-mm-mseal-read-only-elf-memory-segment-fix.patch
selftest-mm-mseal-read-only-elf-memory-segment-fix-3.patch
selftest-mm-mseal-read-only-elf-memory-segment-fix-4.patch


^ permalink raw reply	[relevance 10%]

* [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema
@ 2024-05-11 21:47  1% Xiaxi Shen
  2024-05-11 23:26  1% ` Rob Herring (Arm)
  0 siblings, 1 reply; 200+ results
From: Xiaxi Shen @ 2024-05-11 21:47 UTC (permalink / raw)
  To: devicetree, linux-kernel, linux-sound
  Cc: shenxiaxi26, lgirdwood, broonie, robh, krzk+dt, conor+dt,
	javier.carrasco.cruz, skhan

Convert adi,ssm2602 binding to DT schema

The original adi,ssm2602.txt contains bindings for 3 devices
SSM2602, SSM2603 and SSM2604. Since they share something
in common. So I created one single yaml and name it 260x instead.
Let me know if you think it should be done in another way.

It passed dt_binding_check and dtbs_check.

Signed-off-by: Xiaxi Shen <shenxiaxi26@gmail.com>
---
 .../devicetree/bindings/sound/adi,ssm2602.txt | 19 -------
 .../bindings/sound/adi,ssm260x.yaml           | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/adi,ssm2602.txt
 create mode 100644 Documentation/devicetree/bindings/sound/adi,ssm260x.yaml

diff --git a/Documentation/devicetree/bindings/sound/adi,ssm2602.txt b/Documentation/devicetree/bindings/sound/adi,ssm2602.txt
deleted file mode 100644
index 3b3302fe399b..000000000000
--- a/Documentation/devicetree/bindings/sound/adi,ssm2602.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices
-
-SSM2602 support both I2C and SPI as the configuration interface,
-the selection is made by the MODE strap-in pin.
-SSM2603 and SSM2604 only support I2C as the configuration interface.
-
-Required properties:
-
-  - compatible : One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"
-
-  - reg : the I2C address of the device for I2C, the chip select
-          number for SPI.
-
- Example:
-
-	ssm2602: ssm2602@1a {
-		compatible = "adi,ssm2602";
-		reg = <0x1a>;
-	};
diff --git a/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml b/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
new file mode 100644
index 000000000000..f465f9168a0a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/adi,ssm2602.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices
+
+description:
+  SSM2602 support both I2C and SPI as the configuration interface,
+  
+  the selection is made by the MODE strap-in pin.
+
+  SSM2603 and SSM2604 only support I2C as the configuration interface.
+
+maintainers:
+  - Liam Girdwood <lgirdwood@gmail.com>
+  - Mark Brown <broonie@kernel.org>
+  - Rob Herring <robh@kernel.org>
+  - Krzysztof Kozlowski <krzk+dt@kernel.org>
+  - Conor Dooley <conor+dt@kernel.org>
+
+properties:
+  compatible:
+    description: One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"
+    enum:
+      - adi,ssm2602
+      - adi,ssm2603
+      - adi,ssm2604
+
+  reg:
+    description: the I2C address of the device for I2C, the chip select number for SPI.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+   i2c {
+     #address-cells = <1>;
+     #size-cells = <0>;
+     ssm2602@1a {
+       compatible = "adi,ssm2602";
+       reg = <0x1a>;
+     };
+   };
-- 
2.34.1


^ permalink raw reply related	[relevance 1%]

* [syzbot] [wireguard?] WARNING in kthread_unpark (2)
@ 2024-05-11 21:47  1% syzbot
  0 siblings, 0 replies; 200+ results
From: syzbot @ 2024-05-11 21:47 UTC (permalink / raw)
  To: Jason, davem, edumazet, kuba, linux-kernel, netdev, pabeni,
	syzkaller-bugs, wireguard

Hello,

syzbot found the following issue on:

HEAD commit:    75fa778d74b7 Add linux-next specific files for 20240510
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=13d483c0980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ccdd3ebd6715749a
dashboard link: https://syzkaller.appspot.com/bug?extid=943d34fa3cf2191e3068
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ad9391835bcf/disk-75fa778d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d827b3da9a26/vmlinux-75fa778d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/8f32f0182388/bzImage-75fa778d.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+943d34fa3cf2191e3068@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 0 PID: 11 at kernel/kthread.c:525 __kthread_bind_mask kernel/kthread.c:525 [inline]
WARNING: CPU: 0 PID: 11 at kernel/kthread.c:525 __kthread_bind kernel/kthread.c:538 [inline]
WARNING: CPU: 0 PID: 11 at kernel/kthread.c:525 kthread_unpark+0x16b/0x210 kernel/kthread.c:631
Modules linked in:

CPU: 0 PID: 11 Comm: kworker/u8:0 Not tainted 6.9.0-rc7-next-20240510-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: netns cleanup_net

RIP: 0010:__kthread_bind_mask kernel/kthread.c:525 [inline]
RIP: 0010:__kthread_bind kernel/kthread.c:538 [inline]
RIP: 0010:kthread_unpark+0x16b/0x210 kernel/kthread.c:631
Code: 00 fc ff df 41 0f b6 04 06 84 c0 0f 85 93 00 00 00 41 80 4d 03 04 4c 89 e7 48 8b 34 24 e8 bd c5 32 0a eb 09 e8 46 88 33 00 90 <0f> 0b 90 48 89 ef be 08 00 00 00 e8 75 43 99 00 f0 80 65 00 fb 4c
RSP: 0018:ffffc90000107758 EFLAGS: 00010293

RAX: ffffffff8162943a RBX: 0000000000000000 RCX: ffff8880172c3c00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88802e430800 R08: ffffffff816293c7 R09: 1ffffffff25f64cd
R10: dffffc0000000000 R11: fffffbfff25f64ce R12: 0000000000000001
R13: ffff8880296eda2c R14: 1ffff110052ddb45 R15: ffff8880296eda00
FS:  0000000000000000(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd40918ff8 CR3: 000000002e664000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 kthread_stop+0x17a/0x630 kernel/kthread.c:707
 destroy_workqueue+0x136/0xc40 kernel/workqueue.c:5810
 wg_destruct+0x1e2/0x2e0 drivers/net/wireguard/device.c:257
 netdev_run_todo+0xe1a/0x1000 net/core/dev.c:10693
 default_device_exit_batch+0xa14/0xa90 net/core/dev.c:11769
 ops_exit_list net/core/net_namespace.c:178 [inline]
 cleanup_net+0x89d/0xcc0 net/core/net_namespace.c:640
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
 worker_thread+0x86d/0xd70 kernel/workqueue.c:3393
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[relevance 1%]

* [PATCH] ASoC: dt-bindings: ssm2305: convert to dt schema
@ 2024-05-11 21:47  1% Xiaxi Shen
  0 siblings, 0 replies; 200+ results
From: Xiaxi Shen @ 2024-05-11 21:47 UTC (permalink / raw)
  To: devicetree, linux-kernel, linux-sound
  Cc: shenxiaxi26, lgirdwood, broonie, robh, krzk+dt, conor+dt,
	javier.carrasco.cruz, skhan

Convert adi,ssm2305 binding to DT schema

It passed dt_binding_check and dtbs_check. Let me know
if you think it should include something else

Signed-off-by: Xiaxi Shen <shenxiaxi26@gmail.com>
---
 .../devicetree/bindings/sound/adi,ssm2305.txt | 14 --------
 .../bindings/sound/adi,ssm2305.yaml           | 35 +++++++++++++++++++
 2 files changed, 35 insertions(+), 14 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/adi,ssm2305.txt
 create mode 100644 Documentation/devicetree/bindings/sound/adi,ssm2305.yaml

diff --git a/Documentation/devicetree/bindings/sound/adi,ssm2305.txt b/Documentation/devicetree/bindings/sound/adi,ssm2305.txt
deleted file mode 100644
index a9c9d83c8a30..000000000000
--- a/Documentation/devicetree/bindings/sound/adi,ssm2305.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Analog Devices SSM2305 Speaker Amplifier
-========================================
-
-Required properties:
-  - compatible : "adi,ssm2305"
-  - shutdown-gpios : The gpio connected to the shutdown pin.
-                     The gpio signal is ACTIVE_LOW.
-
-Example:
-
-ssm2305: analog-amplifier {
-	compatible = "adi,ssm2305";
-	shutdown-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
-};
diff --git a/Documentation/devicetree/bindings/sound/adi,ssm2305.yaml b/Documentation/devicetree/bindings/sound/adi,ssm2305.yaml
new file mode 100644
index 000000000000..8335d763bcd5
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,ssm2305.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/adi,ssm2305.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices SSM2305 Speaker Amplifier
+
+maintainers:
+  - Liam Girdwood <lgirdwood@gmail.com>
+  - Mark Brown <broonie@kernel.org>
+  - Rob Herring <robh@kernel.org>
+  - Krzysztof Kozlowski <krzk+dt@kernel.org>
+  - Conor Dooley <conor+dt@kernel.org>
+
+properties:
+  compatible:
+    const: adi,ssm2305
+
+  shutdown-gpios:
+    maxItems: 1
+    description: The gpio connected to the shutdown pin. The gpio signal is ACTIVE_LOW.
+
+required:
+  - compatible
+  - shutdown-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+   analog-amplifier {
+     compatible = "adi,ssm2305";
+     shutdown-gpios = <&gpio3 20 0>;
+   };
-- 
2.34.1


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH 1/3] lib80211: Handle const struct lib80211_crypto_ops in lib80211
  @ 2024-05-11 21:47  1%     ` Christophe JAILLET
  0 siblings, 0 replies; 200+ results
From: Christophe JAILLET @ 2024-05-11 21:47 UTC (permalink / raw)
  To: Simon Horman
  Cc: gregkh, davem, edumazet, kuba, pabeni, johannes,
	philipp.g.hortmann, tdavies, garyrookard, straube.linux,
	linux-staging, netdev, linux-wireless, linux-kernel,
	kernel-janitors

Le 11/05/2024 à 22:31, Simon Horman a écrit :
> On Sat, May 11, 2024 at 06:32:38PM +0200, Christophe JAILLET wrote:
>> lib80211_register_crypto_ops() and lib80211_unregister_crypto_ops() don't
>> modify their "struct lib80211_crypto_ops *ops" argument. So, it can be
>> declared as const.
>>
>> Doing so, some adjustments are needed to also constify some date in
>> "struct lib80211_crypt_data", "struct lib80211_crypto_alg" and the
>> return value of lib80211_get_crypto_ops().
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> Compile tested only.
> 
> Hi Christophe,
> 
> Unfortunately allmodconfig W=1 build on x86_64 with Clang says:
> 
> .../libipw_wx.c:587:6: error: assigning to 'struct lib80211_crypto_ops *' from 'const struct lib80211_crypto_ops *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
>   587 |         ops = lib80211_get_crypto_ops(alg);
>       |             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> .../libipw_wx.c:590:7: error: assigning to 'struct lib80211_crypto_ops *' from 'const struct lib80211_crypto_ops *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
>   590 |                 ops = lib80211_get_crypto_ops(alg);
>       |                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 

Hi,

I'll dig more tomorrow, but I don't see this error (with gcc), even with 
W=1.

The following part of the patch is here to avoid the exact compilation 
error that you see.

Strange.

CJ


diff --git a/drivers/staging/rtl8192e/rtllib_wx.c 
b/drivers/staging/rtl8192e/rtllib_wx.c
index fbd4ec824084..c730d921463d 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -474,7 +474,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
  	int i, idx;
  	int group_key = 0;
  	const char *alg, *module;
-	struct lib80211_crypto_ops *ops;
+	const struct lib80211_crypto_ops *ops;
  	struct lib80211_crypt_data **crypt;

  	struct rtllib_security sec = {

^ permalink raw reply related	[relevance 1%]

* Re: [PATCH v2] drm/msm/a6xx: request memory region
  2024-05-11 19:56  1% [PATCH v2] drm/msm/a6xx: request memory region Kiarash Hajian
@ 2024-05-11 21:46  0% ` Dmitry Baryshkov
  0 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 21:46 UTC (permalink / raw)
  To: Kiarash Hajian
  Cc: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten,
	David Airlie, Daniel Vetter, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

On Sat, 11 May 2024 at 22:56, Kiarash Hajian
<kiarash8112hajian@gmail.com> wrote:
>
> The driver's memory regions are currently just ioremap()ed, but not
> reserved through a request. That's not a bug, but having the request is
> a little more robust.
>
> Implement the region-request through the corresponding managed
> devres-function.
>
> Signed-off-by: Kiarash Hajian <kiarash8112hajian@gmail.com>
> ---
> Changes in v2:
> - update the subject prefix to "drm/msm/a6xx:", to match the majority of other changes to this file.

Same comment as I posted for v1 of the patch.

> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 8bea8ef26f77..aa83cb461a75 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -636,9 +636,9 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
>
>  err:
>         if (!IS_ERR_OR_NULL(pdcptr))
> -               iounmap(pdcptr);
> +               devm_iounmap(&pdev->dev,pdcptr);
>         if (!IS_ERR_OR_NULL(seqptr))
> -               iounmap(seqptr);
> +               devm_iounmap(&pdev->dev,seqptr);
>  }
>
>  /*
> @@ -1503,7 +1503,7 @@ static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev,
>                 return ERR_PTR(-EINVAL);
>         }
>
> -       ret = ioremap(res->start, resource_size(res));
> +       ret = devm_ioremap_resource(&pdev->dev, res);
>         if (!ret) {
>                 DRM_DEV_ERROR(&pdev->dev, "Unable to map the %s registers\n", name);
>                 return ERR_PTR(-EINVAL);
> @@ -1646,7 +1646,7 @@ int a6xx_gmu_wrapper_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
>         dev_pm_domain_detach(gmu->cxpd, false);
>
>  err_mmio:
> -       iounmap(gmu->mmio);
> +       devm_iounmap(gmu->dev ,gmu->mmio);
>
>         /* Drop reference taken in of_find_device_by_node */
>         put_device(gmu->dev);
> @@ -1825,9 +1825,9 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
>         dev_pm_domain_detach(gmu->cxpd, false);
>
>  err_mmio:
> -       iounmap(gmu->mmio);
> +       devm_iounmap(gmu->dev ,gmu->mmio);
>         if (platform_get_resource_byname(pdev, IORESOURCE_MEM, "rscc"))
> -               iounmap(gmu->rscc);
> +               devm_iounmap(gmu->dev ,gmu->rscc);
>         free_irq(gmu->gmu_irq, gmu);
>         free_irq(gmu->hfi_irq, gmu);
>
>
> ---
> base-commit: cf87f46fd34d6c19283d9625a7822f20d90b64a4
> change-id: 20240511-msm-adreno-memory-region-2bcb1c958621
>
> Best regards,
> --
> Kiarash Hajian <kiarash8112hajian@gmail.com>
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[relevance 0%]

* [PATCH] ASoC: dt-bindings: ak4118: convert to dt schema
@ 2024-05-11 21:46  5% Xiaxi Shen
  0 siblings, 0 replies; 200+ results
From: Xiaxi Shen @ 2024-05-11 21:46 UTC (permalink / raw)
  To: devicetree, linux-kernel, linux-sound
  Cc: shenxiaxi26, lgirdwood, broonie, robh, krzk+dt, conor+dt,
	javier.carrasco.cruz, skhan

Convert ak4118 binding to DT schema

It passed dt_binding_check and dtbs_check. Let me know
if you think it should include something else

Signed-off-by: Xiaxi Shen <shenxiaxi26@gmail.com>
---
 .../devicetree/bindings/sound/ak4118.txt      | 22 -------
 .../bindings/sound/asahi-kasei,ak4118.yaml    | 58 +++++++++++++++++++
 2 files changed, 58 insertions(+), 22 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ak4118.txt
 create mode 100644 Documentation/devicetree/bindings/sound/asahi-kasei,ak4118.yaml

diff --git a/Documentation/devicetree/bindings/sound/ak4118.txt b/Documentation/devicetree/bindings/sound/ak4118.txt
deleted file mode 100644
index 6e11a2f7404c..000000000000
--- a/Documentation/devicetree/bindings/sound/ak4118.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-AK4118 S/PDIF transceiver
-
-This device supports I2C mode.
-
-Required properties:
-
-- compatible : "asahi-kasei,ak4118"
-- reg : The I2C address of the device for I2C
-- reset-gpios: A GPIO specifier for the reset pin
-- irq-gpios: A GPIO specifier for the IRQ pin
-
-Example:
-
-&i2c {
-	ak4118: ak4118@13 {
-		#sound-dai-cells = <0>;
-		compatible = "asahi-kasei,ak4118";
-		reg = <0x13>;
-		reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>
-		irq-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4118.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4118.yaml
new file mode 100644
index 000000000000..abbce999eb30
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4118.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4118.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AK4118 S/PDIF transceiver
+
+allOf:
+  - $ref: dai-common.yaml#
+
+maintainers:
+  - Liam Girdwood <lgirdwood@gmail.com>
+  - Mark Brown <broonie@kernel.org>
+  - Rob Herring <robh@kernel.org>
+  - Krzysztof Kozlowski <krzk+dt@kernel.org>
+  - Conor Dooley <conor+dt@kernel.org>
+
+properties:
+  compatible:
+    const: asahi-kasei,ak4118
+
+  reg:
+    description: The I2C address of the device for I2C
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0    
+
+  reset-gpios:
+    description: A GPIO specifier for the reset pin
+    maxItems: 1
+
+  irq-gpios:
+    description: A GPIO specifier for the IRQ pin
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - reset-gpios
+  - irq-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+   i2c {
+     #address-cells = <1>;
+     #size-cells = <0>;
+     ak4118@13 {
+       #sound-dai-cells = <0>;
+       compatible = "asahi-kasei,ak4118";
+       reg = <0x13>;
+       reset-gpios = <&gpio 0 0>;
+       irq-gpios = <&gpio 1 1>;
+     };
+   };
-- 
2.34.1


^ permalink raw reply related	[relevance 5%]

* Re:  [PATCH linux-next] mm/huge_memory: remove redundant locking when parsing THP sysfs input
  @ 2024-05-11 21:35  1%   ` Andrew Morton
  0 siblings, 0 replies; 200+ results
From: Andrew Morton @ 2024-05-11 21:35 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: xu.xin16, david, shy828301, linux-kernel, linux-mm, Muchun Song


(cc Muchun)

On Sat, 11 May 2024 17:05:13 +0100 Matthew Wilcox <willy@infradead.org> wrote:

> On Sat, May 11, 2024 at 02:40:48PM +0800, xu.xin16@zte.com.cn wrote:
> > From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
> > 
> > Since sysfs_streq() only performs a simple memory comparison operation
> > and will not introduce any sleepable operation, So there is no
> > need to drop the lock when parsing input. Remove redundant lock
> > and unlock operations to make code cleaner.
> 
> i disagree that it makes the code cleaner.

Oh.  Why is that?  The end result looks nice to me and saves a bit of
.text.

^ permalink raw reply	[relevance 1%]

* [PATCH] Coccinelle: pm_runtime: Fix grammar in comment
@ 2024-05-11 21:31  1% Thorsten Blum
  0 siblings, 0 replies; 200+ results
From: Thorsten Blum @ 2024-05-11 21:31 UTC (permalink / raw)
  To: Julia Lawall, Nicolas Palix; +Cc: cocci, linux-kernel, Thorsten Blum

s/does not use unnecessary/do not unnecessarily use/

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 scripts/coccinelle/api/pm_runtime.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccinelle/api/pm_runtime.cocci b/scripts/coccinelle/api/pm_runtime.cocci
index 4b9778874453..2c931e748dda 100644
--- a/scripts/coccinelle/api/pm_runtime.cocci
+++ b/scripts/coccinelle/api/pm_runtime.cocci
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/// Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE
+/// Make sure pm_runtime_* calls do not unnecessarily use IS_ERR_VALUE
 ///
 // Keywords: pm_runtime
 // Confidence: Medium
-- 
2.45.0


^ permalink raw reply related	[relevance 1%]

* Re: Git-GUI change of maintainership
  2024-05-11 20:53  1%       ` Johannes Sixt
@ 2024-05-11 21:29  0%         ` Junio C Hamano
  0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2024-05-11 21:29 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Pratyush Yadav, Git Mailing List

Johannes Sixt <j6t@kdbg.org> writes:

> Thank you. Please consider the following as well.
>
> diff --git a/Documentation/git-gui.txt b/Documentation/git-gui.txt
> index e8f3ccb433..f5b02ef114 100644
> --- a/Documentation/git-gui.txt
> +++ b/Documentation/git-gui.txt
> @@ -114,7 +114,7 @@ of end users.
>  
>  The official repository of the 'git gui' project can be found at:
>  
> -  https://github.com/prati0100/git-gui.git/
> +  https://github.com/j6t/git-gui

Ah, that is part of my tree, not pulled from you via -Xsubtree.

Will do.  Thanks.

^ permalink raw reply	[relevance 0%]

* [PATCH bpf-next] bpf: ignore expected GCC warning in test_global_func10.c
@ 2024-05-11 21:23  1% Jose E. Marchesi
  0 siblings, 0 replies; 200+ results
From: Jose E. Marchesi @ 2024-05-11 21:23 UTC (permalink / raw)
  To: bpf
  Cc: Jose E . Marchesi, david.faust, cupertino.miranda, Yonghong Song,
	Eduard Zingerman

The BPF selftest global_func10 in progs/test_global_func10.c contains:

  struct Small {
  	long x;
  };

  struct Big {
  	long x;
  	long y;
  };

  [...]

  __noinline int foo(const struct Big *big)
  {
	if (!big)
		return 0;

	return bpf_get_prandom_u32() < big->y;
  }

  [...]

  SEC("cgroup_skb/ingress")
  __failure __msg("invalid indirect access to stack")
  int global_func10(struct __sk_buff *skb)
  {
	const struct Small small = {.x = skb->len };

	return foo((struct Big *)&small) ? 1 : 0;
  }

GCC emits a "maybe uninitialized" warning for the code above, because
it knows `foo' accesses `big->y'.

Since the purpose of this selftest is to check that the verifier will
fail on this sort of invalid memory access, this patch just silences
the compiler warning.

Tested in bpf-next master.
No regressions.

Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Cc: david.faust@oracle.com
Cc: cupertino.miranda@oracle.com
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: Eduard Zingerman <eddyz87@gmail.com>
---
 tools/testing/selftests/bpf/progs/test_global_func10.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/bpf/progs/test_global_func10.c b/tools/testing/selftests/bpf/progs/test_global_func10.c
index 8fba3f3649e2..5da001ca57a5 100644
--- a/tools/testing/selftests/bpf/progs/test_global_func10.c
+++ b/tools/testing/selftests/bpf/progs/test_global_func10.c
@@ -4,6 +4,10 @@
 #include <bpf/bpf_helpers.h>
 #include "bpf_misc.h"
 
+#if !defined(__clang__)
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+
 struct Small {
 	long x;
 };
-- 
2.30.2


^ permalink raw reply related	[relevance 1%]

* [PATCH bpf-next V2] bpf: make list_for_each_entry portable
@ 2024-05-11 21:22  3% Jose E. Marchesi
  0 siblings, 0 replies; 200+ results
From: Jose E. Marchesi @ 2024-05-11 21:22 UTC (permalink / raw)
  To: bpf; +Cc: Jose E . Marchesi, david.faust, cupertino.miranda, Alexei Starovoitov

[Changes from V1:
- The __compat_break has been abandoned in favor of
  a more readable can_loop macro that can be used anywhere, including
  loop conditions.]

The macro list_for_each_entry is defined in bpf_arena_list.h as
follows:

  #define list_for_each_entry(pos, head, member)				\
	for (void * ___tmp = (pos = list_entry_safe((head)->first,		\
						    typeof(*(pos)), member),	\
			      (void *)0);					\
	     pos && ({ ___tmp = (void *)pos->member.next; 1; });		\
	     cond_break,							\
	     pos = list_entry_safe((void __arena *)___tmp, typeof(*(pos)), member))

The macro cond_break, in turn, expands to a statement expression that
contains a `break' statement.  Compound statement expressions, and the
subsequent ability of placing statements in the header of a `for'
loop, are GNU extensions.

Unfortunately, clang implements this GNU extension differently than
GCC:

- In GCC the `break' statement is bound to the containing "breakable"
  context in which the defining `for' appears.  If there is no such
  context, GCC emits a warning: break statement without enclosing `for'
  o `switch' statement.

- In clang the `break' statement is bound to the defining `for'.  If
  the defining `for' is itself inside some breakable construct, then
  clang emits a -Wgcc-compat warning.

This patch adds a new macro can_loop to bpf_experimental, that
implements the same logic than cond_break but evaluates to a boolean
expression.  The patch also changes all the current instances of usage
of cond_break withing the header of loop accordingly.

Tested in bpf-next master.
No regressions.

Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Cc: david.faust@oracle.com
Cc: cupertino.miranda@oracle.com
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
---
 tools/testing/selftests/bpf/bpf_arena_list.h  |  4 +--
 .../testing/selftests/bpf/bpf_experimental.h  | 28 +++++++++++++++++++
 .../testing/selftests/bpf/progs/arena_list.c  |  2 +-
 .../bpf/progs/verifier_iterating_callbacks.c  |  9 +++---
 4 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/tools/testing/selftests/bpf/bpf_arena_list.h b/tools/testing/selftests/bpf/bpf_arena_list.h
index b99b9f408eff..85dbc3ea4da5 100644
--- a/tools/testing/selftests/bpf/bpf_arena_list.h
+++ b/tools/testing/selftests/bpf/bpf_arena_list.h
@@ -29,6 +29,7 @@ static inline void *bpf_iter_num_new(struct bpf_iter_num *it, int i, int j) { re
 static inline void bpf_iter_num_destroy(struct bpf_iter_num *it) {}
 static inline bool bpf_iter_num_next(struct bpf_iter_num *it) { return true; }
 #define cond_break ({})
+#define can_loop true
 #endif
 
 /* Safely walk link list elements. Deletion of elements is allowed. */
@@ -36,8 +37,7 @@ static inline bool bpf_iter_num_next(struct bpf_iter_num *it) { return true; }
 	for (void * ___tmp = (pos = list_entry_safe((head)->first,		\
 						    typeof(*(pos)), member),	\
 			      (void *)0);					\
-	     pos && ({ ___tmp = (void *)pos->member.next; 1; });		\
-	     cond_break,							\
+	     pos && ({ ___tmp = (void *)pos->member.next; 1; }) && can_loop;    \
 	     pos = list_entry_safe((void __arena *)___tmp, typeof(*(pos)), member))
 
 static inline void list_add_head(arena_list_node_t *n, arena_list_head_t *h)
diff --git a/tools/testing/selftests/bpf/bpf_experimental.h b/tools/testing/selftests/bpf/bpf_experimental.h
index 8b9cc87be4c4..13e79af0a17c 100644
--- a/tools/testing/selftests/bpf/bpf_experimental.h
+++ b/tools/testing/selftests/bpf/bpf_experimental.h
@@ -326,7 +326,21 @@ l_true:												\
        })
 #endif
 
+/* Note that cond_break can only be portably used in the body of a
+   breakable construct, whereas can_loop can be used anywhere.  */
+
 #ifdef __BPF_FEATURE_MAY_GOTO
+#define can_loop					\
+  	({ __label__ l_break, l_continue;		\
+	bool ret = true;				\
+	 asm volatile goto("may_goto %l[l_break]"	\
+		      :::: l_break);			\
+	goto l_continue;				\
+	l_break: ret = false;				\
+	l_continue:;					\
+	ret;						\
+	})
+
 #define cond_break					\
 	({ __label__ l_break, l_continue;		\
 	 asm volatile goto("may_goto %l[l_break]"	\
@@ -336,6 +350,20 @@ l_true:												\
 	l_continue:;					\
 	})
 #else
+#define can_loop					\
+  	({ __label__ l_break, l_continue;		\
+	 bool ret = true;				\
+	 asm volatile goto("1:.byte 0xe5;			\
+		      .byte 0;				\
+		      .long ((%l[l_break] - 1b - 8) / 8) & 0xffff;	\
+		      .short 0"				\
+		      :::: l_break);			\
+	goto l_continue;				\
+	l_break: ret = false;				\
+	l_continue:;					\
+	ret;						\
+	})
+
 #define cond_break					\
 	({ __label__ l_break, l_continue;		\
 	 asm volatile goto("1:.byte 0xe5;			\
diff --git a/tools/testing/selftests/bpf/progs/arena_list.c b/tools/testing/selftests/bpf/progs/arena_list.c
index c0422c58cee2..93bd0600eba0 100644
--- a/tools/testing/selftests/bpf/progs/arena_list.c
+++ b/tools/testing/selftests/bpf/progs/arena_list.c
@@ -49,7 +49,7 @@ int arena_list_add(void *ctx)
 
 	list_head = &global_head;
 
-	for (i = zero; i < cnt; cond_break, i++) {
+	for (i = zero; i < cnt && can_loop; i++) {
 		struct elem __arena *n = bpf_alloc(sizeof(*n));
 
 		test_val++;
diff --git a/tools/testing/selftests/bpf/progs/verifier_iterating_callbacks.c b/tools/testing/selftests/bpf/progs/verifier_iterating_callbacks.c
index 99e561f18f9b..bd676d7e615f 100644
--- a/tools/testing/selftests/bpf/progs/verifier_iterating_callbacks.c
+++ b/tools/testing/selftests/bpf/progs/verifier_iterating_callbacks.c
@@ -318,7 +318,7 @@ int cond_break1(const void *ctx)
 	unsigned long i;
 	unsigned int sum = 0;
 
-	for (i = zero; i < ARR_SZ; cond_break, i++)
+	for (i = zero; i < ARR_SZ && can_loop; i++)
 		sum += i;
 	for (i = zero; i < ARR_SZ; i++) {
 		barrier_var(i);
@@ -336,12 +336,11 @@ int cond_break2(const void *ctx)
 	int i, j;
 	int sum = 0;
 
-	for (i = zero; i < 1000; cond_break, i++)
+	for (i = zero; i < 1000 && can_loop; i++)
 		for (j = zero; j < 1000; j++) {
 			sum += i + j;
 			cond_break;
-		}
-
+	}
 	return sum;
 }
 
@@ -349,7 +348,7 @@ static __noinline int loop(void)
 {
 	int i, sum = 0;
 
-	for (i = zero; i <= 1000000; i++, cond_break)
+	for (i = zero; i <= 1000000 && can_loop; i++)
 		sum += i;
 
 	return sum;
-- 
2.30.2


^ permalink raw reply related	[relevance 3%]

* [PATCH bpf-next] bpf: disable strict aliasing in test_global_func9.c
@ 2024-05-11 21:22  1% Jose E. Marchesi
  0 siblings, 0 replies; 200+ results
From: Jose E. Marchesi @ 2024-05-11 21:22 UTC (permalink / raw)
  To: bpf
  Cc: Jose E . Marchesi, david.faust, cupertino.miranda, Yonghong Song,
	Eduard Zingerman

The BPF selftest test_global_func9.c performs type punning and breaks
srict-aliasing rules.

In particular, given:

  int global_func9(struct __sk_buff *skb)
  {
	int result = 0;

	[...]
	{
		const struct C c = {.x = skb->len, .y = skb->family };

		result |= foo((const struct S *)&c);
	}
  }

When building with strict-aliasing enabled (the default) the
initialization of `c' gets optimized away in its entirely:

	[... no initialization of `c' ...]
	r1 = r10
	r1 += -40
	call	foo
	w0 |= w6

Since GCC knows that `foo' accesses s->x, we get a "maybe
uninitialized" warning.

On the other hand, when strict-aliasing is disabled GCC only optimizes
away the store to `.y':

	r1 = *(u32 *) (r6+0)
	*(u32 *) (r10+-40) = r1  ; This is .x = skb->len in `c'
	r1 = r10
	r1 += -40
	call	foo
	w0 |= w6

In this case the warning is not emitted, because s-> is initialized.

This patch disables strict aliasing in this test when building with
GCC.  clang seems to not optimize this particular code even when
strict aliasing is enabled.

Tested in bpf-next master.

Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Cc: david.faust@oracle.com
Cc: cupertino.miranda@oracle.com
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: Eduard Zingerman <eddyz87@gmail.com>
---
 tools/testing/selftests/bpf/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 135023a357b3..979838c5a495 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -53,6 +53,7 @@ progs/syscall.c-CFLAGS := -fno-strict-aliasing
 progs/test_pkt_md_access.c-CFLAGS := -fno-strict-aliasing
 progs/test_sk_lookup.c-CFLAGS := -fno-strict-aliasing
 progs/timer_crash.c-CFLAGS := -fno-strict-aliasing
+progs/test_global_func9.c-CFLAGS := -fno-strict-aliasing
 
 ifneq ($(LLVM),)
 # Silence some warnings when compiled with clang
-- 
2.30.2


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH net] net: ethernet: cortina: Locking fixes
  @ 2024-05-11 21:11  1% ` Michał Mirosław
  0 siblings, 0 replies; 200+ results
From: Michał Mirosław @ 2024-05-11 21:11 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Hans Ulli Kroll, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev

On Thu, May 09, 2024 at 09:44:54AM +0200, Linus Walleij wrote:
> This fixes a probably long standing problem in the Cortina
> Gemini ethernet driver: there are some paths in the code
> where the IRQ registers are written without taking the proper
> locks.
> 
> Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/net/ethernet/cortina/gemini.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
> index 705c3eb19cd3..d1fbadbf86d4 100644
> --- a/drivers/net/ethernet/cortina/gemini.c
> +++ b/drivers/net/ethernet/cortina/gemini.c
> @@ -1107,10 +1107,13 @@ static void gmac_tx_irq_enable(struct net_device *netdev,
>  {
>  	struct gemini_ethernet_port *port = netdev_priv(netdev);
>  	struct gemini_ethernet *geth = port->geth;
> +	unsigned long flags;
>  	u32 val, mask;
>  
>  	netdev_dbg(netdev, "%s device %d\n", __func__, netdev->dev_id);
>  
> +	spin_lock_irqsave(&geth->irq_lock, flags);
> +
>  	mask = GMAC0_IRQ0_TXQ0_INTS << (6 * netdev->dev_id + txq);
>  
>  	if (en)
> @@ -1119,6 +1122,8 @@ static void gmac_tx_irq_enable(struct net_device *netdev,
>  	val = readl(geth->base + GLOBAL_INTERRUPT_ENABLE_0_REG);
>  	val = en ? val | mask : val & ~mask;
>  	writel(val, geth->base + GLOBAL_INTERRUPT_ENABLE_0_REG);
> +
> +	spin_unlock_irqrestore(&geth->irq_lock, flags);
>  }
>  

Looks good, though spinlock looks necessary only around the ENABLE0
rmw, as the 'if (en)' part is resetting the "triggered" flag of the
interrupt (acking earlier-ignored interrupts).

>  static void gmac_tx_irq(struct net_device *netdev, unsigned int txq_num)
> @@ -1415,15 +1420,19 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget)
>  	union gmac_rxdesc_3 word3;
>  	struct page *page = NULL;
>  	unsigned int page_offs;
> +	unsigned long flags;
>  	unsigned short r, w;
>  	union dma_rwptr rw;
>  	dma_addr_t mapping;
>  	int frag_nr = 0;
>  
> +	spin_lock_irqsave(&geth->irq_lock, flags);
>  	rw.bits32 = readl(ptr_reg);
>  	/* Reset interrupt as all packages until here are taken into account */
>  	writel(DEFAULT_Q0_INT_BIT << netdev->dev_id,
>  	       geth->base + GLOBAL_INTERRUPT_STATUS_1_REG);
> +	spin_unlock_irqrestore(&geth->irq_lock, flags);
> +

This doesn't look right: one, those are different registers, two it is
an IRQ-acking write.  In this case it is important that readl() is ordered
before writel(), but the spinlock doesn't guarantee that.

> @@ -1726,10 +1735,9 @@ static irqreturn_t gmac_irq(int irq, void *data)
>  		gmac_update_hw_stats(netdev);
>  
>  	if (val & (GMAC0_RX_OVERRUN_INT_BIT << (netdev->dev_id * 8))) {
> +		spin_lock(&geth->irq_lock);
>  		writel(GMAC0_RXDERR_INT_BIT << (netdev->dev_id * 8),
>  		       geth->base + GLOBAL_INTERRUPT_STATUS_4_REG);
> -
> -		spin_lock(&geth->irq_lock);
>  		u64_stats_update_begin(&port->ir_stats_syncp);
>  		++port->stats.rx_fifo_errors;
>  		u64_stats_update_end(&port->ir_stats_syncp);

This, too, is a IRQ-acking write that doesn't seem to gain much by
running inside the spin-locked section.

Best Regards
Michał Mirosław

^ permalink raw reply	[relevance 1%]

* Re: [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  2024-05-11 20:31  1%         ` Al Viro
@ 2024-05-11 21:17  1%           ` Al Viro
  0 siblings, 0 replies; 200+ results
From: Al Viro @ 2024-05-11 21:17 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, walters,
	wangkai86, willy

On Sat, May 11, 2024 at 09:31:43PM +0100, Al Viro wrote:
> On Sat, May 11, 2024 at 12:55:29PM -0700, Linus Torvalds wrote:
> > On Sat, 11 May 2024 at 12:28, Al Viro <viro@zeniv.linux.org.uk> wrote:
> > >
> > > On Sat, May 11, 2024 at 11:42:34AM -0700, Linus Torvalds wrote:
> > > >
> > > > And that outside lock is the much more important one, I bet.
> > >
> > > ... and _that_ is where taking d_delete outside of the lock might
> > > take an unpleasant analysis of a lot of code.
> > 
> > Hmm. It really shouldn't matter. There can only be negative children
> > of the now deleted directory, so there are no actual effects on
> > inodes.
> > 
> > It only affects the d_child list, which is protected by d_lock (and
> > can be modified outside of the inode lock anyway due to memory
> > pressure).
> > 
> > What am I missing?
> 
> fsnotify and related fun, basically.  I'll need to redo the analysis,
> but IIRC there had been places where correctness had been guaranteed
> by the fact that this had been serialized by the lock on parent.

As an aside, I'd really love to see d_rehash() gone - the really old nest
of users is gone (used to be in nfs), but there's still a weird corner case
in exfat + a bunch in AFS.  Life would be simpler if those had been gone -
many correctness proofs around dcache have unpleasant warts dealing with
that crap.  Not relevant in this case, but it makes analysis harder in
general...

^ permalink raw reply	[relevance 1%]

* Re: created ext4 disk image differs depending on the underlying filesystem
  @ 2024-05-11 21:11  1%       ` Theodore Ts'o
  0 siblings, 0 replies; 200+ results
From: Theodore Ts'o @ 2024-05-11 21:11 UTC (permalink / raw)
  To: Johannes Schauer Marin Rodrigues; +Cc: linux-ext4

On Sat, May 11, 2024 at 07:34:42AM +0200, Johannes Schauer Marin Rodrigues wrote:
>  2. allow resetting fs->super->s_kbytes_written to zero. This patch worked for
>     me:
> 
> Would you be happy about a patch for (2.)? If yes, I can send something over
> once I find some time. :)
> 

I'm currently going back and forth about whether we should just (a)
unconditionally set s_kbytes_writes to zero before we write out the
superblock, or (b) whether we add a new extended operation, or (c) do
a hack where if SOURCE_DATE_EPOCH is set, use that as implied "set
s_kbytes_written to zero since the user is probably caring about a
reproducible file system".

(c) is a bit hacky, but it's the most convenient for users, and adding
Yet Another extended operation.

Related to this is the design question about whether SOURCE_DATE_EPOCH
should imply using a fixed value for s_uuid and s_hash_seed.  Again,
it's a little weird to overload SOURCE_DATE_EPOCH to setting the uuid
and hash_seed to some fixed value, which might be a time-based UUID
with the ethernet address set to all zeroes, or some other fixed
value.  But it's a pretty good proxy of what the user wants, and if
this is this is the default, the user can always override it via an
extended option if they really want something different.

If it weren't for the fact that I'm considering have SOURCE_DATE_EPOCH
provide default values for s_uuid and s_hash_seed, I'd be tempted to just
unconditionally set the s_kbytes_written to zero.

I'm curious what your opinions might be on this, as someone who might
want to use this feature.

> As an end-user I am very interested in keeping the functionality of mke2fs
> which keeps track of which parts are actually sparse and which ones are not.
> This functionality can be used with tools like "bmaptool" (a more clever dd) to
> only copy those parts of the image to the flash drive which are actually
> supposed to contain data.

If the file system where the image is created supports either the
FIEMAP ioctl or fallocate SEEK_HOLE, then "bmaptool create" can figure
out which parts of the file is sparse, so we don't need to make any
changes to e2fsprogs.  If the file system doesn't support FIEMAP or
SEEK_HOLE, one could imagine that bmaptool could figure out which
parts of the file could be sparse simply by looking for blocks that
are all zeroes.  This is basically what "cp --sparse=always" or what
the attached make-sparse.c file does to determine where the holes could be.

Yes, I could imagine adding a new io_manager much like test_io and
undo_io which tracked which blocks had been written, and then would
write out a BMAP file.  However, the vast majority of constructed file
systems are quite small, so simply reading all of the blocks to
determine which blocks were all zeroes ala cp --sparse=always isn't
going to invole all that much overhead.  And I'd argue the right thing
to do would be to teach bmaptool how to do what cp --sparse=always so
that the same interface regardless of whether bmaptool is running on a
modern file system that supports FIEMAP or SEEK_HOLE, or some legacy
file system like FAT16 or FAT32.

Cheers,

						- Ted
/*
 * make-sparse.c --- make a sparse file from stdin
 * 
 * Copyright 2004 by Theodore Ts'o.
 *
 * %Begin-Header%
 * This file may be redistributed under the terms of the GNU Public
 * License.
 * %End-Header%
 */

#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

int full_read(int fd, char *buf, size_t count)
{
	int got, total = 0;
	int pass = 0;

	while (count > 0) {
		got = read(fd, buf, count);
		if (got == -1) {
			if ((errno == EINTR) || (errno == EAGAIN)) 
				continue;
			return total ? total : -1;
		}
		if (got == 0) {
			if (pass++ >= 3)
				return total;
			continue;
		}
		pass = 0;
		buf += got;
		total += got;
		count -= got;
	}
	return total;
}

int main(int argc, char **argv)
{
	int fd, got, i;
	int zflag = 0;
	char buf[1024];

	if (argc != 2) {
		fprintf(stderr, "Usage: make-sparse out-file\n");
		exit(1);
	}
	fd = open(argv[1], O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0777);
	if (fd < 0) {
		perror(argv[1]);
		exit(1);
	}
	while (1) {
		got = full_read(0, buf, sizeof(buf));
		if (got == 0)
			break;
		if (got == sizeof(buf)) {
			for (i=0; i < sizeof(buf); i++) 
				if (buf[i])
					break;
			if (i == sizeof(buf)) {
				lseek(fd, sizeof(buf), SEEK_CUR);
				zflag = 1;
				continue;
			}
		}
		zflag = 0;
		write(fd, buf, got);
	}
	if (zflag) {
		lseek(fd, -1, SEEK_CUR);
		buf[0] = 0;
		write(fd, buf, 1);
	}
	return 0;
}
		

^ permalink raw reply	[relevance 1%]

* Re: [PATCHv5 bpf-next 6/8] x86/shstk: Add return uprobe support
  @ 2024-05-11 21:09  0%         ` Jiri Olsa
  0 siblings, 0 replies; 200+ results
From: Jiri Olsa @ 2024-05-11 21:09 UTC (permalink / raw)
  To: Edgecombe, Rick P
  Cc: olsajiri, songliubraving, luto, mhiramat, andrii, debug,
	john.fastabend, linux-api, linux-kernel, mingo, rostedt, ast,
	tglx, yhs, oleg, peterz, linux-man, daniel, linux-trace-kernel,
	bp, bpf, x86

On Thu, May 09, 2024 at 04:24:37PM +0000, Edgecombe, Rick P wrote:
> On Thu, 2024-05-09 at 10:30 +0200, Jiri Olsa wrote:
> > > Per the earlier discussion, this cannot be reached unless uretprobes are in
> > > use,
> > > which cannot happen without something with privileges taking an action. But
> > > are
> > > uretprobes ever used for monitoring applications where security is
> > > important? Or
> > > is it strictly a debug-time thing?
> > 
> > sorry, I don't have that level of detail, but we do have customers
> > that use uprobes in general or want to use it and complain about
> > the speed
> > 
> > there are several tools in bcc [1] that use uretprobes in scripts,
> > like:
> >   memleak, sslsniff, trace, bashreadline, gethostlatency, argdist,
> >   funclatency
> 
> Is it possible to have shadow stack only use the non-syscall solution? It seems
> it exposes a more limited compatibility in that it only allows writing the
> specific trampoline address. (IIRC) Then shadow stack users could still use
> uretprobes, but just not the new optimized solution. There are already
> operations that are slower with shadow stack, like longjmp(), so this could be
> ok maybe.

I guess it's doable, we'd need to keep both trampolines around, because
shadow stack is enabled by app dynamically and use one based on the
state of shadow stack when uretprobe is installed

so you're worried the optimized syscall path could be somehow exploited
to add data on shadow stack?

jirka

^ permalink raw reply	[relevance 0%]

* Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround
  2024-05-11 19:57  0%     ` Mark Kettenis
@ 2024-05-11 20:55  1%       ` Jonas Karlman
  0 siblings, 0 replies; 200+ results
From: Jonas Karlman @ 2024-05-11 20:55 UTC (permalink / raw)
  To: Mark Kettenis
  Cc: knaerzche, kever.yang, sjg, philipp.tomsich, trini, jbx6244, u-boot

Hi Mark,

On 2024-05-11 21:57, Mark Kettenis wrote:
>> Date: Sat, 11 May 2024 20:47:40 +0200
>> From: Jonas Karlman <jonas@kwiboo.se>
> 
> Hi Jonas & Alex,
> 
>> Hi Alex,
>>
>> On 2024-05-11 19:44, Alex Bee wrote:
>>> Hi Jonas,
>>>
>>> Am 11.05.24 um 13:28 schrieb Jonas Karlman:
>>>> This series add gpio request() and pinctrl gpio_request_enable() ops so
>>>> that a gpio requested pin automatically use gpio pinmux and U-Boot
>>>> behaves more similar to Linux kernel.
>>>
>>> I'm not sure that's a good idea.
>>> While linux does it the same way, we really shouldn't expect every 
>>> software/os/ … which uses DT (now or in future) to implicitly switch the 
>>> pin function when using a pin as gpio. So the real fix would probably be 
>>> to add the the correct pinctrl settings to the upstream DT of those 
>>> boards and sync it later on (not sure those if those SoCs already using 
>>> OF_UPSTREAM) and leave the -u-boot.dtsi-"hack" alone for now.
> 
> I missed Alex's mail, but OpenBSD certainly is one of the OSes that
> could break if the pinctrl settings get removed.  We currently have no
> code to automatically mux the gpio pins on these Rockchip SoCs. I
> suppose as long as U-Boot probes the PCIe bus, the pins will already
> be muxed correctly and things will continue to work.  But I think
> there are certain boot scenarios where this won't happen.

The control FDT on the known affected boards was only patched to prevent
the boards from a full device freeze when PCIe was enumerated. An OS
should probably not depend on a workaround made for U-Boot use.

Is it common for *BDS to use the control FDT or is it more common that a
separate .dtb-file to be loaded during boot?

To recap, the issue on e.g. ROCK 3A is that the upstream DT use pinctrl
to signal PCIE30X2 CLKREQn_M1/WAKEn_M1/PERSTn_M1 function, DT also
specify a reset-gpios prop pointing on PERSTn_M1. To me this seem like a
correct description of HW.

When U-Boot probe the PCIE30X2 device the pinctrl driver would
automatically configure CLKREQn_M1/WAKEn_M1/PERSTn_M1 function.

When U-Boot RK PCIe driver try to use the reset-gpios pin the device
would freeze unless the PERSTn pin is first re-configured for gpio use.

Current workaround in U-Boot throws away the existing upstream pinctrl
and replace it to only configure gpio func on the PERSTn pin. This also
leaves the CLKREQn and WAKEn to incorrectly use gpio func.

With this series I try to cleanup the old workaround that I added without
much insight beyond: device no longer freeze and nvme "works" :-)

> 
> I've wondered in the past what the purpose of the gpio-ranges
> properties was.  I never considered that they could be used to
> automatically mux the pins for GPIO since the gpio-ranges mapping
> provides no indication of what the correct pin settings arefor the
> GPIO pins.

The gpio-ranges prop is only used to provide details on how the pins are
mapped between gpio and pin controller. It is not used to change any
muxing. But the property is required to make the U-Boot helpers
pinctrl_gpio_request()/pinctrl_gpio_free() work and figure out what
pinctrl udevice to use if another driver use e.g. gpio_request_by_name()
to request use of a pin for gpio use.

Keep in mind that this series should not change any behavior except for
the special case when DT pinctrl may configure a pin for non-gpio
function and later U-Boot request the pin to be used for gpio.

> 
>>
>> I fully agree that the pinctrl for the problematic boards should be
>> corrected in upstream DT, but that is a separate issue and should not
>> block adding support for the request()/gpio_request_enable() ops.
>>
>> While the pcie reset-gpios full board freeze that was my driving factor
>> to fully implement the gpio request() ops it is not the only use case,
>> using the gpio cmd on a pin that use a non-gpio pinmux is another.
>>
>> Or do you see any technical issue with having the gpio request() ops
>> implemented and having it ensure gpio pinmux is used on a gpio requested
>> pin? Similar to how gpio/pinctrl is behaving in Linux and on some other
>> platforms in U-Boot?
> 
> Well, it removes the incentive to fix the upstream DTs and would make
> it harder to notice missing pinctrls in the DTs.

I can understand that, but gpio pinmux is default so any missing pinctrl
would still cause issues, this changes nothing in that regard.

This only affect if pinctrl exists and pin gets configured for non-gpio
function use. And later a driver/cmd tries to use such pin for gpio use.
Before this patch the use of gpio_request() would not change the pin mux
for gpio use. After this series when code explicily request a pin for
gpio use the pinctrl driver gets notified that it should change pinmux
of the pin for gpio use.

Regards,
Jonas

> 
> Cheers,
> 
> Mark
> 
>>> Alex
>>>>
>>>> With the gpio and pinctrl ops implemented this series also remove a PCIe
>>>> reset-gpios related device lock-up workaround from board u-boot.dtsi.
>>>>
>>>> PX30, RK3066, RK3188, RK356x and RK3588 are the only SoCs that currently
>>>> define gpio-ranges props and is affected by this series.
>>>>
>>>> A follow up series adding support for the pinmux status cmd will also
>>>> add gpio-ranges props for remaining RK SoCs.
>>>>
>>>> Jonas Karlman (4):
>>>>    pinctrl: rockchip: Add gpio_request_enable() ops
>>>>    gpio: rockchip: Add request() ops
>>>>    rockchip: rk3568-rock-3a: Drop PCIe reset-gpios workaround
>>>>    rockchip: rk3568-radxa-e25: Drop PCIe reset-gpios workaround
>>>>
>>>>   arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi     | 12 -------
>>>>   arch/arm/dts/rk3568-rock-3a-u-boot.dtsi       | 12 -------
>>>>   drivers/gpio/rk_gpio.c                        | 10 ++++++
>>>>   .../pinctrl/rockchip/pinctrl-rockchip-core.c  | 31 +++++++++++++++++++
>>>>   4 files changed, 41 insertions(+), 24 deletions(-)
>>>>
>>>
>>
>>


^ permalink raw reply	[relevance 1%]

* Re: Git-GUI change of maintainership
  @ 2024-05-11 20:53  1%       ` Johannes Sixt
  2024-05-11 21:29  0%         ` Junio C Hamano
  0 siblings, 1 reply; 200+ results
From: Johannes Sixt @ 2024-05-11 20:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Pratyush Yadav, Git Mailing List

Am 11.05.24 um 18:43 schrieb Junio C Hamano:
> Johannes Sixt <j6t@kdbg.org> writes:
> 
>> I am about to apply the patch below to note the new maintainer.
> 
> Thanks.  I have these planned.
> 
> 
> diff --git i/Documentation/SubmittingPatches w/Documentation/SubmittingPatches
> index 384893be1c..0690ae2140 100644
> --- i/Documentation/SubmittingPatches
> +++ w/Documentation/SubmittingPatches
> 
> diff --git a/MaintNotes b/MaintNotes
> index b1f0e63..00ffa91 100644
> --- a/MaintNotes
> +++ b/MaintNotes

Thank you. Please consider the following as well.

diff --git a/Documentation/git-gui.txt b/Documentation/git-gui.txt
index e8f3ccb433..f5b02ef114 100644
--- a/Documentation/git-gui.txt
+++ b/Documentation/git-gui.txt
@@ -114,7 +114,7 @@ of end users.
 
 The official repository of the 'git gui' project can be found at:
 
-  https://github.com/prati0100/git-gui.git/
+  https://github.com/j6t/git-gui
 
 GIT
 ---


^ permalink raw reply related	[relevance 1%]

* Re: [Buildroot] [PATCH 3/3] package/gcc: remove version 11.x
  @ 2024-05-11 20:52  0% ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:52 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: Romain Naour, Giulio Benetti, buildroot

On Sat, 11 May 2024 13:59:36 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> Now that gcc 14 was added, we can remove the oldest version of gcc.
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
>  .checkpackageignore                           |   2 -
>  ...-mcmodel-option-to-handle-large-GOTs.patch | 204 ------------------
>  ...-cmodel-large-when-building-crtstuff.patch |  64 ------
>  ...TRANT-for-OpenRISC-when-pthread-is-p.patch |  35 ---
>  ...le-split-stack-for-non-thread-builds.patch |  26 ---
>  ...-machine-names-in-__has_include-.-PR.patch | 124 -----------
>  ...ine-TARGET_HAVE_TLS-when-HAVE_AS_TLS.patch |  49 -----
>  ...add-.note.GNU-stack-section-on-linux.patch | 105 ---------
>  ...emove-crypt-and-crypt_r-interceptors.patch | 140 ------------
>  ...libiberty-Darwin-Fix-a-build-warning.patch |  37 ----
>  package/gcc/Config.in.host                    |  11 -
>  package/gcc/gcc.hash                          |   2 -
>  12 files changed, 799 deletions(-)
>  delete mode 100644 package/gcc/11.4.0/0001-or1k-Add-mcmodel-option-to-handle-large-GOTs.patch
>  delete mode 100644 package/gcc/11.4.0/0002-or1k-Use-cmodel-large-when-building-crtstuff.patch
>  delete mode 100644 package/gcc/11.4.0/0003-gcc-define-_REENTRANT-for-OpenRISC-when-pthread-is-p.patch
>  delete mode 100644 package/gcc/11.4.0/0004-disable-split-stack-for-non-thread-builds.patch
>  delete mode 100644 package/gcc/11.4.0/0005-fixinc-don-t-fix-machine-names-in-__has_include-.-PR.patch
>  delete mode 100644 package/gcc/11.4.0/0006-or1k-Only-define-TARGET_HAVE_TLS-when-HAVE_AS_TLS.patch
>  delete mode 100644 package/gcc/11.4.0/0007-xtensa-add-.note.GNU-stack-section-on-linux.patch
>  delete mode 100644 package/gcc/11.4.0/0008-Remove-crypt-and-crypt_r-interceptors.patch
>  delete mode 100644 package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 0%]

* Re: [Buildroot] [PATCH 1/3] package/gcc: add version 14.x
  @ 2024-05-11 20:52  1% ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:52 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: Romain Naour, Giulio Benetti, buildroot

Hello,

On Sat, 11 May 2024 13:56:35 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> +config BR2_GCC_VERSION_14_X
> +	bool "gcc 14.x"
> +	# powerpc spe support has been deprecated since gcc 8.x.
> +	# https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
> +	depends on !BR2_POWERPC_CPU_HAS_SPE
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_14

This BR2_TOOLCHAIN_GCC_AT_LEAST_14 option did not exist, so I pushed a
preparation commit that adds it, and then applied your commit on top.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 1%]

* [syzbot] [bcachefs?] KMSAN: uninit-value in bch2_extent_update_i_size_sectors
@ 2024-05-11 20:52  1% syzbot
  0 siblings, 0 replies; 200+ results
From: syzbot @ 2024-05-11 20:52 UTC (permalink / raw)
  To: bfoster, kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    dccb07f2914c Merge tag 'for-6.9-rc7-tag' of git://git.kern..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14c66e24980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=617171361dd3cd47
dashboard link: https://syzkaller.appspot.com/bug?extid=eceea46e8838baeeba67
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/fdbc7be30633/disk-dccb07f2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a9e4c11aa835/vmlinux-dccb07f2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/43c3a343ea93/bzImage-dccb07f2.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+eceea46e8838baeeba67@syzkaller.appspotmail.com

bcachefs (loop0): snapshots_read... done
bcachefs (loop0): journal_replay... done
bcachefs (loop0): resume_logged_ops... done
bcachefs (loop0): going read-write
bcachefs (loop0): done starting filesystem
=====================================================
BUG: KMSAN: uninit-value in bch2_extent_update_i_size_sectors+0x140f/0x17d0 fs/bcachefs/io_write.c:237
 bch2_extent_update_i_size_sectors+0x140f/0x17d0 fs/bcachefs/io_write.c:237
 bch2_extent_update+0x4f5/0xac0 fs/bcachefs/io_write.c:314
 bch2_write_index_default fs/bcachefs/io_write.c:366 [inline]
 __bch2_write_index+0x1653/0x2bd0 fs/bcachefs/io_write.c:520
 bch2_write_data_inline fs/bcachefs/io_write.c:1538 [inline]
 bch2_write+0x1a13/0x1b40 fs/bcachefs/io_write.c:1606
 closure_queue include/linux/closure.h:257 [inline]
 closure_call include/linux/closure.h:390 [inline]
 bch2_writepage_do_io fs/bcachefs/fs-io-buffered.c:468 [inline]
 bch2_writepages+0x24a/0x3c0 fs/bcachefs/fs-io-buffered.c:660
 do_writepages+0x427/0xc30 mm/page-writeback.c:2612
 filemap_fdatawrite_wbc+0x1d8/0x270 mm/filemap.c:397
 __filemap_fdatawrite_range+0xe3/0x120 mm/filemap.c:430
 sync_file_range+0x316/0x450 fs/sync.c:292
 ksys_sync_file_range fs/sync.c:364 [inline]
 __do_sys_sync_file_range fs/sync.c:373 [inline]
 __se_sys_sync_file_range fs/sync.c:370 [inline]
 __x64_sys_sync_file_range+0x15a/0x2a0 fs/sync.c:370
 x64_sys_call+0xc90/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:278
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was stored to memory at:
 memcpy_u64s_small fs/bcachefs/util.h:511 [inline]
 bkey_reassemble fs/bcachefs/bkey.h:505 [inline]
 __bch2_bkey_make_mut_noupdate fs/bcachefs/btree_update.h:225 [inline]
 __bch2_bkey_get_mut_noupdate fs/bcachefs/btree_update.h:282 [inline]
 bch2_bkey_get_mut_noupdate fs/bcachefs/btree_update.h:293 [inline]
 bch2_extent_update_i_size_sectors+0x9a9/0x17d0 fs/bcachefs/io_write.c:219
 bch2_extent_update+0x4f5/0xac0 fs/bcachefs/io_write.c:314
 bch2_write_index_default fs/bcachefs/io_write.c:366 [inline]
 __bch2_write_index+0x1653/0x2bd0 fs/bcachefs/io_write.c:520
 bch2_write_data_inline fs/bcachefs/io_write.c:1538 [inline]
 bch2_write+0x1a13/0x1b40 fs/bcachefs/io_write.c:1606
 closure_queue include/linux/closure.h:257 [inline]
 closure_call include/linux/closure.h:390 [inline]
 bch2_writepage_do_io fs/bcachefs/fs-io-buffered.c:468 [inline]
 bch2_writepages+0x24a/0x3c0 fs/bcachefs/fs-io-buffered.c:660
 do_writepages+0x427/0xc30 mm/page-writeback.c:2612
 filemap_fdatawrite_wbc+0x1d8/0x270 mm/filemap.c:397
 __filemap_fdatawrite_range+0xe3/0x120 mm/filemap.c:430
 sync_file_range+0x316/0x450 fs/sync.c:292
 ksys_sync_file_range fs/sync.c:364 [inline]
 __do_sys_sync_file_range fs/sync.c:373 [inline]
 __se_sys_sync_file_range fs/sync.c:370 [inline]
 __x64_sys_sync_file_range+0x15a/0x2a0 fs/sync.c:370
 x64_sys_call+0xc90/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:278
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was stored to memory at:
 memcpy_u64s_small fs/bcachefs/util.h:511 [inline]
 bkey_reassemble fs/bcachefs/bkey.h:505 [inline]
 btree_key_cache_fill fs/bcachefs/btree_key_cache.c:454 [inline]
 bch2_btree_path_traverse_cached_slowpath+0x5f02/0x79f0 fs/bcachefs/btree_key_cache.c:530
 bch2_btree_path_traverse_cached+0xd1a/0x1140
 bch2_btree_path_traverse_one+0x737/0x5290 fs/bcachefs/btree_iter.c:1155
 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:225 [inline]
 bch2_btree_iter_peek_slot+0x128c/0x3840 fs/bcachefs/btree_iter.c:2473
 __bch2_bkey_get_iter fs/bcachefs/btree_iter.h:549 [inline]
 __bch2_bkey_get_mut_noupdate fs/bcachefs/btree_update.h:278 [inline]
 bch2_bkey_get_mut_noupdate fs/bcachefs/btree_update.h:293 [inline]
 bch2_extent_update_i_size_sectors+0x404/0x17d0 fs/bcachefs/io_write.c:219
 bch2_extent_update+0x4f5/0xac0 fs/bcachefs/io_write.c:314
 bch2_write_index_default fs/bcachefs/io_write.c:366 [inline]
 __bch2_write_index+0x1653/0x2bd0 fs/bcachefs/io_write.c:520
 bch2_write_data_inline fs/bcachefs/io_write.c:1538 [inline]
 bch2_write+0x1a13/0x1b40 fs/bcachefs/io_write.c:1606
 closure_queue include/linux/closure.h:257 [inline]
 closure_call include/linux/closure.h:390 [inline]
 bch2_writepage_do_io fs/bcachefs/fs-io-buffered.c:468 [inline]
 bch2_writepages+0x24a/0x3c0 fs/bcachefs/fs-io-buffered.c:660
 do_writepages+0x427/0xc30 mm/page-writeback.c:2612
 filemap_fdatawrite_wbc+0x1d8/0x270 mm/filemap.c:397
 __filemap_fdatawrite_range+0xe3/0x120 mm/filemap.c:430
 sync_file_range+0x316/0x450 fs/sync.c:292
 ksys_sync_file_range fs/sync.c:364 [inline]
 __do_sys_sync_file_range fs/sync.c:373 [inline]
 __se_sys_sync_file_range fs/sync.c:370 [inline]
 __x64_sys_sync_file_range+0x15a/0x2a0 fs/sync.c:370
 x64_sys_call+0xc90/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:278
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
 __kmalloc_large_node+0x231/0x370 mm/slub.c:3927
 __do_kmalloc_node mm/slub.c:3960 [inline]
 __kmalloc_node+0xb10/0x10c0 mm/slub.c:3979
 kmalloc_node include/linux/slab.h:648 [inline]
 kvmalloc_node+0xc0/0x2d0 mm/util.c:634
 kvmalloc include/linux/slab.h:766 [inline]
 btree_bounce_alloc fs/bcachefs/btree_io.c:118 [inline]
 bch2_btree_node_read_done+0x4e68/0x75e0 fs/bcachefs/btree_io.c:1185
 btree_node_read_work+0x8a5/0x1eb0 fs/bcachefs/btree_io.c:1324
 bch2_btree_node_read+0x3d42/0x4b50
 __bch2_btree_root_read fs/bcachefs/btree_io.c:1748 [inline]
 bch2_btree_root_read+0xa6c/0x13d0 fs/bcachefs/btree_io.c:1772
 read_btree_roots+0x454/0xee0 fs/bcachefs/recovery.c:457
 bch2_fs_recovery+0x7adb/0x9310 fs/bcachefs/recovery.c:785
 bch2_fs_start+0x7b2/0xbd0 fs/bcachefs/super.c:1043
 bch2_fs_open+0x135f/0x1670 fs/bcachefs/super.c:2102
 bch2_mount+0x90d/0x1d90 fs/bcachefs/fs.c:1903
 legacy_get_tree+0x114/0x290 fs/fs_context.c:662
 vfs_get_tree+0xa7/0x570 fs/super.c:1779
 do_new_mount+0x71f/0x15e0 fs/namespace.c:3352
 path_mount+0x742/0x1f20 fs/namespace.c:3679
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount+0x725/0x810 fs/namespace.c:3875
 __x64_sys_mount+0xe4/0x150 fs/namespace.c:3875
 x64_sys_call+0x2bf4/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 1 PID: 6218 Comm: syz-executor.0 Not tainted 6.9.0-rc7-syzkaller-00012-gdccb07f2914c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
=====================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[relevance 1%]

* [Buildroot] [git commit] Config.in.legacy: fix legacy BR2_BINFMT_FLAT_SHARED
@ 2024-05-11 20:49  1% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:49 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=e942b78ca1c6d4bf6cd10dc592a41e99e2e24e82
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This legacy option was missing a select BR2_LEGACY.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 Config.in.legacy | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Config.in.legacy b/Config.in.legacy
index 83bb88020a..04b62ffd32 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -148,6 +148,7 @@ comment "Legacy options removed in 2024.05"
 
 config BR2_BINFMT_FLAT_SHARED
 	bool "FLAT shared binary format removed"
+	select BR2_LEGACY
 	help
 	  Support for the FLAT shared binary format has been removed:
 	  its support was removed from the Linux kernel, and also from
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 1%]

* [Buildroot] [git commit] package/gcc: remove version 11.x
@ 2024-05-11 20:50  3% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:50 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=1680e491d8aea0ba0d294873ff3722390b9923af
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Now that gcc 14 was added, we can remove the oldest version of gcc.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 .checkpackageignore                                |   2 -
 Config.in.legacy                                   |   7 +
 ...k-Add-mcmodel-option-to-handle-large-GOTs.patch | 204 ---------------------
 ...k-Use-cmodel-large-when-building-crtstuff.patch |  64 -------
 ..._REENTRANT-for-OpenRISC-when-pthread-is-p.patch |  35 ----
 ...disable-split-stack-for-non-thread-builds.patch |  26 ---
 ...t-fix-machine-names-in-__has_include-.-PR.patch | 124 -------------
 ...y-define-TARGET_HAVE_TLS-when-HAVE_AS_TLS.patch |  49 -----
 ...ensa-add-.note.GNU-stack-section-on-linux.patch | 105 -----------
 ...008-Remove-crypt-and-crypt_r-interceptors.patch | 140 --------------
 ...0009-libiberty-Darwin-Fix-a-build-warning.patch |  37 ----
 package/gcc/Config.in.host                         |  11 --
 package/gcc/gcc.hash                               |   2 -
 13 files changed, 7 insertions(+), 799 deletions(-)

diff --git a/.checkpackageignore b/.checkpackageignore
index 38b6edd70f..f145e0bd11 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -697,8 +697,6 @@ package/fxload/0001-fix-static-build.patch lib_patch.Upstream
 package/gamin/0001-no-abstract-sockets.patch lib_patch.Upstream
 package/gamin/0002-no-const-return.patch lib_patch.Sob lib_patch.Upstream
 package/gamin/0003-fix-missing-PTHREAD_MUTEX_RECURSIVE_NP.patch lib_patch.Upstream
-package/gcc/11.4.0/0001-or1k-Add-mcmodel-option-to-handle-large-GOTs.patch lib_patch.Upstream
-package/gcc/11.4.0/0004-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
 package/gcc/12.3.0/0001-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
 package/gcc/13.2.0/0001-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
 package/gcc/14.1.0/0001-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
diff --git a/Config.in.legacy b/Config.in.legacy
index 04b62ffd32..46f7a304cb 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2024.05"
 
+config BR2_GCC_VERSION_11_X
+	bool "gcc 11.x support removed"
+	select BR2_LEGACY
+	help
+	  Support for gcc version 11.x has been removed. The current
+	  default version (13.x or later) has been selected instead.
+
 config BR2_BINFMT_FLAT_SHARED
 	bool "FLAT shared binary format removed"
 	select BR2_LEGACY
diff --git a/package/gcc/11.4.0/0001-or1k-Add-mcmodel-option-to-handle-large-GOTs.patch b/package/gcc/11.4.0/0001-or1k-Add-mcmodel-option-to-handle-large-GOTs.patch
deleted file mode 100644
index f927cd007d..0000000000
--- a/package/gcc/11.4.0/0001-or1k-Add-mcmodel-option-to-handle-large-GOTs.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From 35c0801efa26bf248d278b5711b77a19e95b2f57 Mon Sep 17 00:00:00 2001
-From: Stafford Horne <shorne@gmail.com>
-Date: Tue, 6 Apr 2021 05:47:17 +0900
-Subject: [PATCH] or1k: Add mcmodel option to handle large GOTs
-
-When building libgeos we get an error with:
-
-    linux-uclibc/9.3.0/crtbeginS.o: in function `__do_global_dtors_aux':
-    crtstuff.c:(.text+0x118): relocation truncated to fit: R_OR1K_GOT16 against symbol `__cxa_finalize' defined in .text section in
-    /home/shorne/work/openrisc/3eb9f9d0f6d8274b2d19753c006bd83f7d536e3c/output/host/or1k-buildroot-linux-uclibc/sysroot/lib/libc.so.
-
-This is caused by GOT code having a limit of 64k.  In OpenRISC this
-looks to be the only relocation code pattern to be limited to 64k.
-
-This patch allows specifying a new option -mcmodel=large which can be
-used to generate 2 more instructions to construct 32-bit addresses for
-up to 4G GOTs.
-
-gcc/ChangeLog:
-
-	PR target/99783
-	* config/or1k/or1k-opts.h: New file.
-	* config/or1k/or1k.c (or1k_legitimize_address_1, print_reloc):
-	Support generating gotha relocations if -mcmodel=large is
-	specified.
-	* config/or1k/or1k.h (TARGET_CMODEL_SMALL, TARGET_CMODEL_LARGE):
-	New macros.
-	* config/or1k/or1k.opt (mcmodel=): New option.
-	* doc/invoke.texi (OpenRISC Options): Document mcmodel.
-
-Uptream: eff8110674ef193481d3657456a262beeb9951ff
-
-Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
-[Romain: add Upstream tag]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
----
- gcc/config/or1k/or1k-opts.h | 30 ++++++++++++++++++++++++++++++
- gcc/config/or1k/or1k.c      | 11 +++++++++--
- gcc/config/or1k/or1k.h      |  7 +++++++
- gcc/config/or1k/or1k.opt    | 19 +++++++++++++++++++
- gcc/doc/invoke.texi         | 12 +++++++++++-
- 5 files changed, 76 insertions(+), 3 deletions(-)
- create mode 100644 gcc/config/or1k/or1k-opts.h
-
-diff --git a/gcc/config/or1k/or1k-opts.h b/gcc/config/or1k/or1k-opts.h
-new file mode 100644
-index 00000000000..f791b894fdd
---- /dev/null
-+++ b/gcc/config/or1k/or1k-opts.h
-@@ -0,0 +1,30 @@
-+/* Definitions for option handling for OpenRISC.
-+   Copyright (C) 2021 Free Software Foundation, Inc.
-+   Contributed by Stafford Horne.
-+
-+   This file is part of GCC.
-+
-+   GCC is free software; you can redistribute it and/or modify it
-+   under the terms of the GNU General Public License as published
-+   by the Free Software Foundation; either version 3, or (at your
-+   option) any later version.
-+
-+   GCC is distributed in the hope that it will be useful, but WITHOUT
-+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
-+   License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with GCC; see the file COPYING3.  If not see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#ifndef GCC_OR1K_OPTS_H
-+#define GCC_OR1K_OPTS_H
-+
-+/* The OpenRISC code generation models available.  */
-+enum or1k_cmodel_type {
-+  CMODEL_SMALL,
-+  CMODEL_LARGE
-+};
-+
-+#endif /* GCC_OR1K_OPTS_H */
-diff --git a/gcc/config/or1k/or1k.c b/gcc/config/or1k/or1k.c
-index e772a7addea..27d3fa17995 100644
---- a/gcc/config/or1k/or1k.c
-+++ b/gcc/config/or1k/or1k.c
-@@ -750,7 +750,14 @@ or1k_legitimize_address_1 (rtx x, rtx scratch)
- 	    {
- 	      base = gen_sym_unspec (base, UNSPEC_GOT);
- 	      crtl->uses_pic_offset_table = 1;
--	      t2 = gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, base);
-+	      if (TARGET_CMODEL_LARGE)
-+		{
-+	          emit_insn (gen_rtx_SET (t1, gen_rtx_HIGH (Pmode, base)));
-+	          emit_insn (gen_add3_insn (t1, t1, pic_offset_table_rtx));
-+	          t2 = gen_rtx_LO_SUM (Pmode, t1, base);
-+		}
-+	      else
-+	        t2 = gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, base);
- 	      t2 = gen_const_mem (Pmode, t2);
- 	      emit_insn (gen_rtx_SET (t1, t2));
- 	      base = t1;
-@@ -1089,7 +1096,7 @@ print_reloc (FILE *stream, rtx x, HOST_WIDE_INT add, reloc_kind kind)
-      no special markup.  */
-   static const char * const relocs[RKIND_MAX][RTYPE_MAX] = {
-     { "lo", "got", "gotofflo", "tpofflo", "gottpofflo", "tlsgdlo" },
--    { "ha", NULL,  "gotoffha", "tpoffha", "gottpoffha", "tlsgdhi" },
-+    { "ha", "gotha", "gotoffha", "tpoffha", "gottpoffha", "tlsgdhi" },
-   };
-   reloc_type type = RTYPE_DIRECT;
- 
-diff --git a/gcc/config/or1k/or1k.h b/gcc/config/or1k/or1k.h
-index fe01ab81ead..669907e7e74 100644
---- a/gcc/config/or1k/or1k.h
-+++ b/gcc/config/or1k/or1k.h
-@@ -21,6 +21,8 @@
- #ifndef GCC_OR1K_H
- #define GCC_OR1K_H
- 
-+#include "config/or1k/or1k-opts.h"
-+
- /* Names to predefine in the preprocessor for this target machine.  */
- #define TARGET_CPU_CPP_BUILTINS()		\
-   do						\
-@@ -37,6 +39,11 @@
-     }						\
-   while (0)
- 
-+#define TARGET_CMODEL_SMALL \
-+  (or1k_code_model == CMODEL_SMALL)
-+#define TARGET_CMODEL_LARGE \
-+  (or1k_code_model == CMODEL_LARGE)
-+
- /* Storage layout.  */
- 
- #define DEFAULT_SIGNED_CHAR 1
-diff --git a/gcc/config/or1k/or1k.opt b/gcc/config/or1k/or1k.opt
-index 6bd0f3eee6d..cc23e3b8856 100644
---- a/gcc/config/or1k/or1k.opt
-+++ b/gcc/config/or1k/or1k.opt
-@@ -21,6 +21,9 @@
- ; See the GCC internals manual (options.texi) for a description of
- ; this file's format.
- 
-+HeaderInclude
-+config/or1k/or1k-opts.h
-+
- mhard-div
- Target RejectNegative InverseMask(SOFT_DIV)
- Enable generation of hardware divide (l.div, l.divu) instructions.  This is the
-@@ -63,6 +66,22 @@ When -mhard-float is selected, enables generation of unordered floating point
- compare and set flag (lf.sfun*) instructions.  By default functions from libgcc
- are used to perform unordered floating point compare and set flag operations.
- 
-+mcmodel=
-+Target RejectNegative Joined Enum(or1k_cmodel_type) Var(or1k_code_model) Init(CMODEL_SMALL)
-+Specify the code model used for accessing memory addresses.  Specifying large
-+enables generating binaries with large global offset tables.  By default the
-+value is small.
-+
-+Enum
-+Name(or1k_cmodel_type) Type(enum or1k_cmodel_type)
-+Known code model types (for use with the -mcmodel= option):
-+
-+EnumValue
-+Enum(or1k_cmodel_type) String(small) Value(CMODEL_SMALL)
-+
-+EnumValue
-+Enum(or1k_cmodel_type) String(large) Value(CMODEL_LARGE)
-+
- mcmov
- Target RejectNegative Mask(CMOV)
- Enable generation of conditional move (l.cmov) instructions.  By default the
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index f1217812280..90c6186fc14 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1136,7 +1136,8 @@ Objective-C and Objective-C++ Dialects}.
- @gccoptlist{-mboard=@var{name}  -mnewlib  -mhard-mul  -mhard-div @gol
- -msoft-mul  -msoft-div @gol
- -msoft-float  -mhard-float  -mdouble-float -munordered-float @gol
---mcmov  -mror  -mrori  -msext  -msfimm  -mshftimm}
-+-mcmov  -mror  -mrori  -msext  -msfimm  -mshftimm @gol
-+-mcmodel=@var{code-model}}
- 
- @emph{PDP-11 Options}
- @gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10 @gol
-@@ -26444,6 +26445,15 @@ Enable generation of shift with immediate (@code{l.srai}, @code{l.srli},
- @code{l.slli}) instructions.  By default extra instructions will be generated
- to store the immediate to a register first.
- 
-+@item -mcmodel=small
-+@opindex mcmodel=small
-+Generate OpenRISC code for the small model: The GOT is limited to 64k. This is
-+the default model.
-+
-+@item -mcmodel=large
-+@opindex mcmodel=large
-+Generate OpenRISC code for the large model: The GOT may grow up to 4G in size.
-+
- 
- @end table
- 
--- 
-2.34.3
-
diff --git a/package/gcc/11.4.0/0002-or1k-Use-cmodel-large-when-building-crtstuff.patch b/package/gcc/11.4.0/0002-or1k-Use-cmodel-large-when-building-crtstuff.patch
deleted file mode 100644
index eb45175135..0000000000
--- a/package/gcc/11.4.0/0002-or1k-Use-cmodel-large-when-building-crtstuff.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From f75178ccd2f5e4d73e27cccffffada859b87be7d Mon Sep 17 00:00:00 2001
-From: Stafford Horne <shorne@gmail.com>
-Date: Wed, 21 Apr 2021 05:33:15 +0900
-Subject: [PATCH] or1k: Use cmodel=large when building crtstuff
-
-When linking gcc runtime objects into large binaries the link may fail
-with the below errors.  This will happen even if we are building with
--mcmodel=large.
-
-    /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `deregister_tm_clones':
-    crtstuff.c:(.text+0x3c): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_deregisterTMCloneTable'
-    /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `register_tm_clones':
-    crtstuff.c:(.text+0xc0): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_registerTMCloneTable'
-
-This patch builds the gcc crtstuff binaries always with the
--mcmodel=large option to ensure they can be linked into large binaries.
-
-libgcc/ChangeLog:
-
-	PR target/99783
-	* config.host (or1k-*, tmake_file): Add or1k/t-crtstuff.
-	* config/or1k/t-crtstuff: New file.
-
-Upstream: da8a9d695b3c4b9397b5d9a27660bfa48af8d707
-
-Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
-[Romain: add Upstream tag]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
----
- libgcc/config.host            | 4 ++--
- libgcc/config/or1k/t-crtstuff | 2 ++
- 2 files changed, 4 insertions(+), 2 deletions(-)
- create mode 100644 libgcc/config/or1k/t-crtstuff
-
-diff --git a/libgcc/config.host b/libgcc/config.host
-index 45f8e19ada4..5523345abb0 100644
---- a/libgcc/config.host
-+++ b/libgcc/config.host
-@@ -1150,12 +1150,12 @@ nios2-*-*)
- 	extra_parts="$extra_parts crti.o crtn.o"
- 	;;
- or1k-*-linux*)
--	tmake_file="$tmake_file or1k/t-or1k"
-+	tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
- 	tmake_file="$tmake_file t-softfp-sfdf t-softfp"
- 	md_unwind_header=or1k/linux-unwind.h
- 	;;
- or1k-*-*)
--	tmake_file="$tmake_file or1k/t-or1k"
-+	tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
- 	tmake_file="$tmake_file t-softfp-sfdf t-softfp"
- 	;;
- pdp11-*-*)
-diff --git a/libgcc/config/or1k/t-crtstuff b/libgcc/config/or1k/t-crtstuff
-new file mode 100644
-index 00000000000..dcae7f3498e
---- /dev/null
-+++ b/libgcc/config/or1k/t-crtstuff
-@@ -0,0 +1,2 @@
-+# Compile crtbeginS.o and crtendS.o with -mcmodel=large
-+CRTSTUFF_T_CFLAGS_S += -mcmodel=large
--- 
-2.34.3
-
diff --git a/package/gcc/11.4.0/0003-gcc-define-_REENTRANT-for-OpenRISC-when-pthread-is-p.patch b/package/gcc/11.4.0/0003-gcc-define-_REENTRANT-for-OpenRISC-when-pthread-is-p.patch
deleted file mode 100644
index cb407c78fc..0000000000
--- a/package/gcc/11.4.0/0003-gcc-define-_REENTRANT-for-OpenRISC-when-pthread-is-p.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 48ced46a5f81f49737ea13d11a099e03062cf141 Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd.kuhls@t-online.de>
-Date: Fri, 27 Mar 2020 21:23:53 +0100
-Subject: [PATCH] gcc: define _REENTRANT for OpenRISC when -pthread is passed
-
-The detection of pthread support fails on OpenRISC unless _REENTRANT
-is defined. Added the CPP_SPEC definition to correct this.
-
-Patch sent upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94372
-
-Upstream: cac2f69cdad434ad5cb60f5fe931d45cd82ef476
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-[Romain: add Upstream tag]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
----
- gcc/config/or1k/linux.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gcc/config/or1k/linux.h b/gcc/config/or1k/linux.h
-index 196f3f3c8f0..0cbdc934af1 100644
---- a/gcc/config/or1k/linux.h
-+++ b/gcc/config/or1k/linux.h
-@@ -32,6 +32,8 @@
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER  "/lib/ld-musl-or1k.so.1"
- 
-+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
-+
- #undef LINK_SPEC
- #define LINK_SPEC "%{h*}			\
-    %{static:-Bstatic}				\
--- 
-2.34.3
-
diff --git a/package/gcc/11.4.0/0004-disable-split-stack-for-non-thread-builds.patch b/package/gcc/11.4.0/0004-disable-split-stack-for-non-thread-builds.patch
deleted file mode 100644
index 817997e925..0000000000
--- a/package/gcc/11.4.0/0004-disable-split-stack-for-non-thread-builds.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 590ef1956786bfd49dae7a5e2fed67509d06f36b Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Mon, 25 Jul 2022 00:29:55 +0200
-Subject: [PATCH] disable split-stack for non-thread builds
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-[Romain: convert to git format]
-Signed-off-by: Romain Naour <romain.naour@smile.fr>
----
- libgcc/config/t-stack | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libgcc/config/t-stack b/libgcc/config/t-stack
-index cc0366b4cd8..f3f97e86d60 100644
---- a/libgcc/config/t-stack
-+++ b/libgcc/config/t-stack
-@@ -1,4 +1,6 @@
- # Makefile fragment to provide generic support for -fsplit-stack.
- # This should be used in config.host for any host which supports
- # -fsplit-stack.
-+ifeq ($(enable_threads),yes)
- LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
-+endif
--- 
-2.34.3
-
diff --git a/package/gcc/11.4.0/0005-fixinc-don-t-fix-machine-names-in-__has_include-.-PR.patch b/package/gcc/11.4.0/0005-fixinc-don-t-fix-machine-names-in-__has_include-.-PR.patch
deleted file mode 100644
index 88bc26e0d7..0000000000
--- a/package/gcc/11.4.0/0005-fixinc-don-t-fix-machine-names-in-__has_include-.-PR.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 3e878f9d1c473f91a1377193d4d8d2616357bed1 Mon Sep 17 00:00:00 2001
-From: Xi Ruoyao <xry111@mengyan1223.wang>
-Date: Mon, 28 Jun 2021 13:54:58 +0800
-Subject: [PATCH] fixinc: don't "fix" machine names in __has_include(...)
- [PR91085]
-
-fixincludes/
-
-	PR other/91085
-	* fixfixes.c (check_has_inc): New static function.
-	  (machine_name_fix): Don't replace header names in
-	  __has_include(...).
-	* inclhack.def (machine_name): Adjust test.
-	* tests/base/testing.h: Update.
-
-Upstream: 6bf383c37e6131a8e247e8a0997d55d65c830b6d
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
----
- fixincludes/fixfixes.c           | 45 ++++++++++++++++++++++++++++++--
- fixincludes/inclhack.def         |  3 ++-
- fixincludes/tests/base/testing.h |  2 +-
- 3 files changed, 46 insertions(+), 4 deletions(-)
-
-diff --git a/fixincludes/fixfixes.c b/fixincludes/fixfixes.c
-index 5b23a8b640d..404b420f302 100644
---- a/fixincludes/fixfixes.c
-+++ b/fixincludes/fixfixes.c
-@@ -477,6 +477,39 @@ FIX_PROC_HEAD( char_macro_def_fix )
-   fputs (text, stdout);
- }
- 
-+/* Check if the pattern at pos is actually in a "__has_include(...)"
-+   directive.  Return the pointer to the ')' of this
-+   "__has_include(...)" if it is, NULL otherwise.  */
-+static const char *
-+check_has_inc (const char *begin, const char *pos, const char *end)
-+{
-+  static const char has_inc[] = "__has_include";
-+  const size_t has_inc_len = sizeof (has_inc) - 1;
-+  const char *p;
-+
-+  for (p = memmem (begin, pos - begin, has_inc, has_inc_len);
-+       p != NULL;
-+       p = memmem (p, pos - p, has_inc, has_inc_len))
-+    {
-+      p += has_inc_len;
-+      while (p < end && ISSPACE (*p))
-+        p++;
-+
-+      /* "__has_include" may appear as "defined(__has_include)",
-+         search for the next appearance then.  */
-+      if (*p != '(')
-+        continue;
-+
-+      /* To avoid too much complexity, just hope there is never a
-+         ')' in a header name.  */
-+      p = memchr (p, ')', end - p);
-+      if (p == NULL || p > pos)
-+        return p;
-+    }
-+
-+  return NULL;
-+}
-+
- /* Fix for machine name #ifdefs that are not in the namespace reserved
-    by the C standard.  They won't be defined if compiling with -ansi,
-    and the headers will break.  We go to some trouble to only change
-@@ -524,7 +557,7 @@ FIX_PROC_HEAD( machine_name_fix )
-       /* If the 'name_pat' matches in between base and limit, we have
-          a bogon.  It is not worth the hassle of excluding comments
-          because comments on #if/#ifdef lines are rare, and strings on
--         such lines are illegal.
-+         such lines are only legal in a "__has_include" directive.
- 
-          REG_NOTBOL means 'base' is not at the beginning of a line, which
-          shouldn't matter since the name_re has no ^ anchor, but let's
-@@ -544,8 +577,16 @@ FIX_PROC_HEAD( machine_name_fix )
-             break;
- 
-           p = base + match[0].rm_so;
--          base += match[0].rm_eo;
- 
-+          /* Check if the match is in __has_include(...) (PR 91085). */
-+          q = check_has_inc (base, p, limit);
-+          if (q) 
-+            {
-+              base = q + 1;
-+              goto again;
-+            }
-+
-+          base += match[0].rm_eo;
-           /* One more test: if on the same line we have the same string
-              with the appropriate underscores, then leave it alone.
-              We want exactly two leading and trailing underscores.  */
-diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
-index c2f54d1189a..b2841d384f3 100644
---- a/fixincludes/inclhack.def
-+++ b/fixincludes/inclhack.def
-@@ -3201,7 +3201,8 @@ fix = {
-     c_fix     = machine_name;
- 
-     test_text = "/* MACH_DIFF: */\n"
--    "#if defined( i386 ) || defined( sparc ) || defined( vax )"
-+    "#if defined( i386 ) || defined( sparc ) || defined( vax ) || "
-+    "defined( linux ) || __has_include ( <linux.h> )"
-     "\n/* no uniform test, so be careful  :-) */";
- };
- 
-diff --git a/fixincludes/tests/base/testing.h b/fixincludes/tests/base/testing.h
-index cf95321fb86..8b3accaf04e 100644
---- a/fixincludes/tests/base/testing.h
-+++ b/fixincludes/tests/base/testing.h
-@@ -64,7 +64,7 @@ BSD43__IOWR('T', 1) /* Some are multi-line */
- 
- #if defined( MACHINE_NAME_CHECK )
- /* MACH_DIFF: */
--#if defined( i386 ) || defined( sparc ) || defined( vax )
-+#if defined( i386 ) || defined( sparc ) || defined( vax ) || defined( linux ) || __has_include ( <linux.h> )
- /* no uniform test, so be careful  :-) */
- #endif  /* MACHINE_NAME_CHECK */
- 
--- 
-2.34.3
-
diff --git a/package/gcc/11.4.0/0006-or1k-Only-define-TARGET_HAVE_TLS-when-HAVE_AS_TLS.patch b/package/gcc/11.4.0/0006-or1k-Only-define-TARGET_HAVE_TLS-when-HAVE_AS_TLS.patch
deleted file mode 100644
index 025e6cfe32..0000000000
--- a/package/gcc/11.4.0/0006-or1k-Only-define-TARGET_HAVE_TLS-when-HAVE_AS_TLS.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From ca01d2526917ec6e54b30472d3aedfd46d4ca585 Mon Sep 17 00:00:00 2001
-From: Stafford Horne <shorne@gmail.com>
-Date: Thu, 29 Sep 2022 15:32:39 +0100
-Subject: [PATCH] or1k: Only define TARGET_HAVE_TLS when HAVE_AS_TLS
-
-This was found when testing buildroot with linuxthreads enabled.  In
-this case, the build passes --disable-tls to the toolchain during
-configuration.  After building the OpenRISC toolchain it was still
-generating TLS code sequences and causing linker failures such as:
-
- ..../or1k-buildroot-linux-uclibc-gcc -o gpsd-3.24/gpsctl .... -lusb-1.0 -lm -lrt -lnsl
- ..../ld: ..../sysroot/usr/lib/libusb-1.0.so: undefined reference to `__tls_get_addr'
-
-This patch fixes this by disabling tls for the OpenRISC target when requested
-via --disable-tls.
-
-gcc/ChangeLog:
-
-	* config/or1k/or1k.c (TARGET_HAVE_TLS): Only define if
-	HAVE_AS_TLS is defined.
-
-Tested-by: Yann E. MORIN <yann.morin@orange.com>
-
-Upstream: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ca01d2526917ec6e54b30472d3aedfd46d4ca585
-
-[Bernd: backported to 11.4.0]
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- gcc/config/or1k/or1k.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gcc/config/or1k/or1k.c b/gcc/config/or1k/or1k.c
-index da2f59062ba..0ce7b234417 100644
---- a/gcc/config/or1k/or1k.c
-+++ b/gcc/config/or1k/or1k.c
-@@ -2175,8 +2175,10 @@ or1k_output_mi_thunk (FILE *file, tree thunk_fndecl,
- #undef  TARGET_LEGITIMATE_ADDRESS_P
- #define TARGET_LEGITIMATE_ADDRESS_P or1k_legitimate_address_p
- 
-+#ifdef HAVE_AS_TLS
- #undef  TARGET_HAVE_TLS
- #define TARGET_HAVE_TLS true
-+#endif
- 
- #undef  TARGET_HAVE_SPECULATION_SAFE_VALUE
- #define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed
--- 
-2.39.3
-
diff --git a/package/gcc/11.4.0/0007-xtensa-add-.note.GNU-stack-section-on-linux.patch b/package/gcc/11.4.0/0007-xtensa-add-.note.GNU-stack-section-on-linux.patch
deleted file mode 100644
index 967bbaf3fe..0000000000
--- a/package/gcc/11.4.0/0007-xtensa-add-.note.GNU-stack-section-on-linux.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 4958020ecc85a30c52544deaf3c017cea82a0fb0 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Thu, 2 Mar 2023 09:45:41 -0800
-Subject: [PATCH] xtensa: add .note.GNU-stack section on linux
-
-gcc/
-	* config/xtensa/linux.h (TARGET_ASM_FILE_END): New macro.
-
-libgcc/
-	* config/xtensa/crti.S: Add .note.GNU-stack section on linux.
-	* config/xtensa/crtn.S: Likewise.
-	* config/xtensa/lib1funcs.S: Likewise.
-	* config/xtensa/lib2funcs.S: Likewise.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-Upstream: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6360bf9a2d08f08c151464c77c0da53cd702ff25
----
- gcc/config/xtensa/linux.h        | 1 +
- libgcc/config/xtensa/crti.S      | 6 ++++++
- libgcc/config/xtensa/crtn.S      | 6 ++++++
- libgcc/config/xtensa/lib1funcs.S | 6 ++++++
- libgcc/config/xtensa/lib2funcs.S | 6 ++++++
- 5 files changed, 25 insertions(+)
-
-diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h
-index 468a48489e7..a69e38c58ee 100644
---- a/gcc/config/xtensa/linux.h
-+++ b/gcc/config/xtensa/linux.h
-@@ -69,3 +69,4 @@ along with GCC; see the file COPYING3.  If not see
- 
- #undef DBX_REGISTER_NUMBER
- 
-+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-diff --git a/libgcc/config/xtensa/crti.S b/libgcc/config/xtensa/crti.S
-index 87a66e32e4a..40dd8c0dbc2 100644
---- a/libgcc/config/xtensa/crti.S
-+++ b/libgcc/config/xtensa/crti.S
-@@ -26,6 +26,12 @@
- 
- #include "xtensa-config.h"
- 
-+/* An executable stack is *not* required for these functions.  */
-+#if defined(__ELF__) && defined(__linux__)
-+.section .note.GNU-stack,"",%progbits
-+.previous
-+#endif
-+
- 	.section .init
- 	.globl _init
- 	.type _init,@function
-diff --git a/libgcc/config/xtensa/crtn.S b/libgcc/config/xtensa/crtn.S
-index 8d2c2b1f22b..9d29f8fce1a 100644
---- a/libgcc/config/xtensa/crtn.S
-+++ b/libgcc/config/xtensa/crtn.S
-@@ -27,6 +27,12 @@
- 
- #include "xtensa-config.h"
- 
-+/* An executable stack is *not* required for these functions.  */
-+#if defined(__ELF__) && defined(__linux__)
-+.section .note.GNU-stack,"",%progbits
-+.previous
-+#endif
-+
- 	.section .init
- #if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
- 	retw
-diff --git a/libgcc/config/xtensa/lib1funcs.S b/libgcc/config/xtensa/lib1funcs.S
-index a482a6eefc8..5245d7ad8ad 100644
---- a/libgcc/config/xtensa/lib1funcs.S
-+++ b/libgcc/config/xtensa/lib1funcs.S
-@@ -25,6 +25,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- 
- #include "xtensa-config.h"
- 
-+/* An executable stack is *not* required for these functions.  */
-+#if defined(__ELF__) && defined(__linux__)
-+.section .note.GNU-stack,"",%progbits
-+.previous
-+#endif
-+
- /* Define macros for the ABS and ADDX* instructions to handle cases
-    where they are not included in the Xtensa processor configuration.  */
- 
-diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S
-index 36938c84924..a574a45fa68 100644
---- a/libgcc/config/xtensa/lib2funcs.S
-+++ b/libgcc/config/xtensa/lib2funcs.S
-@@ -25,6 +25,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- 
- #include "xtensa-config.h"
- 
-+/* An executable stack is *not* required for these functions.  */
-+#if defined(__ELF__) && defined(__linux__)
-+.section .note.GNU-stack,"",%progbits
-+.previous
-+#endif
-+
- /* __xtensa_libgcc_window_spill: This function flushes out all but the
-    current register window.  This is used to set up the stack so that
-    arbitrary frames can be accessed.  */
--- 
-2.39.2
-
diff --git a/package/gcc/11.4.0/0008-Remove-crypt-and-crypt_r-interceptors.patch b/package/gcc/11.4.0/0008-Remove-crypt-and-crypt_r-interceptors.patch
deleted file mode 100644
index 36db9681cd..0000000000
--- a/package/gcc/11.4.0/0008-Remove-crypt-and-crypt_r-interceptors.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 0ef972d11dda9051941656e5797889b8fbf2dca6 Mon Sep 17 00:00:00 2001
-From: Fangrui Song <i@maskray.me>
-Date: Fri, 28 Apr 2023 09:59:17 -0700
-Subject: [PATCH] Remove crypt and crypt_r interceptors
-
-From Florian Weimer's D144073
-
-> On GNU/Linux (glibc), the crypt and crypt_r functions are not part of the main shared object (libc.so.6), but libcrypt (with multiple possible sonames). The sanitizer libraries do not depend on libcrypt, so it can happen that during sanitizer library initialization, no real implementation will be found because the crypt, crypt_r functions are not present in the process image (yet). If its interceptors are called nevertheless, this results in a call through a null pointer when the sanitizer library attempts to forward the call to the real implementation.
->
-> Many distributions have already switched to libxcrypt, a library that is separate from glibc and that can be build with sanitizers directly (avoiding the need for interceptors). This patch disables building the interceptor for glibc targets.
-
-Let's remove crypt and crypt_r interceptors (D68431) to fix issues with
-newer glibc.
-
-For older glibc, msan will not know that an uninstrumented crypt_r call
-initializes `data`, so there is a risk for false positives. However, with some
-codebase survey, I think crypt_r uses are very few and the call sites typically
-have a `memset(&data, 0, sizeof(data));` anyway.
-
-Fix https://github.com/google/sanitizers/issues/1365
-Related: https://bugzilla.redhat.com/show_bug.cgi?id=2169432
-
-Reviewed By: #sanitizers, fweimer, thesamesam, vitalybuka
-
-Differential Revision: https://reviews.llvm.org/D149403
-
-[Thomas: taken from Crosstool-NG]
-Upstream: (llvm) https://github.com/llvm/llvm-project/commit/d7bead833631486e337e541e692d9b4a1ca14edd
-Upstream: (gcc)  https://github.com/gcc-mirror/gcc/commit/d96e14ceb9475f9bccbbc0325d5b11419fad9246
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
----
- .../sanitizer_common_interceptors.inc         | 37 -------------------
- .../sanitizer_platform_interceptors.h         |  2 -
- .../sanitizer_platform_limits_posix.cpp       |  2 -
- .../sanitizer_platform_limits_posix.h         |  1 -
- 4 files changed, 42 deletions(-)
-
-diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
-index ff2acfc7c010..6d802bc7159f 100644
---- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
-+++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
-@@ -9814,41 +9814,6 @@ INTERCEPTOR(SSIZE_T, getrandom, void *buf, SIZE_T buflen, unsigned int flags) {
- #define INIT_GETRANDOM
- #endif
- 
--#if SANITIZER_INTERCEPT_CRYPT
--INTERCEPTOR(char *, crypt, char *key, char *salt) {
--  void *ctx;
--  COMMON_INTERCEPTOR_ENTER(ctx, crypt, key, salt);
--  COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1);
--  COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1);
--  char *res = REAL(crypt)(key, salt);
--  if (res != nullptr)
--    COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1);
--  return res;
--}
--#define INIT_CRYPT COMMON_INTERCEPT_FUNCTION(crypt);
--#else
--#define INIT_CRYPT
--#endif
--
--#if SANITIZER_INTERCEPT_CRYPT_R
--INTERCEPTOR(char *, crypt_r, char *key, char *salt, void *data) {
--  void *ctx;
--  COMMON_INTERCEPTOR_ENTER(ctx, crypt_r, key, salt, data);
--  COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1);
--  COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1);
--  char *res = REAL(crypt_r)(key, salt, data);
--  if (res != nullptr) {
--    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, data,
--                                   __sanitizer::struct_crypt_data_sz);
--    COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1);
--  }
--  return res;
--}
--#define INIT_CRYPT_R COMMON_INTERCEPT_FUNCTION(crypt_r);
--#else
--#define INIT_CRYPT_R
--#endif
--
- #if SANITIZER_INTERCEPT_GETENTROPY
- INTERCEPTOR(int, getentropy, void *buf, SIZE_T buflen) {
-   void *ctx;
-@@ -10337,8 +10302,6 @@ static void InitializeCommonInterceptors() {
-   INIT_GETUSERSHELL;
-   INIT_SL_INIT;
-   INIT_GETRANDOM;
--  INIT_CRYPT;
--  INIT_CRYPT_R;
-   INIT_GETENTROPY;
-   INIT_QSORT;
-   INIT_QSORT_R;
-diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
-index 18bab346ce6e..cf329b76836e 100644
---- a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
-+++ b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
-@@ -572,8 +572,6 @@
- #define SANITIZER_INTERCEPT_FDEVNAME SI_FREEBSD
- #define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID)
- #define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD)
--#define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID)
--#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID)
- 
- #define SANITIZER_INTERCEPT_GETRANDOM \
-   ((SI_LINUX && __GLIBC_PREREQ(2, 25)) || SI_FREEBSD)
-diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
-index 5743516c0460..980776fc7d78 100644
---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
-+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
-@@ -142,7 +142,6 @@ typedef struct user_fpregs elf_fpregset_t;
- #include <linux/serial.h>
- #include <sys/msg.h>
- #include <sys/ipc.h>
--#include <crypt.h>
- #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
- 
- #if SANITIZER_ANDROID
-@@ -244,7 +243,6 @@ namespace __sanitizer {
-   unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
-   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
-   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
--  unsigned struct_crypt_data_sz = sizeof(struct crypt_data);
- #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
- 
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
-diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
-index 83861105a509..7ad11b943157 100644
---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
-+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
-@@ -295,7 +295,6 @@ extern unsigned struct_msqid_ds_sz;
- extern unsigned struct_mq_attr_sz;
- extern unsigned struct_timex_sz;
- extern unsigned struct_statvfs_sz;
--extern unsigned struct_crypt_data_sz;
- #endif  // SANITIZER_LINUX && !SANITIZER_ANDROID
- 
- struct __sanitizer_iovec {
--- 
-2.43.0
-
diff --git a/package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch b/package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch
deleted file mode 100644
index 3c694a89fa..0000000000
--- a/package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d1fc3505cc09d0ee02abbb732eafc91967c3ac07 Mon Sep 17 00:00:00 2001
-From: Iain Sandoe <iain@sandoe.co.uk>
-Date: Mon, 23 Aug 2021 17:34:43 +0100
-Subject: [PATCH] libiberty, Darwin: Fix a build warning.
-
-r12-3005-g220c410162ebece4f missed a cast for the set_32 call.
-Fixed thus.
-
-Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
-
-libiberty/ChangeLog:
-
-	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
-	Cast the first argument to set_32 as needed.
-
-Upstream: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=38757aa88735ab2e511bc428e2407a5a5e9fa0be
-Signed-off-by: Brandon Maier <brandon.maier@collins.com>
----
- libiberty/simple-object-mach-o.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c
-index 72b69d19c21..a8869e7c639 100644
---- a/libiberty/simple-object-mach-o.c
-+++ b/libiberty/simple-object-mach-o.c
-@@ -1228,7 +1228,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor,
-       /* Swap the indices, if required.  */
- 
-       for (i = 0; i < (nsects_in * 4); ++i)
--	set_32 (&index[i], index[i]);
-+	set_32 ((unsigned char *) &index[i], index[i]);
- 
-       sechdr_offset += sechdrsize;
- 
--- 
-2.45.0
-
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index a635b6d5ad..2324561a3e 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -22,16 +22,6 @@ config BR2_GCC_VERSION_POWERPC_SPE
 	depends on BR2_POWERPC_CPU_HAS_SPE
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_8
 
-config BR2_GCC_VERSION_11_X
-	bool "gcc 11.x"
-	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_12
-	# powerpc spe support has been deprecated since gcc 8.x.
-	# https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
-	depends on !BR2_POWERPC_CPU_HAS_SPE
-	# ARC HS48 rel 31 only supported by gcc arc fork.
-	depends on !BR2_archs4x_rel31
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_11
-
 config BR2_GCC_VERSION_12_X
 	bool "gcc 12.x"
 	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_13
@@ -83,7 +73,6 @@ config BR2_GCC_SUPPORTS_DLANG
 config BR2_GCC_VERSION
 	string
 	default "8.4.0"     if BR2_GCC_VERSION_POWERPC_SPE
-	default "11.4.0"    if BR2_GCC_VERSION_11_X
 	default "12.3.0"    if BR2_GCC_VERSION_12_X
 	default "13.2.0"    if BR2_GCC_VERSION_13_X
 	default "14.1.0"    if BR2_GCC_VERSION_14_X
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index b686bb1ca7..08d4fca6e7 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -2,8 +2,6 @@
 sha512  6de904f552a02de33b11ef52312bb664396efd7e1ce3bbe37bfad5ef617f133095b3767b4804bc7fe78df335cb53bc83f1ac055baed40979ce4c2c3e46b70280  gcc-8.4.0.tar.xz
 # From https://gcc.gnu.org/pub/gcc/releases/gcc-10.4.0/sha512.sum
 sha512  440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648  gcc-10.4.0.tar.xz
-# From https://gcc.gnu.org/pub/gcc/releases/gcc-11.4.0/sha512.sum
-sha512  a5018bf1f1fa25ddf33f46e720675d261987763db48e7a5fdf4c26d3150a8abcb82fdc413402df1c32f2e6b057d9bae6bdfa026defc4030e10144a8532e60f14  gcc-11.4.0.tar.xz
 # From https://gcc.gnu.org/pub/gcc/releases/gcc-12.3.0/sha512.sum
 sha512  8fb799dfa2e5de5284edf8f821e3d40c2781e4c570f5adfdb1ca0671fcae3fb7f794ea783e80f01ec7bfbf912ca508e478bd749b2755c2c14e4055648146c204  gcc-12.3.0.tar.xz
 # From https://gcc.gnu.org/pub/gcc/releases/gcc-13.2.0/sha512.sum
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 3%]

* [Buildroot] [git commit] package/gcc: add version 14.x
@ 2024-05-11 20:50  4% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:50 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=5eb0203cb05c0a65bdb7f89a2644eef7cff2dd27
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

See here for changes:
https://gcc.gnu.org/gcc-14/changes.html

Patches 0002/0003 are upstream.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 .checkpackageignore                                |  1 +
 ...disable-split-stack-for-non-thread-builds.patch | 26 ++++++++++++++++++++++
 package/gcc/Config.in.host                         |  8 +++++++
 package/gcc/gcc.hash                               |  2 ++
 4 files changed, 37 insertions(+)

diff --git a/.checkpackageignore b/.checkpackageignore
index d7e50f3dcf..38b6edd70f 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -701,6 +701,7 @@ package/gcc/11.4.0/0001-or1k-Add-mcmodel-option-to-handle-large-GOTs.patch lib_p
 package/gcc/11.4.0/0004-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
 package/gcc/12.3.0/0001-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
 package/gcc/13.2.0/0001-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
+package/gcc/14.1.0/0001-disable-split-stack-for-non-thread-builds.patch lib_patch.Upstream
 package/gcc/8.4.0/0001-xtensa-fix-PR-target-91880.patch lib_patch.Upstream
 package/gcc/8.4.0/0002-Revert-re-PR-target-92095-internal-error-with-O1-mcp.patch lib_patch.Upstream
 package/gcc/8.4.0/0003-libsanitizer-Remove-cyclades-from-libsanitizer.patch lib_patch.Upstream
diff --git a/package/gcc/14.1.0/0001-disable-split-stack-for-non-thread-builds.patch b/package/gcc/14.1.0/0001-disable-split-stack-for-non-thread-builds.patch
new file mode 100644
index 0000000000..e801085dad
--- /dev/null
+++ b/package/gcc/14.1.0/0001-disable-split-stack-for-non-thread-builds.patch
@@ -0,0 +1,26 @@
+From 4f67134e0b1404fef4ea72342be8fab4c37ca8c8 Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@openadk.org>
+Date: Mon, 25 Jul 2022 00:29:55 +0200
+Subject: [PATCH] disable split-stack for non-thread builds
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+[Romain: convert to git format]
+Signed-off-by: Romain Naour <romain.naour@smile.fr>
+---
+ libgcc/config/t-stack | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libgcc/config/t-stack b/libgcc/config/t-stack
+index cc0366b4cd8..f3f97e86d60 100644
+--- a/libgcc/config/t-stack
++++ b/libgcc/config/t-stack
+@@ -1,4 +1,6 @@
+ # Makefile fragment to provide generic support for -fsplit-stack.
+ # This should be used in config.host for any host which supports
+ # -fsplit-stack.
++ifeq ($(enable_threads),yes)
+ LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
++endif
+-- 
+2.34.3
+
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index d294e8da30..bc1f1c3f89 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -49,6 +49,13 @@ config BR2_GCC_VERSION_13_X
 	depends on !BR2_POWERPC_CPU_HAS_SPE
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_13
 
+config BR2_GCC_VERSION_14_X
+	bool "gcc 14.x"
+	# powerpc spe support has been deprecated since gcc 8.x.
+	# https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
+	depends on !BR2_POWERPC_CPU_HAS_SPE
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_14
+
 endchoice
 
 # libcilkrts was introduced in gcc 4.9 and removed in gcc 8.x
@@ -79,6 +86,7 @@ config BR2_GCC_VERSION
 	default "11.4.0"    if BR2_GCC_VERSION_11_X
 	default "12.3.0"    if BR2_GCC_VERSION_12_X
 	default "13.2.0"    if BR2_GCC_VERSION_13_X
+	default "14.1.0"    if BR2_GCC_VERSION_14_X
 	default "arc-2023.09-release" if BR2_GCC_VERSION_ARC
 
 config BR2_EXTRA_GCC_CONFIG_OPTIONS
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index 5061a603bc..b686bb1ca7 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -8,6 +8,8 @@ sha512  a5018bf1f1fa25ddf33f46e720675d261987763db48e7a5fdf4c26d3150a8abcb82fdc41
 sha512  8fb799dfa2e5de5284edf8f821e3d40c2781e4c570f5adfdb1ca0671fcae3fb7f794ea783e80f01ec7bfbf912ca508e478bd749b2755c2c14e4055648146c204  gcc-12.3.0.tar.xz
 # From https://gcc.gnu.org/pub/gcc/releases/gcc-13.2.0/sha512.sum
 sha512  d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2  gcc-13.2.0.tar.xz
+# From https://gcc.gnu.org/pub/gcc/releases/gcc-14.1.0/sha512.sum
+sha512  e9e224f2b26646fcf038d28dfa08b94c623bc57941f99894a321d01c600f7c68aff6b8837fd25e73e540de1f8de5606e98694a62cdcdfb525ce768b3ef6879ea  gcc-14.1.0.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  4dca20f517a42bb027fec605965b09fb917a535eebf3fe3e811d93476b02b1962df5ad4665f117bd44c2ec8e8015d51a44c00591761fe5f259c201ac5c7d920f  gcc-arc-2023.09-release.tar.gz
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 4%]

* [Buildroot] [git commit] toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_14 blind option
@ 2024-05-11 20:49  4% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:49 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=1c7f6a44579a4defc5126528bc4f93c99d14d104
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

In order to add gcc 14 support in follow-up commits, introduce
BR2_TOOLCHAIN_GCC_AT_LEAST_13 symbol.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 toolchain/Config.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 944e573f82..655f1a53dc 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -795,10 +795,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_13
 	bool
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_12
 
+config BR2_TOOLCHAIN_GCC_AT_LEAST_14
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_13
+
 # This order guarantees that the highest version is set, as kconfig
 # stops affecting a value on the first matching default.
 config BR2_TOOLCHAIN_GCC_AT_LEAST
 	string
+	default "14"	if BR2_TOOLCHAIN_GCC_AT_LEAST_14
 	default "13"	if BR2_TOOLCHAIN_GCC_AT_LEAST_13
 	default "12"	if BR2_TOOLCHAIN_GCC_AT_LEAST_12
 	default "11"	if BR2_TOOLCHAIN_GCC_AT_LEAST_11
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 4%]

* [Buildroot] [git commit] package/gcc: switch to 13.x as default
@ 2024-05-11 20:50  1% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:50 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=dc0f7215c604e845009e03784a221332867bf35a
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/gcc/Config.in.host | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index bc1f1c3f89..a635b6d5ad 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -5,7 +5,7 @@ choice
 	default BR2_GCC_VERSION_ARC if BR2_GCC_VERSION_4_8_ARC # legacy
 	default BR2_GCC_VERSION_ARC if BR2_arc
 	default BR2_GCC_VERSION_POWERPC_SPE if BR2_POWERPC_CPU_HAS_SPE
-	default BR2_GCC_VERSION_12_X
+	default BR2_GCC_VERSION_13_X
 	help
 	  Select the version of gcc you wish to use.
 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 1%]

* [Buildroot] [PATCH] package/libnss: bump version to 3.100
@ 2024-05-11 20:48  1% Giulio Benetti
  0 siblings, 0 replies; 200+ results
From: Giulio Benetti @ 2024-05-11 20:48 UTC (permalink / raw)
  To: buildroot; +Cc: Joseph Kogut, Giulio Benetti

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/libnss/libnss.hash | 4 ++--
 package/libnss/libnss.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libnss/libnss.hash b/package/libnss/libnss.hash
index 8c7c807f79..1a69398f0d 100644
--- a/package/libnss/libnss.hash
+++ b/package/libnss/libnss.hash
@@ -1,4 +1,4 @@
-# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_99_RTM/src/SHA256SUMS
-sha256  5cd5c2c8406a376686e6fa4b9c2de38aa280bea07bf927c0d521ba07c88b09bd  nss-3.99.tar.gz
+# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_100_RTM/src/SHA256SUMS
+sha256  1e35373ce9cb5b776f678bb341b0625c437520d09ebd91d1abd622e072e38d88  nss-3.100.tar.gz
 # Locally calculated
 sha256  a20c1a32d1f8102432360b42e932869f7c11c7cdbacf9cac554c422132af47f4  nss/COPYING
diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
index 0d8b4dc592..5cdc494b16 100644
--- a/package/libnss/libnss.mk
+++ b/package/libnss/libnss.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBNSS_VERSION = 3.99
+LIBNSS_VERSION = 3.100
 LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz
 LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(subst .,_,$(LIBNSS_VERSION))_RTM/src
 LIBNSS_DISTDIR = dist
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 1%]

* Re: [PATCH RFC cmpxchg 8/8] riscv: Emulate one-byte and two-byte cmpxchg
  @ 2024-05-11 20:44  0%         ` Leonardo Bras
  0 siblings, 0 replies; 200+ results
From: Leonardo Bras @ 2024-05-11 20:44 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Leonardo Bras, Guo Ren, linux-kernel, kernel-team, andi.shyti,
	andrzej.hajda, linux-riscv, palmer

On Sat, May 11, 2024 at 07:54:34AM -0700, Paul E. McKenney wrote:
> On Sat, May 11, 2024 at 02:50:13AM -0400, Guo Ren wrote:
> > On Thu, Apr 04, 2024 at 07:15:40AM -0700, Palmer Dabbelt wrote:
> > > On Mon, 01 Apr 2024 14:39:50 PDT (-0700), paulmck@kernel.org wrote:
> > > > Use the new cmpxchg_emu_u8() and cmpxchg_emu_u16() to emulate one-byte
> > > > and two-byte cmpxchg() on riscv.
> > > > 
> > > > [ paulmck: Apply kernel test robot feedback. ]
> > > 
> > > I'm not entirely following the thread, but sounds like there's going to be
> > > generic kernel users of this now?  Before we'd said "no" to the byte/half
> > > atomic emulation routines beacuse they weren't used, but if it's a generic
> > > thing then I'm find adding them.
> > > 
> > > There's a patch set over here
> > > <https://lore.kernel.org/all/20240103163203.72768-2-leobras@redhat.com/>
> > > that implements these more directly using LR/SC.  I was sort of on the fence
> > > about just taking it even with no direct users right now, as the byte/half
> > > atomic extension is working its way through the spec process so we'll have
> > > them for real soon.  I stopped right there for the last merge window,
> > > though, as I figured it was too late to be messing with the atomics...
> > > 
> > > So
> > > 
> > > Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
> > F.Y.I Leonardo Bras <leobras@redhat.com>

Hi Guo Ren, thanks for bringing it to my attention.

I am quite excited about the inclusion of my patchset on riscv/cmpxchg, and 
I hope it can be useful both to your qspinlock implementation and on Paul's 
RCU improvement.

> 
> I am carrying this in -rcu, but only for testing purposes, not for
> inclusion into mainline.  Not that I know of anyone testing -rcu on
> RISC-V, but still, I wouldn't want to do anything do discourage such
> testing.
> 
> The reason that this patch is no longer intended for inclusion is that it
> has been obsoleted by a patch that provides native support for one-byte
> and two-byte cmpxchg() operations.  Which is even better!  ;-)
> 
> 							Thanx, Paul

Thanks Paul!
Months ago I have reworked cmpxchg and added those 1-byte and 2-byte 
{cmp,}xchg asm implementations using lr/sc, as they would be useful to Guo 
Ren's qspinlock, and I am thankful that you provided another use case, 
because it provides more proof of it's usefulness.

Thanks!
Leo

> 
> > > if you guys want to take some sort of tree-wide change to make the byte/half
> > > stuff be required everywhere.  We'll eventually end up with arch routines
> > > for the extension, so at that point we might as well also have the more
> > > direct LR/SC flavors.
> > > 
> > > If you want I can go review/merge that RISC-V patch set and then it'll have
> > > time to bake for a shared tag you can pick up for all this stuff?  No rush
> > > on my end, just LMK.
> > > 
> > > > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > > > Cc: Andi Shyti <andi.shyti@linux.intel.com>
> > > > Cc: Andrzej Hajda <andrzej.hajda@intel.com>
> > > > Cc: <linux-riscv@lists.infradead.org>
> > > > ---
> > > >  arch/riscv/Kconfig               |  1 +
> > > >  arch/riscv/include/asm/cmpxchg.h | 25 +++++++++++++++++++++++++
> > > >  2 files changed, 26 insertions(+)
> > > > 
> > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> > > > index be09c8836d56b..4eaf40d0a52ec 100644
> > > > --- a/arch/riscv/Kconfig
> > > > +++ b/arch/riscv/Kconfig
> > > > @@ -44,6 +44,7 @@ config RISCV
> > > >  	select ARCH_HAS_UBSAN
> > > >  	select ARCH_HAS_VDSO_DATA
> > > >  	select ARCH_KEEP_MEMBLOCK if ACPI
> > > > +	select ARCH_NEED_CMPXCHG_1_2_EMU
> > > >  	select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
> > > >  	select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
> > > >  	select ARCH_STACKWALK
> > > > diff --git a/arch/riscv/include/asm/cmpxchg.h b/arch/riscv/include/asm/cmpxchg.h
> > > > index 2fee65cc84432..a5b377481785c 100644
> > > > --- a/arch/riscv/include/asm/cmpxchg.h
> > > > +++ b/arch/riscv/include/asm/cmpxchg.h
> > > > @@ -9,6 +9,7 @@
> > > >  #include <linux/bug.h>
> > > > 
> > > >  #include <asm/fence.h>
> > > > +#include <linux/cmpxchg-emu.h>
> > > > 
> > > >  #define __xchg_relaxed(ptr, new, size)					\
> > > >  ({									\
> > > > @@ -170,6 +171,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			"0:	lr.w %0, %2\n"				\
> > > > @@ -214,6 +221,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			"0:	lr.w %0, %2\n"				\
> > > > @@ -260,6 +273,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			RISCV_RELEASE_BARRIER				\
> > > > @@ -306,6 +325,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			"0:	lr.w %0, %2\n"				\
> > > 
> 


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[relevance 0%]

* Re: [Buildroot] [PATCH 1/1] package/kodi: fix libudfread dependency
  @ 2024-05-11 20:45  1% ` Yann E. MORIN
  0 siblings, 0 replies; 200+ results
From: Yann E. MORIN @ 2024-05-11 20:45 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

Bernd, All,

On 2024-05-11 14:58 +0200, Bernd Kuhls spake thusly:
> Buildroot c61934611111cb3ea04604707052b1387bde5134 commit added a broken
> dependency to libudfread. In fact libudfread is still an optional
> dependency, just the configure options changes due to upstream
> commit https://github.com/xbmc/xbmc/commit/5f9b9cfa26f274e381e92d73cfa33fb55582436e
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Applied to master, thanks.

It looks like it is a correct patch, and the c onfigure step succeeds
in detecting whther udefread is needed and present, or not needed.

However, I was not able to test-build, because of the libatomic issue I
already mentioned earlier.

Regards,
Yann E. MORIN.

> ---
>  package/kodi/Config.in | 1 -
>  package/kodi/kodi.mk   | 8 +++++++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/package/kodi/Config.in b/package/kodi/Config.in
> index 10f46802a8..6c48168bf8 100644
> --- a/package/kodi/Config.in
> +++ b/package/kodi/Config.in
> @@ -166,7 +166,6 @@ config BR2_PACKAGE_KODI_EVENTCLIENTS
>  config BR2_PACKAGE_KODI_LIBBLURAY
>  	bool "blu-ray"
>  	select BR2_PACKAGE_LIBBLURAY
> -	select BR2_PACKAGE_LIBUDFREAD
>  	help
>  	  Enable Blu-ray input support.
>  	  Select this if you want to play back Blu-ray content.
> diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
> index 09342ea1f0..62463b731e 100644
> --- a/package/kodi/kodi.mk
> +++ b/package/kodi/kodi.mk
> @@ -45,7 +45,6 @@ KODI_DEPENDENCIES = \
>  	libfribidi \
>  	libplist \
>  	libpng \
> -	libudfread \
>  	lzo \
>  	openssl \
>  	pcre \
> @@ -388,6 +387,13 @@ else
>  KODI_CONF_OPTS += -DENABLE_PULSEAUDIO=OFF
>  endif
>  
> +ifeq ($(BR2_PACKAGE_LIBUDFREAD),y)
> +KODI_CONF_OPTS += -DENABLE_UDFREAD=ON
> +KODI_DEPENDENCIES += libudfread
> +else
> +KODI_CONF_OPTS += -DENABLE_UDFREAD=OFF
> +endif
> +
>  # Remove versioncheck addon, updating Kodi is done by building a new
>  # buildroot image.
>  KODI_ADDON_MANIFEST = $(TARGET_DIR)/usr/share/kodi/system/addon-manifest.xml
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 1%]

* Re: [PATCH RFC cmpxchg 8/8] riscv: Emulate one-byte and two-byte cmpxchg
@ 2024-05-11 20:44  0%         ` Leonardo Bras
  0 siblings, 0 replies; 200+ results
From: Leonardo Bras @ 2024-05-11 20:44 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Leonardo Bras, Guo Ren, linux-kernel, kernel-team, andi.shyti,
	andrzej.hajda, linux-riscv, palmer

On Sat, May 11, 2024 at 07:54:34AM -0700, Paul E. McKenney wrote:
> On Sat, May 11, 2024 at 02:50:13AM -0400, Guo Ren wrote:
> > On Thu, Apr 04, 2024 at 07:15:40AM -0700, Palmer Dabbelt wrote:
> > > On Mon, 01 Apr 2024 14:39:50 PDT (-0700), paulmck@kernel.org wrote:
> > > > Use the new cmpxchg_emu_u8() and cmpxchg_emu_u16() to emulate one-byte
> > > > and two-byte cmpxchg() on riscv.
> > > > 
> > > > [ paulmck: Apply kernel test robot feedback. ]
> > > 
> > > I'm not entirely following the thread, but sounds like there's going to be
> > > generic kernel users of this now?  Before we'd said "no" to the byte/half
> > > atomic emulation routines beacuse they weren't used, but if it's a generic
> > > thing then I'm find adding them.
> > > 
> > > There's a patch set over here
> > > <https://lore.kernel.org/all/20240103163203.72768-2-leobras@redhat.com/>
> > > that implements these more directly using LR/SC.  I was sort of on the fence
> > > about just taking it even with no direct users right now, as the byte/half
> > > atomic extension is working its way through the spec process so we'll have
> > > them for real soon.  I stopped right there for the last merge window,
> > > though, as I figured it was too late to be messing with the atomics...
> > > 
> > > So
> > > 
> > > Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
> > F.Y.I Leonardo Bras <leobras@redhat.com>

Hi Guo Ren, thanks for bringing it to my attention.

I am quite excited about the inclusion of my patchset on riscv/cmpxchg, and 
I hope it can be useful both to your qspinlock implementation and on Paul's 
RCU improvement.

> 
> I am carrying this in -rcu, but only for testing purposes, not for
> inclusion into mainline.  Not that I know of anyone testing -rcu on
> RISC-V, but still, I wouldn't want to do anything do discourage such
> testing.
> 
> The reason that this patch is no longer intended for inclusion is that it
> has been obsoleted by a patch that provides native support for one-byte
> and two-byte cmpxchg() operations.  Which is even better!  ;-)
> 
> 							Thanx, Paul

Thanks Paul!
Months ago I have reworked cmpxchg and added those 1-byte and 2-byte 
{cmp,}xchg asm implementations using lr/sc, as they would be useful to Guo 
Ren's qspinlock, and I am thankful that you provided another use case, 
because it provides more proof of it's usefulness.

Thanks!
Leo

> 
> > > if you guys want to take some sort of tree-wide change to make the byte/half
> > > stuff be required everywhere.  We'll eventually end up with arch routines
> > > for the extension, so at that point we might as well also have the more
> > > direct LR/SC flavors.
> > > 
> > > If you want I can go review/merge that RISC-V patch set and then it'll have
> > > time to bake for a shared tag you can pick up for all this stuff?  No rush
> > > on my end, just LMK.
> > > 
> > > > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > > > Cc: Andi Shyti <andi.shyti@linux.intel.com>
> > > > Cc: Andrzej Hajda <andrzej.hajda@intel.com>
> > > > Cc: <linux-riscv@lists.infradead.org>
> > > > ---
> > > >  arch/riscv/Kconfig               |  1 +
> > > >  arch/riscv/include/asm/cmpxchg.h | 25 +++++++++++++++++++++++++
> > > >  2 files changed, 26 insertions(+)
> > > > 
> > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> > > > index be09c8836d56b..4eaf40d0a52ec 100644
> > > > --- a/arch/riscv/Kconfig
> > > > +++ b/arch/riscv/Kconfig
> > > > @@ -44,6 +44,7 @@ config RISCV
> > > >  	select ARCH_HAS_UBSAN
> > > >  	select ARCH_HAS_VDSO_DATA
> > > >  	select ARCH_KEEP_MEMBLOCK if ACPI
> > > > +	select ARCH_NEED_CMPXCHG_1_2_EMU
> > > >  	select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
> > > >  	select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
> > > >  	select ARCH_STACKWALK
> > > > diff --git a/arch/riscv/include/asm/cmpxchg.h b/arch/riscv/include/asm/cmpxchg.h
> > > > index 2fee65cc84432..a5b377481785c 100644
> > > > --- a/arch/riscv/include/asm/cmpxchg.h
> > > > +++ b/arch/riscv/include/asm/cmpxchg.h
> > > > @@ -9,6 +9,7 @@
> > > >  #include <linux/bug.h>
> > > > 
> > > >  #include <asm/fence.h>
> > > > +#include <linux/cmpxchg-emu.h>
> > > > 
> > > >  #define __xchg_relaxed(ptr, new, size)					\
> > > >  ({									\
> > > > @@ -170,6 +171,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			"0:	lr.w %0, %2\n"				\
> > > > @@ -214,6 +221,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			"0:	lr.w %0, %2\n"				\
> > > > @@ -260,6 +273,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			RISCV_RELEASE_BARRIER				\
> > > > @@ -306,6 +325,12 @@
> > > >  	__typeof__(*(ptr)) __ret;					\
> > > >  	register unsigned int __rc;					\
> > > >  	switch (size) {							\
> > > > +	case 1:								\
> > > > +		__ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
> > > > +		break;							\
> > > > +	case 2:								\
> > > > +		break;							\
> > > > +		__ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
> > > >  	case 4:								\
> > > >  		__asm__ __volatile__ (					\
> > > >  			"0:	lr.w %0, %2\n"				\
> > > 
> 


^ permalink raw reply	[relevance 0%]

* [Buildroot] [git commit] package/kodi: fix libudfread dependency
@ 2024-05-11 20:40  4% Yann E. MORIN
  0 siblings, 0 replies; 200+ results
From: Yann E. MORIN @ 2024-05-11 20:40 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=76e473154ddf838f93829bd22485cca412c03d87
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Buildroot c61934611111cb3ea04604707052b1387bde5134 commit added a broken
dependency to libudfread. In fact libudfread is still an optional
dependency, just the configure options changes due to upstream
commit https://github.com/xbmc/xbmc/commit/5f9b9cfa26f274e381e92d73cfa33fb55582436e

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/kodi/Config.in | 1 -
 package/kodi/kodi.mk   | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/kodi/Config.in b/package/kodi/Config.in
index 0ec41785b1..1ba6932de9 100644
--- a/package/kodi/Config.in
+++ b/package/kodi/Config.in
@@ -166,7 +166,6 @@ config BR2_PACKAGE_KODI_EVENTCLIENTS
 config BR2_PACKAGE_KODI_LIBBLURAY
 	bool "blu-ray"
 	select BR2_PACKAGE_LIBBLURAY
-	select BR2_PACKAGE_LIBUDFREAD
 	help
 	  Enable Blu-ray input support.
 	  Select this if you want to play back Blu-ray content.
diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
index 09342ea1f0..62463b731e 100644
--- a/package/kodi/kodi.mk
+++ b/package/kodi/kodi.mk
@@ -45,7 +45,6 @@ KODI_DEPENDENCIES = \
 	libfribidi \
 	libplist \
 	libpng \
-	libudfread \
 	lzo \
 	openssl \
 	pcre \
@@ -388,6 +387,13 @@ else
 KODI_CONF_OPTS += -DENABLE_PULSEAUDIO=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBUDFREAD),y)
+KODI_CONF_OPTS += -DENABLE_UDFREAD=ON
+KODI_DEPENDENCIES += libudfread
+else
+KODI_CONF_OPTS += -DENABLE_UDFREAD=OFF
+endif
+
 # Remove versioncheck addon, updating Kodi is done by building a new
 # buildroot image.
 KODI_ADDON_MANIFEST = $(TARGET_DIR)/usr/share/kodi/system/addon-manifest.xml
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 4%]

* [PATCH] Fixes rtl8139 driver for old kernels.
@ 2024-05-11 20:15  1% Hans
  0 siblings, 0 replies; 200+ results
From: Hans @ 2024-05-11 20:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: jasowang, Hans

Old linux kernel rtl8139 drivers (ex. debian 2.1) uses outb to set the rx
mode for RxConfig. Unfortunatelly qemu does not support outb for RxConfig.

Signed-off-by: Hans <sungdgdhtryrt@gmail.com>
---
 hw/net/rtl8139.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 897c86ec41..e6244cfd7f 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -2738,7 +2738,10 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val)
             }
 
             break;
-
+        case RxConfig:
+            DPRINTF("RxConfig write(b) val=0x%02x\n", val);
+            rtl8139_RxConfig_write(s, (rtl8139_RxConfig_read(s) & 0xFFFFFF00) | val );
+            break;
         default:
             DPRINTF("not implemented write(b) addr=0x%x val=0x%02x\n", addr,
                 val);
-- 
2.34.1



^ permalink raw reply related	[relevance 1%]

* Re: [PATCH 2/2] diff: fix --exit-code with external diff
  @ 2024-05-11 20:32  1%           ` René Scharfe
  0 siblings, 0 replies; 200+ results
From: René Scharfe @ 2024-05-11 20:32 UTC (permalink / raw)
  To: phillip.wood, German Lashevich, git; +Cc: Junio C Hamano

Am 08.05.24 um 17:25 schrieb phillip.wood123@gmail.com:
> Hi René
>
> On 06/05/2024 19:23, René Scharfe wrote:
>> Am 05.05.24 um 17:25 schrieb Phillip Wood:
>>> Merge strategies are expected to exit 0 on success, 1 when there are
>>> conflicts and another non-zero value for other errors - it would be
>>> nice to do something similar here where 1 means "there were
>>> differences" but it is probably too late to do that without a config
>>> value to indicate that we should trust the exit code.
>> Right, such a diff command protocol v2 would not need to pipe the
>> output through an inspection loop.  Sounds like a good idea.  It's
>> unfortunate that it would increase the configuration surface, which is
>> not in an acute need to expand.  We could advertise the new option when
>> dying due to the unsupported combination of --exit-code and external
>> diff, but that's in equal parts helpful and obnoxious, I feel.
>
> Yes, diff dying would be annoying but the message would be useful.

Having poked at it a bit more, I wonder if we need to add some further
nuance/trick to avoid having to reject certain combinations of options.

Currently external diffs can't signal content equality.  That doesn't
matter for trivial equality (where content and mode of the two files
match), as this case is always handled by the diff machinery already.
Only lossy comparisons (e.g. ignoring whitespace) even have the need to
signal equality.

If we (continue to) assume that external diffs are lossless then we
don't need to change the code, just document that assumption.  And add a
way to specify lossy external diffs that can signal whether they found
interesting differences, to address the originally reported shortcoming.

Is there an official term for comparisons that ignore some details?
"Lossy" is rather used for compression.  Filtered, partial, selective?

> Thinking about the external diff and some of the other diff options I
> wonder what we should do when options like "--quiet" and
> "--name-only" are combined with an external diff (I haven't checked
> the current behavior). If we introduced a diff command protocol v2 we
> could include a way to pass through "--quiet" though maybe just
> redirecting the stdout of the external command to /dev/null and using
> the exit code would be sufficient.

The current code uses shortcuts like that.  For lossy external diffs we
need to turn (some of) them off.  Lots of possible combinations with
special handling -- needs lots of tests for reasonable coverage. :-/

> P.S. I haven't forgotten about our unit-test discussion but I'm
> afraid it will probably be the middle of next month before I have
> time to reply.
No worries; reminds me to polish some unit-test patches, though.  I
get distracted a lot these days..

René

^ permalink raw reply	[relevance 1%]

* [openeuler:OLK-6.6 9538/9601] arch/arm64/kvm/vgic/vgic-mmio.c:266:38: warning: variable 'is_pending' set but not used
@ 2024-05-11 20:31  1% kernel test robot
  0 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 20:31 UTC (permalink / raw)
  To: kernel, Hao Chen; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   15bef328224e70041aba4aaa6b23977efba191a9
commit: cb0003ae0500bb69eefa2275722d08bc39a0f157 [9538/9601] irqchip: gicv3: Add workaround for hip09 erratum 162200806
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240512/202405120422.ZROC7rNv-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120422.ZROC7rNv-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120422.ZROC7rNv-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/arm64/kvm/vgic/vgic-mmio.c: In function '__read_pending':
>> arch/arm64/kvm/vgic/vgic-mmio.c:266:38: warning: variable 'is_pending' set but not used [-Wunused-but-set-variable]
     266 |                                 bool is_pending;
         |                                      ^~~~~~~~~~


vim +/is_pending +266 arch/arm64/kvm/vgic/vgic-mmio.c

   230	
   231	#define VIRTUAL_SGI_PENDING_OFFSET	0x3F0
   232	static unsigned long __read_pending(struct kvm_vcpu *vcpu,
   233					    gpa_t addr, unsigned int len,
   234					    bool is_user)
   235	{
   236		u32 intid = VGIC_ADDR_TO_INTID(addr, 1);
   237		u32 value = 0;
   238		int i;
   239		struct its_vpe *vpe = &vcpu->arch.vgic_cpu.vgic_v3.its_vpe;
   240	
   241		/* Loop over all IRQs affected by this read */
   242		for (i = 0; i < len * 8; i++) {
   243			struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i);
   244			unsigned long flags;
   245			bool val;
   246	
   247			/*
   248			 * When used from userspace with a GICv3 model:
   249			 *
   250			 * Pending state of interrupt is latched in pending_latch
   251			 * variable.  Userspace will save and restore pending state
   252			 * and line_level separately.
   253			 * Refer to Documentation/virt/kvm/devices/arm-vgic-v3.rst
   254			 * for handling of ISPENDR and ICPENDR.
   255			 */
   256			raw_spin_lock_irqsave(&irq->irq_lock, flags);
   257			if (vgic_direct_sgi_or_ppi(irq)) {
   258				int err;
   259	
   260				if (irq->hw && vgic_irq_is_sgi(irq->intid) &&
   261				    (kvm_vgic_global_state.flags &
   262				     FLAGS_WORKAROUND_HIP09_ERRATUM_162200806)) {
   263					void *va;
   264					u8 *ptr;
   265					int mask;
 > 266					bool is_pending;
   267	
   268					mask = BIT(irq->intid % BITS_PER_BYTE);
   269					va = page_address(vpe->vpt_page);
   270					ptr = va + VIRTUAL_SGI_PENDING_OFFSET +
   271					      irq->intid / BITS_PER_BYTE;
   272					is_pending = *ptr & mask;
   273				}
   274	
   275				val = false;
   276				err = irq_get_irqchip_state(irq->host_irq,
   277							    IRQCHIP_STATE_PENDING,
   278							    &val);
   279				WARN_RATELIMIT(err, "IRQ %d", irq->host_irq);
   280			} else if (!is_user && vgic_irq_is_mapped_level(irq)) {
   281				val = vgic_get_phys_line_level(irq);
   282			} else {
   283				switch (vcpu->kvm->arch.vgic.vgic_model) {
   284				case KVM_DEV_TYPE_ARM_VGIC_V3:
   285					if (is_user) {
   286						val = irq->pending_latch;
   287						break;
   288					}
   289					fallthrough;
   290				default:
   291					val = irq_is_pending(irq);
   292					break;
   293				}
   294			}
   295	
   296			value |= ((u32)val << i);
   297			raw_spin_unlock_irqrestore(&irq->irq_lock, flags);
   298	
   299			vgic_put_irq(vcpu->kvm, irq);
   300		}
   301	
   302		return value;
   303	}
   304	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* [openeuler:openEuler-1.0-LTS 22374/22416] drivers/gpu/drm/nouveau/nvkm/core/object.c:37:17: warning: ISO C90 forbids mixed declarations and code
@ 2024-05-11 20:31  1% kernel test robot
  0 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 20:31 UTC (permalink / raw)
  To: kernel, dinglongwei; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head:   8d055501b2f0dc4e29197de45eabdd21f73fa507
commit: 901dbb48d8a4f60af427f1ec67ac1247ff219f39 [22374/22416] nouveau: lock the client object tree.
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240512/202405120429.wVDB0LUK-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120429.wVDB0LUK-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120429.wVDB0LUK-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/nouveau/nvkm/core/object.c: In function 'nvkm_object_search':
>> drivers/gpu/drm/nouveau/nvkm/core/object.c:37:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      37 |                 struct rb_node *node = client->objroot.rb_node;
         |                 ^~~~~~
   In file included from drivers/gpu/drm/nouveau/nvkm/core/object.c:25:
   drivers/gpu/drm/nouveau/nvkm/core/object.c: In function 'nvkm_object_fini':
   drivers/gpu/drm/nouveau/include/nvkm/core/client.h:41:28: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
      41 |         if (_client->debug >= NV_DBG_##l)                                      \
         |                            ^~
   drivers/gpu/drm/nouveau/include/nvkm/core/client.h:45:30: note: in expansion of macro 'nvif_printk'
      45 | #define nvif_fatal(o,f,a...) nvif_printk((o), FATAL, CRIT, f, ##a)
         |                              ^~~~~~~~~~~
   drivers/gpu/drm/nouveau/nvkm/core/object.c:226:25: note: in expansion of macro 'nvif_fatal'
     226 |                         nvif_fatal(object, "failed to restart, %d\n", rret);
         |                         ^~~~~~~~~~


vim +37 drivers/gpu/drm/nouveau/nvkm/core/object.c

9274f4a9ba7e70 drivers/gpu/drm/nouveau/core/core/object.c Ben Skeggs  2012-07-06  27  
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  28  struct nvkm_object *
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  29  nvkm_object_search(struct nvkm_client *client, u64 handle,
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  30  		   const struct nvkm_object_func *func)
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  31  {
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  32  	struct nvkm_object *object;
901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09  33  	unsigned long flags;
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  34  
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  35  	if (handle) {
901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09  36  		spin_lock_irqsave(&client->obj_lock, flags);
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22 @37  		struct rb_node *node = client->objroot.rb_node;
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  38  		while (node) {
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  39  			object = rb_entry(node, typeof(*object), node);
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  40  			if (handle < object->object)
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  41  				node = node->rb_left;
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  42  			else
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  43  			if (handle > object->object)
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  44  				node = node->rb_right;
901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09  45  			else {
901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09  46  				spin_unlock_irqrestore(&client->obj_lock, flags);
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  47  				goto done;
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  48  			}
901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09  49  		}
901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09  50  		spin_unlock_irqrestore(&client->obj_lock, flags);
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  51  		return ERR_PTR(-ENOENT);
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  52  	} else {
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  53  		object = &client->object;
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  54  	}
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  55  
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  56  done:
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  57  	if (unlikely(func && object->func != func))
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  58  		return ERR_PTR(-EINVAL);
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  59  	return object;
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  60  }
110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs  2016-12-22  61  

:::::: The code at line 37 was first introduced by commit
:::::: 110cccff955313c66dccd2817f62368f106d9bf2 drm/nouveau/core/object: support lookup of specific object types

:::::: TO: Ben Skeggs <bskeggs@redhat.com>
:::::: CC: Ben Skeggs <bskeggs@redhat.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* Re: [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  2024-05-11 19:55  1%       ` Linus Torvalds
@ 2024-05-11 20:31  1%         ` Al Viro
  2024-05-11 21:17  1%           ` Al Viro
  0 siblings, 1 reply; 200+ results
From: Al Viro @ 2024-05-11 20:31 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, walters,
	wangkai86, willy

On Sat, May 11, 2024 at 12:55:29PM -0700, Linus Torvalds wrote:
> On Sat, 11 May 2024 at 12:28, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > On Sat, May 11, 2024 at 11:42:34AM -0700, Linus Torvalds wrote:
> > >
> > > And that outside lock is the much more important one, I bet.
> >
> > ... and _that_ is where taking d_delete outside of the lock might
> > take an unpleasant analysis of a lot of code.
> 
> Hmm. It really shouldn't matter. There can only be negative children
> of the now deleted directory, so there are no actual effects on
> inodes.
> 
> It only affects the d_child list, which is protected by d_lock (and
> can be modified outside of the inode lock anyway due to memory
> pressure).
> 
> What am I missing?

fsnotify and related fun, basically.  I'll need to redo the analysis,
but IIRC there had been places where correctness had been guaranteed
by the fact that this had been serialized by the lock on parent.

No idea how easy would it be to adapt to that change; I'll check,
but it'll take a few days, I'm afraid.

^ permalink raw reply	[relevance 1%]

* Re: [RFC PATCH 1/1] kvm: Note an RCU quiescent state on guest exit
  @ 2024-05-11 20:31  0%   ` Leonardo Bras
  0 siblings, 0 replies; 200+ results
From: Leonardo Bras @ 2024-05-11 20:31 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Leonardo Bras, Frederic Weisbecker, Paolo Bonzini,
	Sean Christopherson, Marcelo Tosatti, linux-kernel, kvm

On Sat, May 11, 2024 at 07:55:55AM -0700, Paul E. McKenney wrote:
> On Fri, May 10, 2024 at 11:05:56PM -0300, Leonardo Bras wrote:
> > As of today, KVM notes a quiescent state only in guest entry, which is good
> > as it avoids the guest being interrupted for current RCU operations.
> > 
> > While the guest vcpu runs, it can be interrupted by a timer IRQ that will
> > check for any RCU operations waiting for this CPU. In case there are any of
> > such, it invokes rcu_core() in order to sched-out the current thread and
> > note a quiescent state.
> > 
> > This occasional schedule work will introduce tens of microsseconds of
> > latency, which is really bad for vcpus running latency-sensitive
> > applications, such as real-time workloads.
> > 
> > So, note a quiescent state in guest exit, so the interrupted guests is able
> > to deal with any pending RCU operations before being required to invoke
> > rcu_core(), and thus avoid the overhead of related scheduler work.
> > 
> > Signed-off-by: Leonardo Bras <leobras@redhat.com>
> 
> Acked-by: Paul E. McKenney <paulmck@kernel.org>

Thanks!
Leo

> 
> > ---
> > 
> > ps: A patch fixing this same issue was discussed in this thread:
> > https://lore.kernel.org/all/20240328171949.743211-1-leobras@redhat.com/
> > 
> > Also, this can be paired with a new RCU option (rcutree.nocb_patience_delay)
> > to avoid having invoke_rcu() being called on grace-periods starting between
> > guest exit and the timer IRQ. This RCU option is being discussed in a
> > sub-thread of this message:
> > https://lore.kernel.org/all/5fd66909-1250-4a91-aa71-93cb36ed4ad5@paulmck-laptop/
> > 
> > 
> >  include/linux/context_tracking.h |  6 ++++--
> >  include/linux/kvm_host.h         | 10 +++++++++-
> >  2 files changed, 13 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h
> > index 6e76b9dba00e..8a78fabeafc3 100644
> > --- a/include/linux/context_tracking.h
> > +++ b/include/linux/context_tracking.h
> > @@ -73,39 +73,41 @@ static inline void exception_exit(enum ctx_state prev_ctx)
> >  }
> >  
> >  static __always_inline bool context_tracking_guest_enter(void)
> >  {
> >  	if (context_tracking_enabled())
> >  		__ct_user_enter(CONTEXT_GUEST);
> >  
> >  	return context_tracking_enabled_this_cpu();
> >  }
> >  
> > -static __always_inline void context_tracking_guest_exit(void)
> > +static __always_inline bool context_tracking_guest_exit(void)
> >  {
> >  	if (context_tracking_enabled())
> >  		__ct_user_exit(CONTEXT_GUEST);
> > +
> > +	return context_tracking_enabled_this_cpu();
> >  }
> >  
> >  #define CT_WARN_ON(cond) WARN_ON(context_tracking_enabled() && (cond))
> >  
> >  #else
> >  static inline void user_enter(void) { }
> >  static inline void user_exit(void) { }
> >  static inline void user_enter_irqoff(void) { }
> >  static inline void user_exit_irqoff(void) { }
> >  static inline int exception_enter(void) { return 0; }
> >  static inline void exception_exit(enum ctx_state prev_ctx) { }
> >  static inline int ct_state(void) { return -1; }
> >  static inline int __ct_state(void) { return -1; }
> >  static __always_inline bool context_tracking_guest_enter(void) { return false; }
> > -static __always_inline void context_tracking_guest_exit(void) { }
> > +static __always_inline bool context_tracking_guest_exit(void) { return false; }
> >  #define CT_WARN_ON(cond) do { } while (0)
> >  #endif /* !CONFIG_CONTEXT_TRACKING_USER */
> >  
> >  #ifdef CONFIG_CONTEXT_TRACKING_USER_FORCE
> >  extern void context_tracking_init(void);
> >  #else
> >  static inline void context_tracking_init(void) { }
> >  #endif /* CONFIG_CONTEXT_TRACKING_USER_FORCE */
> >  
> >  #ifdef CONFIG_CONTEXT_TRACKING_IDLE
> > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> > index 48f31dcd318a..e37724c44843 100644
> > --- a/include/linux/kvm_host.h
> > +++ b/include/linux/kvm_host.h
> > @@ -480,21 +480,29 @@ static __always_inline void guest_state_enter_irqoff(void)
> >  /*
> >   * Exit guest context and exit an RCU extended quiescent state.
> >   *
> >   * Between guest_context_enter_irqoff() and guest_context_exit_irqoff() it is
> >   * unsafe to use any code which may directly or indirectly use RCU, tracing
> >   * (including IRQ flag tracing), or lockdep. All code in this period must be
> >   * non-instrumentable.
> >   */
> >  static __always_inline void guest_context_exit_irqoff(void)
> >  {
> > -	context_tracking_guest_exit();
> > +	/*
> > +	 * Guest mode is treated as a quiescent state, see
> > +	 * guest_context_enter_irqoff() for more details.
> > +	 */
> > +	if (!context_tracking_guest_exit()) {
> > +		instrumentation_begin();
> > +		rcu_virt_note_context_switch();
> > +		instrumentation_end();
> > +	}
> >  }
> >  
> >  /*
> >   * Stop accounting time towards a guest.
> >   * Must be called after exiting guest context.
> >   */
> >  static __always_inline void guest_timing_exit_irqoff(void)
> >  {
> >  	instrumentation_begin();
> >  	/* Flush the guest cputime we spent on the guest */
> > -- 
> > 2.45.0
> > 
> 


^ permalink raw reply	[relevance 0%]

* [PATCH] mips64el-softmmu: Enable MTTCG
@ 2024-05-11 20:26  1% Jiaxun Yang
  0 siblings, 0 replies; 200+ results
From: Jiaxun Yang @ 2024-05-11 20:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Jiaxun Yang

MTTCG was disabled in a092a9554771 ("configure: disable MTTCG
for MIPS guests") due to test case instability.

I was able to reproduce this issue with in latest QEMU and look
into reason behind that.

What actually happend is kernel's CP0 timer synchronisation
mechanism assumed a consistent latency in memory access between
cores, which TCG can't guarantee. Thus there is a huge drift in
count value between cores, and in early kernel versions CP0 timer
is always used as sched_clock.

sched_clock drift back on some cores triggered RCU watchdog in
some extreme cases.

This can be resolved by setting clocksource to MIPS, which allows
clocksource to drift together with sched_clock. However this will
leed to other problems after boot.

Another option would beupdating kernel to later version, which
will use GIC as sched_clock.

In non-MTTCG build, the execution is slow enough so kernel won't
observe back drifts.

Test results:

With clocksource=MIPS
```
 ~/tmp/retry/retry.py -n 100 -c -- ./qemu-system-mips64el \
    -display none -vga none -serial mon:stdio \
    -machine malta -kernel ./vmlinux-4.7.0-rc1.I6400 \
    -cpu I6400 -smp 8 -vga std \
    -append "printk.time=0 clocksource=MIPS console=tty0 console=ttyS0 panic=-1" \
    --no-reboot

100, 0, PASS, 5.258126, 100, 100, -
Results summary:
0: 100 times (100.00%), avg time 6.508 (55.53 varience/7.45 deviation)
Ran command 100 times, 100 passes
```

With linux-next:
```
 ~/tmp/retry/retry.py -n 100 -c -- ./qemu-system-mips64el \
    -display none -vga none -serial mon:stdio \
    -machine malta -kernel ~/linux-next/vmlinux \
    -cpu I6400 -smp 8 -vga std \
    -append "printk.time=0 console=tty0 console=ttyS0 panic=-1" \
    --no-reboot

100, 0, PASS, 4.507921, 100, 100, -
Results summary:
0: 100 times (100.00%), avg time 4.233 (0.04 varience/0.21 deviation)
Ran command 100 times, 100 passes
```

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
I'll leave the test case alone as it's already marked as QEMU_TEST_FLAKY_TESTS
---
 configs/targets/mips64el-softmmu.mak | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/targets/mips64el-softmmu.mak b/configs/targets/mips64el-softmmu.mak
index 8d9ab3ddc4b1..199b1d909a7d 100644
--- a/configs/targets/mips64el-softmmu.mak
+++ b/configs/targets/mips64el-softmmu.mak
@@ -1,3 +1,4 @@
 TARGET_ARCH=mips64
 TARGET_BASE_ARCH=mips
+TARGET_SUPPORTS_MTTCG=y
 TARGET_NEED_FDT=y

---
base-commit: 248f6f62df073a3b4158fd0093863ab885feabb5
change-id: 20240511-mips_mttcg-47a6b19074b3

Best regards,
-- 
Jiaxun Yang <jiaxun.yang@flygoat.com>



^ permalink raw reply related	[relevance 1%]

* Re: [PATCH v8 6/6] drm/xe/guc: Plumb GuC-capture into dev coredump
  @ 2024-05-11 20:25  1%   ` Teres Alexis, Alan Previn
  0 siblings, 0 replies; 200+ results
From: Teres Alexis, Alan Previn @ 2024-05-11 20:25 UTC (permalink / raw)
  To: Dong, Zhanjun, intel-xe

On Mon, 2024-05-06 at 18:47 -0700, Zhanjun Dong wrote:
> Add xe_hw_engine_snapshot_from_capture to take snapshot from capture
> node list.
alan: maybe better to describe this more accurately such as
"Add xe_hw_engine_snapshot_from_capture to find the matching
guc-error-capture node that was extraced before hand, and
take a snapshot of the registers of that node"


> Add data struct to map register to a snapshot field, although all
> field is mapped now, which means the offset could be optimized out,
> while in the future, depends on system configuration, the field might
> not be consecutive, keep the offset is reserved for future.
alan: this description needs more clarity. it makes absolute sense only
AFTER understanding the code which i feel isn't good enough for the
purpose of a commit message. If i may offer a suggestion ->

"Repurpose 'regs' substruct from 'struct xe_hw_engine_snapshot'
giving its own type along with additional helper structs
(__reg_map_descr / __reg_map_descr_64) for the purpose of enabling
an immediate lookup of a specific register store within regs struct
based on its location. Although one could argue this is not needed
because the current register mmio-address-offsets are sequential
within the hw mmio-bar, this won't scale for class-registers
or global-registers that are spaced out"

alan:snip
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_capture.c b/drivers/gpu/drm/xe/xe_guc_capture.c
> index 42aae4d99514..959d318f8a6f 100644
> --- a/drivers/gpu/drm/xe/xe_guc_capture.c
> +++ b/drivers/gpu/drm/xe/xe_guc_capture.c
> @@ -37,28 +37,33 @@
>   *       from the engine-mmio-base
>   */
>  #define COMMON_XELP_BASE_GLOBAL \
> -       { FORCEWAKE_GT,             0,      0, "FORCEWAKE" }
> +       { FORCEWAKE_GT,                         0,      0}
alan: took me a while to realize we actually dont even seem to be
printing out FORCEWAKE_GT register value (via devcoredump) nor any
global or class regisers from the xe_guc_capture lists.
See my additional comments with details further down at function
'guc_capture_find_ecode'
alan:snip 
>  #define COMMON_BASE_ENGINE_INSTANCE \
> -       { RING_ESR(0),              0,      0, "ESR" }, \
> -       { RING_EMR(0),              0,      0, "EMR" }, \
> -       { RING_EIR(0),              0,      0, "EIR" }, \
alan:snip
> +       { RING_ESR(0),                          0,      0}, \
> +       { RING_EMR(0),                          0,      0}, \
> +       { RING_EIR(0),                          0,      0}, \
alan:snip
>  /* XE_LP Global */
>  static const struct __guc_mmio_reg_descr xe_lp_global_regs[] = {
> @@ -207,7 +212,6 @@ static void __fill_ext_reg(struct __guc_mmio_reg_descr *ext,
>         ext->reg = XE_REG(extlist->reg.__reg.addr);
>         ext->flags = FIELD_PREP(GUC_REGSET_STEERING_GROUP, slice_id);
>         ext->flags |= FIELD_PREP(GUC_REGSET_STEERING_INSTANCE, subslice_id);
> -       ext->regname = extlist->name;
alan: as per offline conversation, we are never using "regname" anywhere
in this series (unlike i915) because regs structure in xe_hw_engine.c
provides that. Here we are rightfully removing that redundancy.
That said, why dont we just not even introduce regname in Patch1 to
begin with (which gets initialized, unused and then thrown away
in this patch, which i think breaks linux kernel patching rules?).
alan:snip

> +static void
> +guc_capture_free_list(struct drm_device *drm, struct list_head  *list)
> +{
> +       struct __guc_capture_parsed_output *n, *ntmp;
> +
> +       list_for_each_entry_safe(n, ntmp, list, link)
> +               guc_capture_delete_one_node(drm, n);
alan: i think we are not realizing the proper usage of the pre-allocated
cachelist of nodes. in the big picture:
1. At init, create a pool of nodes for use - we keep this in "cachelist".
   (each node being big enough to hold a capture-snapshot from guc)
2. At g2h-capture-notify time, we extract guc reported capture-snapshots
   from the guc-capture ring buffer. For each snapshot we extract,
   we grab a free node from "cachelist" and then move it into "outlist".
3. Later during the devcoredump generation, we find the mathing node from
   "outlist" and copy all the register values into xe_hw_engine's
   snapshot-regs to sent to drm_printer.
4. So at this point, that node can be discarded, however,
   above guc_capture_free_list is calling guc_capture_delete_one_node which
   frees the allocation. This is wrong, instead what we should be removing
   the node from the "outlist" and putting it back into the "cachelist" with
   a memset. Else we'll quickly find ourselves running out of pre-allocated
   node list defeating it's purpose (i.e. finding ourselves having to
   allocate memory in mid reset). See where "guc_capture_add_node_to_cachelist"
   is called from in i915 for what i mean. (of course, as per prior patch
   comment, we do need to verify with xe's core-mm folks if we even still
   have the same requirement for xe on not doing mem allocs mid-reset).
alan:snip

> @@ -959,6 +960,7 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
>         struct xe_sched_job *tmp_job;
>         struct xe_exec_queue *q = job->q;
>         struct xe_gpu_scheduler *sched = &q->guc->sched;
> +       struct xe_gt *gt = q->gt;
alan: why this unrelated change above. lets just focus on guc error capture,
we can do cleanups like this in a standalone patch - assuming its even
required.
alan:snip

> +struct __reg_map_descr capture_engine_reg[] = {
> +       {offsetof(struct snap_shot_regs, ring_hwstam),  "HWSTAM",       RING_HWSTAM(0)  },
> +       {offsetof(struct snap_shot_regs, ring_hws_pga), "RING_HWS_PGA", RING_HWS_PGA(0) },
> +       {offsetof(struct snap_shot_regs, ring_start),   "RING_START",   RING_START(0)   },
> +       {offsetof(struct snap_shot_regs, ring_head),    "RING_HEAD",    RING_HEAD(0)    },
> +       {offsetof(struct snap_shot_regs, ring_tail),    "RING_TAIL",    RING_TAIL(0)    },
> +       {offsetof(struct snap_shot_regs, ring_ctl),     "RING_CTL",     RING_CTL(0)     },
> +       {offsetof(struct snap_shot_regs, ring_mi_mode), "RING_MI_MODE", RING_MI_MODE(0) },
> +       {offsetof(struct snap_shot_regs, ring_mode),    "RING_MODE",    RING_MODE(0)    },
> +       {offsetof(struct snap_shot_regs, ring_imr),     "RING_IMR",     RING_IMR(0)     },
> +       {offsetof(struct snap_shot_regs, ring_esr),     "RING_ESR",     RING_ESR(0)     },
> +       {offsetof(struct snap_shot_regs, ring_emr),     "RING_EMR",     RING_EMR(0)     },
> +       {offsetof(struct snap_shot_regs, ring_eir),     "RING_EIR",     RING_EIR(0)     },
> +       {offsetof(struct snap_shot_regs, ipehr),        "IPEHR",        RING_IPEHR(0)   },
> +       {offsetof(struct snap_shot_regs, rcu_mode),     "RCU_MODE",     RCU_MODE        },
> +};
alan: so as per the lengthly offline conversation we had, we really dont like
the idea of keeping a separate list in snap_shot_regs in xe_hw_engine for the
drm_printer use along with another list in guc-error-capture. Where the former
is a catch all bucket for all registers for any given capture case on any
engine while the latter is organized differently as list of lists with global,
class and instance groupings per gen.

However, considering we a much more critical need to address now, let's capture
a separate offline JIRA task for a future patch to resolve the "flat-catch-all"
attribute of snap_shot_regs vs the "organized category of lists" in guc-error-
capture so we could enable sharing the same static table instances across them.

For now, lets solve the immediate problem: GuC is the default submission
mechanism on xe and yet we dont have a coherent way to report hw register dumps
during an engine reset triggered by GuC.


> +static void cp_reg_to_snapshot(u32 offset, u32 value, struct snap_shot_regs *regs)
> +{
> +       int i;
> +
> +       for (i = 0; i < ARRAY_SIZE(capture_engine_reg); i++)
> +               if (offset == capture_engine_reg[i].reg.addr) {
> +                       u32 *field = (u32 *)((uintptr_t)regs + capture_engine_reg[i].dst_offset);
> +                       *field = value;
> +                       return;
> +               }
alan:snip
> +}
> +
> +static void guc_capture_find_ecode(struct __guc_capture_parsed_output *node,
> +                                  struct xe_hw_engine_snapshot *snapshot)
> +{
alan:snip
> +       reginfo = node->reginfo + GUC_CAPTURE_LIST_TYPE_ENGINE_INSTANCE;
alan: so it looks like we are only ever calling cp_reg_to_snapshot for
"LIST_TYPE_ENGINE_INSTANCE", However, as per our offline conversation, this is
incorrect... we should be looking for all register type lists.
> +       regs = reginfo->regs;
> +       for (i = 0; i < reginfo->num_regs; i++)
> +               cp_reg_to_snapshot(regs[i].offset, regs[i].value, &snapshot->reg);
> +}
alan:snip
> +void
> +xe_hw_engine_snapshot_from_capture(struct xe_hw_engine *hwe, struct xe_hw_engine_snapshot *snapshot)
> +{
> +       struct xe_gt *gt = hwe->gt;
> +       struct xe_guc *guc = &gt->uc.guc;
> +       struct __guc_capture_parsed_output *n, *ntmp;
> +
> +       if (list_empty(&guc->capture->outlist))
> +               return xe_hw_engine_snapshot_from_engine(hwe, snapshot);
alan: This looks partially wrong, we cannot be manually snapshottting engine registers after the
fact when we ARE actually using guc submission with guc error capture. I think we
can check if (the recently merged) "wedgedmode is >=2" (i.e. GuC will NOT initiate
engine resets) and if so, then only do the manual xe_hw_engine_snapshot_from_engine.
else if 'list is empty' AND 'xe->wedged.mode < 2', then print a warning. This might
indicate we have a bug in guc-err-capture extraction code of we have leaked away
our preallocated cachelist of nodes. Btw, if you added above code path because you
DID actually see us running out of preallocated nodes, then i have already commented
above at guc_capture_free_list that you are not properly using the "cachelist<->outlist"
concept properly which would explain why we ran out.
> +
> +       /*
> +        * Look for a matching GuC reported error capture node from
> +        * the internal output link-list based on engine class and instance.
> +        */
> +       list_for_each_entry_safe(n, ntmp, &guc->capture->outlist, link) {
> +               u32 hwe_guc_class = xe_engine_class_to_guc_class(hwe->class);
> +
> +               if (n->eng_class == hwe_guc_class && n->eng_inst == hwe->instance) {
alan: just matching engine class and instance alone? i don't think that is sufficient,
we should also be matching against the LRCA and guc-id to be accurate do we dont end up
with mixing capture snapshots across different back-to-back captures that came
from different contexts.
> +                       guc_capture_find_ecode(n, snapshot);
> +                       list_del(&n->link);
> +                       return;
> +               }
> +       }
> +}

alan: i must say that from a code readibility perspecte the function names dont seem
to tally with what its doing. 
Current flow in this patch:

xe_hw_engine_snapshot_from_capture (find matching node from outlist)
   |---> guc_capture_find_ecode (loop through capture reglist)
           |---> cp_reg_to_snapshot (copy reg-value into snapshot_regs position).

so maybe something where the name matches the code inside it:
xe_hw_engine_find_and copy_guc_capture_snapshot (find matching node from outlist)
   |---> guc_capture_parse_reglist (loop through capture reglist)
           |---> cp_reg_to_snapshot (copy reg-value into snapshot_regs position).

alan: additionally, above code locations means that xe_hw_engines.c
needs to be aware of guc-capture internals (like what outlist is and
what its node contents are). However, I'm not sure if that is the
allowed practice in xe's inter-subsystem access design/guidance. I would
have thought its better to keep guc-capture self-contained and move above
3 functions into guc-capture exporting only first function. This would
mean guc-capture needs to be aware of struct snapshot usage. I'm
unfamiliar with the design rules so lets take this offline with others.

alan:snip
> +void
> +xe_hw_engine_snapshot_from_engine(struct xe_hw_engine *hwe, struct xe_hw_engine_snapshot *snapshot)
> +{
> +       int i;
> +
> +       /* Skip RCU_MODE, the last print */
> +       for (i = 0; i < ARRAY_SIZE(capture_engine_reg) - 1; i++) {
> +               u32 *field = (u32 *)((uintptr_t)&snapshot->reg + capture_engine_reg[i].dst_offset);
> +               *field = hw_engine_mmio_read32(hwe, capture_engine_reg[i].reg);
> +       }
> +       for (i = 0; i < ARRAY_SIZE(capture_engine_reg_64); i++) {
> +               u64 *field = (u64 *)((uintptr_t)&snapshot->reg +
> +                                     capture_engine_reg_64[i].dst_offset);
> +               *field = hw_engine_mmio_read32(hwe, capture_engine_reg_64[i].reg_lo) |
> +                        (u64)hw_engine_mmio_read32(hwe, capture_engine_reg_64[i].reg_hi) << 32;
> +       }
> +       if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE)
> +               snapshot->reg.rcu_mode = xe_mmio_read32(hwe->gt, RCU_MODE);
alan: this register effects both compute and render class so might need to fix this.
> +
> +       xe_hw_engine_snapshot_instdone_capture(hwe, snapshot);
> +}
> +

alan:snip
> @@ -990,29 +1117,25 @@ void xe_hw_engine_snapshot_print(struct xe_hw_engine_snapshot *snapshot,
>                    snapshot->logical_instance);
>         drm_printf(p, "\tForcewake: domain 0x%x, ref %d\n",
>                    snapshot->forcewake.domain, snapshot->forcewake.ref);
> 

> +       for (i = 0;
> +            /* Skip RCU_MODE, will be processed later */
> +            i < ARRAY_SIZE(capture_engine_reg) - 1;
> +            i++) {
> +               u32 *field = (u32 *)((uintptr_t)&snapshot->reg + capture_engine_reg[i].dst_offset);
> +
> +               drm_printf(p, "\t%s: 0x%08x\n", capture_engine_reg[i].regname, *field);
> +       }
> +
> +       for (i = 0; i < ARRAY_SIZE(capture_engine_reg_64); i++) {
> +               u64 *field = (u64 *)((uintptr_t)&snapshot->reg +
> +                                    capture_engine_reg_64[i].dst_offset);
> +
> +               drm_printf(p, "\t%s: 0x%016llx\n", capture_engine_reg_64[i].regname, *field);
> +       }
>         xe_hw_engine_snapshot_instdone_print(snapshot, p);
>  
> +       /* Last RCU_MODE print */
alan: as mentioned in my other comment in this patch (and as per
offline converation) i feel like rcu mode really should also be
captured by guc. But i also realize now that maybe reading this
register directly is okay if this register never has any status bits
that changes depending on workload and can never change at runtime ...
OR... if GUC doesnt allow capturing (which i doubt).
Let me know if i got this wrong.

>         if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE)
alan: based on the current hw spec, this register has shared impact
across both CCS and RCS engine classes so this check should really
be fore "if render or compute class"
>                 drm_printf(p, "\tRCU_MODE: 0x%08x\n",
>                            snapshot->reg.rcu_mode);
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine.h b/drivers/gpu/drm/xe/xe_hw_engine.h
> index 71968ee2f600..937ce20ea8de 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine.h
> +++ b/drivers/gpu/drm/xe/xe_hw_engine.h
> @@ -62,6 +62,10 @@ void xe_hw_engine_print(struct xe_hw_engine *hwe, struct drm_printer *p);
>  void xe_hw_engine_setup_default_lrc_state(struct xe_hw_engine *hwe);
>  
>  bool xe_hw_engine_is_reserved(struct xe_hw_engine *hwe);
> +void xe_hw_engine_snapshot_from_engine(struct xe_hw_engine *hwe,
> +                                      struct xe_hw_engine_snapshot *snapshot);
> +void xe_hw_engine_snapshot_from_capture(struct xe_hw_engine *hwe,
> +                                       struct xe_hw_engine_snapshot *snapshot);
>  static inline bool xe_hw_engine_is_valid(struct xe_hw_engine *hwe)
>  {
>         return hwe->name;
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine_types.h b/drivers/gpu/drm/xe/xe_hw_engine_types.h
> index 9f9755e31b9f..4433c0c8ffc2 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine_types.h
> +++ b/drivers/gpu/drm/xe/xe_hw_engine_types.h
> @@ -150,6 +150,99 @@ struct xe_hw_engine {
>         struct xe_hw_engine_class_intf *eclass;
>  };
>  
> +/**
> + * struct __reg_map_descr - Mapping table, defines a 32 bit register and corresponding data field
> + *
> + * Contains the defines of a 32 bit register, and the offset in the capture snapshot.
> + */
> +struct __reg_map_descr {
> +       /** @dst_offset: Offset in snap_shot_regs structure */
alan: can we not name it "dst_offset" since that sounds too much like what
we use for register or memory bar offsets, while this is more like a
"position_in_snapshot". my comment applies for "__reg_map_descr_64" as well
> +       u32 dst_offset;
> +       /** @regname: Name of register */
> +       const char *regname;
> +       /** @reg: Hardware register */
> +       struct xe_reg reg;
> +};
alan:snip
> +/**
> + * struct xe_hw_engine_snapshot - Hardware engine snapshot
> + *
> + * Contains the snapshot of useful hardware engine info and registers.
> + */
> +struct snap_shot_regs {
alan: i believe "snapshot" should be one word, if we wanna align with
dictionary spelling. (hope i didnt get this wrong?)
alan:snip
> +       u32 ipehr;
> +       /** @rcu_mode: RCU_MODE */
> +       u32 rcu_mode;
alan: this really should be a class or global register, but i
guess it might still match up and get found from guc-capture
if its located in the category of being an "engine instance"
register. However, as per discussed offline, let's continue
to make snapshot struct a flat-catch-all-reg-list and correspondingly
in guc_capture_find_ecode above, we should go through all register
list types when copying register values into snapshot struct.
That said, i notice you dont have forcewake register here.
> +       struct {
> +               /** @reg.instdone.ring: RING_INSTDONE */
> +               u32 ring;
> +               /** @reg.instdone.slice_common: SC_INSTDONE */
> 
alan:snip
> +               u32 *row;
> +               /** @reg.instdone.geom_svg: INSTDONE_GEOM_SVGUNIT */
> +               u32 *geom_svg;
> +       } instdone;
alan: nit: i beleive, given the purpose of this substruct "separation"
this substruct should be called "steered-regs" not "instdone" (if future
steered just happent to get named without "INSTDONE" in them. However
since this name is unrelated to this series, i'll leave it a nit.

alan:snip
>  #endif
> diff --git a/drivers/gpu/drm/xe/xe_sched_job.c b/drivers/gpu/drm/xe/xe_sched_job.c
> index cd8a2fba5438..922cd1a8753f 100644
> --- a/drivers/gpu/drm/xe/xe_sched_job.c
> +++ b/drivers/gpu/drm/xe/xe_sched_job.c
alan:snip
> @@ -191,10 +193,11 @@ void xe_sched_job_destroy(struct kref *ref)
>  {
>         struct xe_sched_job *job =
>                 container_of(ref, struct xe_sched_job, refcount);
> +       struct xe_device *xe = job_to_xe(job);
>  
>         if (unlikely(job->q->flags & EXEC_QUEUE_FLAG_KERNEL))
> -               xe_pm_runtime_put(job_to_xe(job));
> -       xe_exec_queue_put(job->q);
> +               xe_pm_runtime_put(xe);
alan: sorry, i'm confused, but why is this code changing?
seems unrleated to guc-error-capreut to me. if we are NOT doing the
xe_exec_queue_put here (so that certain information like lrca + guc-id
+ engine-instance/class is "held" until we can print the dev-core-dump,
then we should be relocating this call to elsewhere after that sequence)
so this is either an unnecessary change ... OR ... we have missed
the "put" that should still go somewhere else and potentially leaking
now? let me know if i am misunderstanding this patch.

> 

> +
>         dma_fence_put(job->fence);
>         drm_sched_job_cleanup(&job->drm);
>         job_free(job);


^ permalink raw reply	[relevance 1%]

* Re: [Buildroot] [PATCH] arch: remove BINFMT_FLAT_SHARED support
  @ 2024-05-11 20:18  1% ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:18 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot

On Sat, 11 May 2024 10:08:57 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> BINFMT_FLAT_SHARED was removed in the Linux Kernel by commit:
> 70578ff3367dd4ad8f212a9b5c05cffadabf39a8
> 
> It was m68k specific and got recently disabled in uClibc-ng, too.
> See this commit:
> https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=72b01dd20f9cea273809e3437b4aba849ae658af
> 
> Now that only BINFMT_FLAT_ONE is supported, remove the choice entirely.
> 
> BINFMT_FLAT_SEP_DATA was removed in 2018 from Buildroot by commit:
> e2ea4157a9a6425506d8ec24a27de216536654a6
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
>  arch/Config.in                            | 25 -----------------------
>  configs/canaan_kd233_defconfig            |  1 -
>  configs/sipeed_maix_bit_defconfig         |  1 -
>  configs/sipeed_maix_bit_sdcard_defconfig  |  1 -
>  configs/sipeed_maix_dock_defconfig        |  1 -
>  configs/sipeed_maix_dock_sdcard_defconfig |  1 -
>  configs/sipeed_maix_go_defconfig          |  1 -
>  configs/sipeed_maix_go_sdcard_defconfig   |  1 -
>  configs/sipeed_maixduino_defconfig        |  1 -
>  configs/sipeed_maixduino_sdcard_defconfig |  1 -
>  package/Makefile.in                       | 13 ------------
>  package/uclibc/uclibc.mk                  | 13 ++----------
>  12 files changed, 2 insertions(+), 58 deletions(-)

Applied to master after adding a Config.in.legacy entry for
BR2_BINFMT_FLAT_SHARED. None is needed for BINFMT_FLAT_ONE, as its
removal leads to FLAT one being the only format supported, becoming
therefore the default automatically.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 1%]

* [Buildroot] [git commit] arch: remove BINFMT_FLAT_SHARED support
@ 2024-05-11 20:17  4% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:17 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=5cfda60060dfd56d13ced4803625427abe79b056
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

BINFMT_FLAT_SHARED was removed in the Linux Kernel by commit:
70578ff3367dd4ad8f212a9b5c05cffadabf39a8

It was m68k specific and got recently disabled in uClibc-ng, too.
See this commit:
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=72b01dd20f9cea273809e3437b4aba849ae658af

Now that only BINFMT_FLAT_ONE is supported, remove the choice entirely.

BINFMT_FLAT_SEP_DATA was removed in 2018 from Buildroot by commit:
e2ea4157a9a6425506d8ec24a27de216536654a6

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 Config.in.legacy                          |  7 +++++++
 arch/Config.in                            | 25 -------------------------
 configs/canaan_kd233_defconfig            |  1 -
 configs/sipeed_maix_bit_defconfig         |  1 -
 configs/sipeed_maix_bit_sdcard_defconfig  |  1 -
 configs/sipeed_maix_dock_defconfig        |  1 -
 configs/sipeed_maix_dock_sdcard_defconfig |  1 -
 configs/sipeed_maix_go_defconfig          |  1 -
 configs/sipeed_maix_go_sdcard_defconfig   |  1 -
 configs/sipeed_maixduino_defconfig        |  1 -
 configs/sipeed_maixduino_sdcard_defconfig |  1 -
 package/Makefile.in                       | 13 -------------
 package/uclibc/uclibc.mk                  | 13 ++-----------
 13 files changed, 9 insertions(+), 58 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 7989f97284..83bb88020a 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2024.05"
 
+config BR2_BINFMT_FLAT_SHARED
+	bool "FLAT shared binary format removed"
+	help
+	  Support for the FLAT shared binary format has been removed:
+	  its support was removed from the Linux kernel, and also from
+	  uClibc-ng, the only C library that supported it.
+
 config BR2_PACKAGE_OMXPLAYER
 	bool "omxplayer removed"
 	select BR2_LEGACY
diff --git a/arch/Config.in b/arch/Config.in
index e7349e83ae..f39c33ef7f 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -447,29 +447,4 @@ config BR2_BINFMT_FLAT
 
 endchoice
 
-# Set up flat binary type
-choice
-	prompt "FLAT Binary type"
-	default BR2_BINFMT_FLAT_ONE
-	depends on BR2_BINFMT_FLAT
-
-config BR2_BINFMT_FLAT_ONE
-	bool "One memory region"
-	help
-	  All segments are linked into one memory region.
-
-config BR2_BINFMT_FLAT_SHARED
-	bool "Shared binary"
-	depends on BR2_m68k
-	# Even though this really generates shared binaries, there is no libdl
-	# and dlopen() cannot be used. So packages that require shared
-	# libraries cannot be built. Therefore, we don't select
-	# BR2_BINFMT_SUPPORTS_SHARED and therefore force BR2_STATIC_LIBS.
-	# Although this adds -static to the compilation, that's not a problem
-	# because the -mid-shared-library option overrides it.
-	help
-	  Allow to load and link indiviual FLAT binaries at run time.
-
-endchoice
-
 endmenu # Target options
diff --git a/configs/canaan_kd233_defconfig b/configs/canaan_kd233_defconfig
index 672fee57a1..832f8363a7 100644
--- a/configs/canaan_kd233_defconfig
+++ b/configs/canaan_kd233_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # Binary format
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 
 # Kernel
diff --git a/configs/sipeed_maix_bit_defconfig b/configs/sipeed_maix_bit_defconfig
index e45996879a..238e082a3d 100644
--- a/configs/sipeed_maix_bit_defconfig
+++ b/configs/sipeed_maix_bit_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # Binary format
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 
 # Kernel
diff --git a/configs/sipeed_maix_bit_sdcard_defconfig b/configs/sipeed_maix_bit_sdcard_defconfig
index 7e293e5a49..28aa143583 100644
--- a/configs/sipeed_maix_bit_sdcard_defconfig
+++ b/configs/sipeed_maix_bit_sdcard_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # System
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 BR2_GLOBAL_PATCH_DIR="board/canaan/k210-soc/patches"
 
diff --git a/configs/sipeed_maix_dock_defconfig b/configs/sipeed_maix_dock_defconfig
index 0352382fcd..ee1b0d8372 100644
--- a/configs/sipeed_maix_dock_defconfig
+++ b/configs/sipeed_maix_dock_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # Binary format
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 
 # Kernel
diff --git a/configs/sipeed_maix_dock_sdcard_defconfig b/configs/sipeed_maix_dock_sdcard_defconfig
index 20658813ba..41a062c7a1 100644
--- a/configs/sipeed_maix_dock_sdcard_defconfig
+++ b/configs/sipeed_maix_dock_sdcard_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # System
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 BR2_GLOBAL_PATCH_DIR="board/canaan/k210-soc/patches"
 
diff --git a/configs/sipeed_maix_go_defconfig b/configs/sipeed_maix_go_defconfig
index 27272dac4c..a5b09e17ac 100644
--- a/configs/sipeed_maix_go_defconfig
+++ b/configs/sipeed_maix_go_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # Binary format
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 
 # Kernel
diff --git a/configs/sipeed_maix_go_sdcard_defconfig b/configs/sipeed_maix_go_sdcard_defconfig
index 1bc12dd058..0e80d9c83a 100644
--- a/configs/sipeed_maix_go_sdcard_defconfig
+++ b/configs/sipeed_maix_go_sdcard_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # System
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 BR2_GLOBAL_PATCH_DIR="board/canaan/k210-soc/patches"
 
diff --git a/configs/sipeed_maixduino_defconfig b/configs/sipeed_maixduino_defconfig
index 3e04ea3a04..7ba7653e8d 100644
--- a/configs/sipeed_maixduino_defconfig
+++ b/configs/sipeed_maixduino_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # Binary format
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 
 # Kernel
diff --git a/configs/sipeed_maixduino_sdcard_defconfig b/configs/sipeed_maixduino_sdcard_defconfig
index 253ee7d7cf..7bdd36e1d0 100644
--- a/configs/sipeed_maixduino_sdcard_defconfig
+++ b/configs/sipeed_maixduino_sdcard_defconfig
@@ -15,7 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
 
 # System
 BR2_BINFMT_FLAT=y
-BR2_BINFMT_FLAT_ONE=y
 # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
 BR2_GLOBAL_PATCH_DIR="board/canaan/k210-soc/patches"
 
diff --git a/package/Makefile.in b/package/Makefile.in
index 3e276d23d6..b350c4b7b5 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -184,28 +184,15 @@ ifeq ($(BR2_BINFMT_FLAT),y)
 ifeq ($(BR2_RISCV_64),y)
 TARGET_CFLAGS += -fPIC
 endif
-ifeq ($(BR2_BINFMT_FLAT_ONE),y)
 ELF2FLT_FLAGS = $(if $($(PKG)_FLAT_STACKSIZE),\
 	-Wl$(comma)-elf2flt="-r -s$($(PKG)_FLAT_STACKSIZE)",\
         -Wl$(comma)-elf2flt=-r)
-else
-ELF2FLT_FLAGS = $(if $($(PKG)_FLAT_STACKSIZE),\
-	-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
-	-Wl$(comma)-elf2flt)
-endif
 TARGET_CFLAGS += $(ELF2FLT_FLAGS)
 TARGET_CXXFLAGS += $(ELF2FLT_FLAGS)
 TARGET_FCFLAGS += $(ELF2FLT_FLAGS)
 TARGET_LDFLAGS += $(ELF2FLT_FLAGS)
 endif
 
-ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
-TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
-TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0
-TARGET_FCFLAGS += -mid-shared-library -mshared-library-id=0
-TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
-endif
-
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 TARGET_CROSS = $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-
 else
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 9593e18d45..b7aba27b00 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -57,19 +57,10 @@ UCLIBC_LOCALES = \
 endif
 
 # noMMU binary formats
-ifeq ($(BR2_BINFMT_FLAT_ONE),y)
+ifeq ($(BR2_BINFMT_FLAT),y)
 define UCLIBC_BINFMT_CONFIG
 	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT)
 	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF)
-endef
-endif
-ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
-define UCLIBC_BINFMT_CONFIG
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT)
 	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF)
 endef
 endif
@@ -140,7 +131,7 @@ endif # arm
 ifeq ($(UCLIBC_TARGET_ARCH),m68k)
 
 # disable DOPIC for flat without separate data
-ifeq ($(BR2_BINFMT_FLAT_ONE),y)
+ifeq ($(BR2_BINFMT_FLAT),y)
 define UCLIBC_M68K_BINFMT_FLAT
 	$(call KCONFIG_DISABLE_OPT,DOPIC)
 endef
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 4%]

* Re: [RFC PATCH v3 1/7] mm/damon/paddr: refactor DAMOS_PAGEOUT with migration_mode
  @ 2024-05-11 20:16  1% ` SeongJae Park
  0 siblings, 0 replies; 200+ results
From: SeongJae Park @ 2024-05-11 20:16 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Honggyu Kim, damon, linux-mm, akpm, apopple, baolin.wang,
	dave.jiang, hyeongtak.ji, kernel_team, linmiaohe, linux-kernel,
	linux-trace-kernel, mathieu.desnoyers, mhiramat, rakie.kim,
	rostedt, surenb, yangx.jy, ying.huang, ziy, 42.hyeyoo,
	art.jeongseob

On Fri,  5 Apr 2024 12:19:07 -0700 SeongJae Park <sj@kernel.org> wrote:

> On Fri,  5 Apr 2024 15:08:50 +0900 Honggyu Kim <honggyu.kim@sk.com> wrote:
> 
> > This is a preparation patch that introduces migration modes.
> > 
> > The damon_pa_pageout is renamed to damon_pa_migrate and it receives an
> > extra argument for migration_mode.
> 
> I personally think keeping damon_pa_pageout() as is and adding a new function
> (damon_pa_migrate()) with some duplicated code is also ok, but this approach
> also looks fine to me.  So I have no strong opinion here, but just letting you
> know I would have no objection at both approaches.

Meanwhile, we added one more logic in damon_pa_pageout() for doing page
idleness double check on its own[1].  It makes reusing damon_pa_pageout() for
multiple reason a bit complex.  I think the complexity added a problem in this
patch that I also missed before due to the complexity.  Show below comment in
line.  Hence now I think it would be better to do the suggested way.

If we use the approach, this patch is no more necessary, and therefore can be
dropped.

[1] https://lore.kernel.org/20240426195247.100306-1-sj@kernel.org


Thanks,
SJ

[...]
> 
> > 
> > No functional changes applied.
> > 
> > Signed-off-by: Honggyu Kim <honggyu.kim@sk.com>
> > ---
> >  mm/damon/paddr.c | 18 +++++++++++++++---
> >  1 file changed, 15 insertions(+), 3 deletions(-)
> > 
> > diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
> > index 081e2a325778..277a1c4d833c 100644
> > --- a/mm/damon/paddr.c
> > +++ b/mm/damon/paddr.c
> > @@ -224,7 +224,12 @@ static bool damos_pa_filter_out(struct damos *scheme, struct folio *folio)
> >  	return false;
> >  }
> >  
> > -static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s)
> > +enum migration_mode {
> > +	MIG_PAGEOUT,
> > +};
> 
> To avoid name conflicts, what about renaming to 'damos_migration_mode' and
> 'DAMOS_MIG_PAGEOUT'?
> 
> > +
> > +static unsigned long damon_pa_migrate(struct damon_region *r, struct damos *s,
> > +				      enum migration_mode mm)
> 
> My poor brain has a bit confused with the name.  What about calling it 'mode'?
> 
> >  {
> >  	unsigned long addr, applied;
> >  	LIST_HEAD(folio_list);
> > @@ -249,7 +254,14 @@ static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s)

Before this line, damon_pa_pageout() calls folio_clear_referenced() and
folio_test_clear_young() for the folio, because this is pageout code.  Changed
function, damon_pa_migrate() is not only for cold pages but general migrations.
Hence it should also be handled based on the migration mode, but not handled.

I think this problem came from the increased complexity of this function.
Hence I think it is better to keep damon_pa_pageout() as is and adding a new
function for migration.


Thanks,
SJ

[...]

^ permalink raw reply	[relevance 1%]

* Re: [PATCH V1 5/9] PCI/TPH: Introduce API functions to get/set steering tags
  @ 2024-05-11 20:15  1%   ` Simon Horman
  0 siblings, 0 replies; 200+ results
From: Simon Horman @ 2024-05-11 20:15 UTC (permalink / raw)
  To: Wei Huang
  Cc: linux-pci, linux-kernel, linux-doc, netdev, bhelgaas, corbet,
	davem, edumazet, kuba, pabeni, alex.williamson, gospo,
	michael.chan, ajit.khaparde, manoj.panicker2, Eric.VanTassell

On Thu, May 09, 2024 at 11:27:37AM -0500, Wei Huang wrote:
> This patch introduces two API functions, pcie_tph_get_st() and
> pcie_tph_set_st(), for a driver to retrieve or configure device's
> steering tags. There are two possible locations for steering tag
> table and the code automatically figure out the right location to
> set the tags if pcie_tph_set_st() is called. Note the tag value is
> always zero currently and will be extended in the follow-up patches.
> 
> Co-developed-by: Eric Van Tassell <Eric.VanTassell@amd.com>
> Signed-off-by: Eric Van Tassell <Eric.VanTassell@amd.com>
> Signed-off-by: Wei Huang <wei.huang2@amd.com>

Hi Eric and Wei,

I noticed a few minor problems flagged by Sparse
which I'd like to bring to your attention.

> ---
>  drivers/pci/pcie/tph.c  | 383 ++++++++++++++++++++++++++++++++++++++++
>  include/linux/pci-tph.h |  19 ++
>  2 files changed, 402 insertions(+)
> 
> diff --git a/drivers/pci/pcie/tph.c b/drivers/pci/pcie/tph.c

...

> +/*
> + * For a given device, return a pointer to the MSI table entry at msi_index.
> + */
> +static void __iomem *tph_msix_table_entry(struct pci_dev *dev,
> +					  __le16 msi_index)
> +{
> +	void *entry;
> +	u16 tbl_sz;
> +	int ret;
> +
> +	ret = tph_get_table_size(dev, &tbl_sz);
> +	if (ret || msi_index > tbl_sz)

While tbl_sz is a host-byte order integer value, msi_index is little endian.
So maths operations involving the latter doesn't seem right.

Flagged by Sparse.

> +		return NULL;
> +
> +	entry = dev->msix_base + msi_index * PCI_MSIX_ENTRY_SIZE;

Likewise, there seem to be endian problems here here.

Also, entry is used on the line above and below in a way
where an __iomem annotation is expected, but entry doesn't have one.

Also flagged by Sparse.

> +
> +	return entry;
> +}

...

> +/* Write the steering tag to MSI-X vector control register */
> +static void tph_write_tag_to_msix(struct pci_dev *dev, int msix_nr, u16 tag)
> +{
> +	u32 val;
> +	void __iomem *vec_ctrl;
> +	struct msi_desc *msi_desc;
> +
> +	msi_desc = tph_msix_index_to_desc(dev, msix_nr);
> +	if (!msi_desc) {
> +		pr_err("MSI-X descriptor for #%d not found\n", msix_nr);
> +		return;
> +	}
> +
> +	vec_ctrl = tph_msix_vector_control(dev, msi_desc->msi_index);

According to Sparse, the type of msi_desc->msi_index is unsigned short.
But tph_msix_vector_control expects it's second argument to be __le16.

> +
> +	val = readl(vec_ctrl);
> +	val &= 0xffff;
> +	val |= (tag << 16);
> +	writel(val, vec_ctrl);
> +
> +	/* read back to flush the update */
> +	val = readl(vec_ctrl);
> +	msi_unlock_descs(&dev->dev);
> +}

...

^ permalink raw reply	[relevance 1%]

* Re: [Buildroot] [PATCH v3] package/tbtools: new package
  @ 2024-05-11 20:15  0% ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:15 UTC (permalink / raw)
  To: Mika Westerberg; +Cc: Aapo Vienamo, buildroot

On Sat, 11 May 2024 11:06:12 +0300
Mika Westerberg <mika.westerberg@linux.intel.com> wrote:

> This is a collection of tools for Linux Thunderbolt/USB4 development,
> debugging and validation.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Reviewed-by: Aapo Vienamo <aapo.vienamo@linux.intel.com>
> ---
> Changes from v2:

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 0%]

* [Buildroot] [git commit] package/tbtools: new package
@ 2024-05-11 20:15  4% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:15 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=8d5b3aac435880333833d4a3909b1818fe8af045
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This is a collection of tools for Linux Thunderbolt/USB4 development,
debugging and validation.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Aapo Vienamo <aapo.vienamo@linux.intel.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 DEVELOPERS                 |  3 +++
 package/Config.in          |  1 +
 package/tbtools/Config.in  | 18 ++++++++++++++++++
 package/tbtools/tbtools.mk | 13 +++++++++++++
 4 files changed, 35 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index 1c0cd336ca..67ce43e9cc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2300,6 +2300,9 @@ N:	Michel Stempin <michel.stempin@wanadoo.fr>
 F:	board/sipeed/licheepi_zero/
 F:	configs/sipeed_licheepi_zero_defconfig
 
+N:	Mika Westerberg <mika.westerberg@linux.intel.com>
+F:	package/tbtools/
+
 N:	Mike Frampton <mikeframpo@gmail.com>
 F:	package/qcom-db410c-firmware/
 
diff --git a/package/Config.in b/package/Config.in
index edc56290ea..2af63c124e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -156,6 +156,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/stress-ng/Config.in"
 	source "package/sysdig/Config.in"
 	source "package/sysprof/Config.in"
+	source "package/tbtools/Config.in"
 	source "package/tcf-agent/Config.in"
 	source "package/trace-cmd/Config.in"
 	source "package/trinity/Config.in"
diff --git a/package/tbtools/Config.in b/package/tbtools/Config.in
new file mode 100644
index 0000000000..9c27bf0e30
--- /dev/null
+++ b/package/tbtools/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_TBTOOLS
+	bool "tbtools"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_HAS_UDEV
+	# Fails to build on 32-bit systems
+	depends on BR2_ARCH_IS_64
+	select BR2_PACKAGE_HOST_RUSTC
+	help
+	  tbtools is a collection of tools for Linux Thunderbolt/USB4
+	  development, debugging and validation.
+
+	  https://github.com/intel/tbtools
+
+comment "tbtools needs udev /dev management w/ glibc toolchain"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
+	depends on BR2_ARCH_IS_64
+	depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/tbtools/tbtools.mk b/package/tbtools/tbtools.mk
new file mode 100644
index 0000000000..94340616db
--- /dev/null
+++ b/package/tbtools/tbtools.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# tbtools
+#
+################################################################################
+
+TBTOOLS_VERSION = v0.3.2
+TBTOOLS_SITE = $(call github,intel,tbtools,$(TBTOOLS_VERSION))
+TBTOOLS_LICENSE = MIT
+TBTOOLS_LICENSE_FILES = LICENSE
+TBTOOLS_DEPENDENCIES = udev
+
+$(eval $(cargo-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 4%]

* Re: [Buildroot] [PATCH] configs/qemu_riscv32_nommu_virt_defconfig: New defconfig
  @ 2024-05-11 20:14  1% ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:14 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot

Hello Waldemar,

On Sat, 11 May 2024 09:46:07 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> Add new defconfig for Qemu RISCV32 w/o MMU.
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>

Nice stuff!

Could you split this commit into two, one enabling RISC-V 32-bit noMMU,
and another adding the defconfig?

Also, in the patch adding the defconfig, fix the following
check-package warning:

WARNING: configs/qemu_riscv32_nommu_virt_defconfig:0: missing BR2_DOWNLOAD_FORCE_CHECK_HASHES

(we require this for new defconfigs)

Minor detail, the commit title should be:

	configs/qemu_riscv32_nommu_virt: new defconfig

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 1%]

* [Buildroot] [git commit] package/elf2flt: update to 2024.02
@ 2024-05-11 20:08  1% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:08 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=23d71be5a985a03a3cc29f2507243488889c244c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Upstream added riscv32 support.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/elf2flt/elf2flt.hash | 2 +-
 package/elf2flt/elf2flt.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/elf2flt/elf2flt.hash b/package/elf2flt/elf2flt.hash
index 4dc040645e..e338ff6780 100644
--- a/package/elf2flt/elf2flt.hash
+++ b/package/elf2flt/elf2flt.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  735482d8c5fd76191e86ff2d6985dd68c232a7b8bdac11fdb480385c6a75ca8f  elf2flt-2023.09.tar.gz
+sha256  e1d419c463431ff1af7fdc76a402f628744ad10dff063bea76a386942255119c  elf2flt-2024.02.tar.gz
 sha256  f20bc5007904094e3a4e9fbcc3526cdd40893f91d458c3139b308e5c4c0899c6  LICENSE.TXT
diff --git a/package/elf2flt/elf2flt.mk b/package/elf2flt/elf2flt.mk
index aa5595843f..d5a7b9b5fd 100644
--- a/package/elf2flt/elf2flt.mk
+++ b/package/elf2flt/elf2flt.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ELF2FLT_VERSION = 2023.09
+ELF2FLT_VERSION = 2024.02
 ELF2FLT_SITE = $(call github,uclinux-dev,elf2flt,v$(ELF2FLT_VERSION))
 ELF2FLT_LICENSE = GPL-2.0+
 ELF2FLT_LICENSE_FILES = LICENSE.TXT
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 1%]

* devicetree for Turris Omnia is missing i2c frequency for atsha204a
@ 2024-05-11 20:09  1% m95d
  0 siblings, 0 replies; 200+ results
From: m95d @ 2024-05-11 20:09 UTC (permalink / raw)
  To: devicetree

Hello.

Booting kernel v6.6 I get these errors in dmesg:

atmel-sha204a 6-0064: failed to read clock-frequency property
atmel-sha204a: probe of 6-0064 failed with error -22

I'm attaching a patch to fix it.
It adds 1MHz clock frequency to the i2c devicetree node where atsha204a is connected. This is the max. supported frequency according to the atmel sha204a specs sheet.
Tested. Works.

Thank you.

diff --git a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
index 7b755bb4e4e7..64caabc81585 100644
--- a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
@@ -378,6 +378,7 @@ i2c@5 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <5>;
+			clock-frequency = <1000000>;
 
 			/* ATSHA204A-MAHDA-T crypto module */
 			crypto@64 {

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>


^ permalink raw reply related	[relevance 1%]

* Re: [GIT PULL] alpha: cleanups and build fixes for 6.10
  2024-05-11 19:37  1%         ` Paul E. McKenney
@ 2024-05-11 20:08  1%           ` Arnd Bergmann
  0 siblings, 0 replies; 200+ results
From: Arnd Bergmann @ 2024-05-11 20:08 UTC (permalink / raw)
  To: Paul E. McKenney, John Paul Adrian Glaubitz
  Cc: Linus Torvalds, linux-kernel, Linux-Arch, linux-alpha,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, Alexander Viro

On Sat, May 11, 2024, at 21:37, Paul E. McKenney wrote:
> On Sat, May 11, 2024 at 08:49:08PM +0200, John Paul Adrian Glaubitz wrote:
>
> The pre-EV56 Alphas have no byte store instruction, correct?
>
> If that is in fact correct, what code is generated for a volatile store
> to a single byte for those CPUs?  For example, for this example?
>
> 	char c;
>
> 	...
>
> 	WRITE_ONCE(c, 3);
>
> The rumor I heard is that the compilers will generate a non-atomic
> read-modify-write instruction sequence in this case, first reading the
> 32-bit word containing that byte into a register, then substituting the
> value to be stored into corresponding byte of that register, and finally
> doing a 32-bit store from that register.
>
> Is that the case, or am I confused?

I think it's slightly worse: gcc will actually do a 64-bit
read-modify-write rather than a 32-bit one, and it doesn't
use atomic ll/sc when storing into an _Atomic struct member:

echo '#include <stdatomic.h>^M struct s { _Atomic char c; _Atomic char s[7]; long l; }; void f(struct s *s) { atomic_store(&s->c, 3); }' | alpha-linux-gcc-14  -xc - -S -o- -O2 -mcpu=ev5

f:
	.frame $30,0,$26,0
$LFB0:
	.cfi_startproc
	.prologue 0
	mb
	lda $1,3($31)
	insbl $1,$16,$1
	ldq_u $2,0($16)
	mskbl $2,$16,$2
	bis $1,$2,$1
	stq_u $1,0($16)
	bis $31,$31,$31
	mb
	ret $31,($26),1
	.cfi_endproc
$LFE0:
	.end f

compared to -mcpu=ev56:

f:
	.frame $30,0,$26,0
$LFB0:
	.cfi_startproc
	.prologue 0
	mb
	lda $1,3($31)
	stb $1,0($16)
	bis $31,$31,$31
	mb
	ret $31,($26),1
	.cfi_endproc
$LFE0:
	.end f

      Arnd

^ permalink raw reply	[relevance 1%]

* Re: git-cherry-pick(1) -- path
  @ 2024-05-11 20:08  1%             ` Alejandro Colomar
  0 siblings, 0 replies; 200+ results
From: Alejandro Colomar @ 2024-05-11 20:08 UTC (permalink / raw)
  To: phillip.wood; +Cc: Junio C Hamano, git

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

Hi Phillip,

On Sat, May 11, 2024 at 04:01:18PM GMT, Phillip Wood wrote:
> sequencer.c. If we go for the "write new trees and use those in the merge"
> approach then we'd need to change do_pick_commit() to create the trees and
> we'd probably want to change do_recursive_merge() to take trees rather than
> commits. We'd also need to add a new pathspec member to struct replay_opts
> to pass the pathspec around.

I've been thinking this evening that since
`git format-patch ... | git am -3` works so well, and since the behavior
of cherry-pick -- path isn't so obvious (we're discussing different
strategies), maybe we should just not do it.  I fell in love with am -3.

:-3

Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es/>
A client is hiring kernel driver, mm, and/or crypto developers;
contact me if interested.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[relevance 1%]

* Re: [Buildroot] [PATCH 1/1] package/ustreamer: new package
  @ 2024-05-11 20:08  1%   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 20:08 UTC (permalink / raw)
  To: Kadambini Nema; +Cc: buildroot

Hello Kadambini,

Thanks, I applied your patch, with a number of changes, see below.

On Mon, 19 Feb 2024 13:34:02 -0800
Kadambini Nema <kadambini.nema@gmail.com> wrote:

> diff --git a/package/ustreamer/Config.in b/package/ustreamer/Config.in
> new file mode 100644
> index 0000000000..52c511e22d
> --- /dev/null
> +++ b/package/ustreamer/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_USTREAMER
> +	bool "ustreamer"
> +	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 # V4L2_EVENT_SOURCE_CHANGE
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_USE_MMU
> +	depends on !BR2_STATIC_LIBS
> +	depends on BR2_TOOLCHAIN_HAS_ATOMIC

I'm not sure why this dependency was needed. It built fine for sparc,
which normally causes problems with libatomic.

> +	select BR2_PACKAGE_JPEG
> +	select BR2_PACKAGE_LIBEVENT
> +	select BR2_PACKAGE_LIBBSD
> +	select BR2_PACKAGE_LIBGPIOD

libgpiod is not a mandatory dependency, so I dropped this. And in fact,
with a select BR2_PACKAGE_LIBGPIOD, you should have added a depends on
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8, which is inherited from libgpiod.

The BR2_USE_WCHAR dependency from libbsd was missing.

Overall, the result is:

+       bool "ustreamer"
+       depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 # V4L2_EVENT_SOURC
E_CHANGE
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libbsd
+       depends on !BR2_STATIC_LIBS # libbsd
+       depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS # libbsd
+       depends on BR2_USE_WCHAR # libbsd
+       select BR2_PACKAGE_JPEG
+       select BR2_PACKAGE_LIBBSD
+       select BR2_PACKAGE_LIBEVENT



> +	help
> +	  Lightweight and fast MJPEG-HTTP streamer
> +
> +	  https://github.com/pikvm/ustreamer
> +
> +comment "ustreamer needs a toolchain w/ threads, headers >= 3.16, dynamic library"

This was missing depends on so that it only appears when relevant, i.e:

+comment "ustreamer needs a toolchain w/ headers >= 3.16, threads, dynamic library, wchar"
+       depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS
+       depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 || \
+               !BR2_TOOLCHAIN_HAS_THREADS || \
+               BR2_STATIC_LIBS || \
+               !BR2_USE_WCHAR


> diff --git a/package/ustreamer/ustreamer.mk b/package/ustreamer/ustreamer.mk
> new file mode 100644
> index 0000000000..71de097a22
> --- /dev/null
> +++ b/package/ustreamer/ustreamer.mk
> @@ -0,0 +1,25 @@
> +################################################################################
> +#
> +# ustreamer
> +#
> +################################################################################
> +
> +USTREAMER_VERSION = 5.51
> +USTREAMER_SITE = $(call github,pikvm,ustreamer,refs/tags)
> +USTREAMER_SOURCE = v$(USTREAMER_VERSION).tar.gz

This is not how the github macro is meant to be used. It's supposed to
be used like this:

+USTREAMER_VERSION = 5.51
+USTREAMER_SITE = $(call github,pikvm,ustreamer,v$(USTREAMER_VERSION))

> +USTREAMER_SUBDIR = ustreamer

This is not used, so I dropped it.

> +USTREAMER_LICENSE = GPL-3.0-or-later

We don't use the SPDX identifier for this case, we use:

+USTREAMER_LICENSE = GPL-3.0+

> +USTREAMER_LICENSE_FILES = LICENSE
> +USTREAMER_DEPENDENCIES = jpeg libevent libbsd libgpiod

I dropped libgpiod here.

> +USTREAMER_CONF_ENV = "CFLAGS=$(TARGET_CFLAGS)"

This was not used anywhere, so I dropped.

> +
> +define USTREAMER_BUILD_CMDS
> +	$(MAKE)  $(if $(BR2_PACKAGE_SYSTEMD),WITH_SYSTEMD=1, ) WITH_PTHREAD_NP=1  WITH_SETPROCTITLE=1 HAS_PDEATHSIG=1 $(TARGET_CONFIGURE_OPTS) -C $(@D)
> +endef

The systemd case was not working, because you were not adding a
dependency on systemd, so nothing was making sure that systemd would
get built before ustream. I also added handling libgpiod as an optional
dependency. Overall it looks like this now:

+USTREAMER_MAKE_OPTS = \
+       $(TARGET_CONFIGURE_OPTS) \
+       WITH_PTHREAD_NP=1 \
+       WITH_SETPROCTITLE=1 \
+       HAS_PDEATHSIG=1
+
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+USTREAMER_MAKE_OPTS += WITH_SYSTEMD=1
+USTREAMER_DEPENDENCIES += systemd
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGPIOD),y)
+USTREAMER_MAKE_OPTS += WITH_GPIO=1
+USTREAMER_DEPENDENCIES += libgpiod
+endif
+
+define USTREAMER_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) $(USTREAMER_MAKE_OPTS) -C $(@D)
+endef

Applied with all those changes!

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 1%]

* Assistance getting the Universal Audio Apollo Solo USB to work with Linux
@ 2024-05-11 20:07  1% Ethin Probst
  0 siblings, 0 replies; 200+ results
From: Ethin Probst @ 2024-05-11 20:07 UTC (permalink / raw)
  To: linux-usb


[-- Attachment #1.1: Type: text/plain, Size: 8710 bytes --]

Hi everyone,

I'm new to this mailing list and have never done anything like this before, so I hope I'm following protocol and stuff! If you need any info that I don't provide here, I'm happy to provide it, but I'll do my best to provide all the information I've got in this email (which may make it quite a long one, sorry!). If this isn't the right list and I should send this elsewhere, let me know, though I felt this might be the most appropriate list to go to since it may be an audio device but I feel this is much more of a USB problem than anything else. I'm not subscribed to the list, so please CC any replies.

I recently acquired a Universal Audio Apollo Solo USB audio interface and am curious about getting it to work with Linux. There are no official drivers, but I'm hoping that we can at least get the audio interface part of it working. The Apollo Solo is a professional audio audio interface with an onboard DSP engine and audio interface. It doesn't quite conform to the UAC, but it does present input/output/clock source terminals via audio class descriptors. Or, rather, it does... On Windows, anyway.

And this is where everything gets confusing, so I hope I'm explaining everything properly.

When the device is plugged into a machine that doesn't have Universal Audio's special drivers installed, it presents itself as a Cypress WestBridge, vendor ID 2b5a and product ID 000c. However, when the drivers are installed, the drivers do something I'm struggling to identify to "boot" the device and many things change. When it's in it's "special boot mode" (or whatever you'd like to call it) it runs at USB 2.0 speeds and presents a significantly different device descriptor:

    bLength: 18
    bDescriptorType: 0x01 (DEVICE)
    bcdUSB: 0x0200
    bDeviceClass: Device (0x00)
    bDeviceSubClass: 0
    bDeviceProtocol: 0 (Use class code info from Interface Descriptors)
    bMaxPacketSize0: 64
    idVendor: Unknown (0x2b5a)
    idProduct: Unknown (0x000c)
    bcdDevice: 0x0100
    iManufacturer: 1
    iProduct: 2
    iSerialNumber: 3
    bNumConfigurations: 1

However, when it's booted, the device descriptor is:

    bLength: 18
    bDescriptorType: 0x01 (DEVICE)
    bcdUSB: 0x0320
    bDeviceClass: Miscellaneous (0xef)
    bDeviceSubClass: 2
    bDeviceProtocol: 1 (Interface Association Descriptor)
    bMaxPacketSize0: 9
    idVendor: Unknown (0x2b5a)
    idProduct: Unknown (0x000d)
    bcdDevice: 0x0000
    iManufacturer: 1
    iProduct: 2
    iSerialNumber: 3
    bNumConfigurations: 1

Through careful analysis of the firmware (which ships with the drivers and doesn't need us to dump it manually), I believe the onboard board is a Cypress (now Infineon) EZ-USB 3.0 FX3, hence Linux identifying it as a "Cypress WestBridge". The MCU is an ARM processor, though I am not certain which ISA revision it uses.

When plugged in and in it's boot mode, Linux is able to extract the first device descriptor above, but is unable to enumerate the device:

[   61.091703] usb 3-3: new high-speed USB device number 4 using xhci_hcd
[   61.299491] usb 3-3: New USB device found, idVendor=2b5a, idProduct=000c, bcdDevice= 1.00
[   61.299502] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   61.299505] usb 3-3: Product: WestBridge 

[   61.299508] usb 3-3: Manufacturer: Cypress
[   61.299510] usb 3-3: SerialNumber: 0000000004BE
[   66.674005] usb usb2-port1: attempt power cycle
[   75.107555] usb usb2-port1: unable to enumerate USB device

If I try to force-bind the driver, this of course fails:

[  220.383312] usbcore: registered new interface driver snd-usb-audio
[  257.877076] usb 3-3: cannot find UAC_HEADER
[  257.877401] snd-usb-audio: probe of 3-3:1.0 failed with error -22

However, when plugged in and I'm booted into Windows, and then I reboot into Linux without powering off the device (such that it remains in it's normal mode that Windows sets it up in), the snd-usb-audio driver is able to enumerate the device but can't figure out the sample rates:

[  100.447871] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd
[  100.464845] usb 2-1: LPM exit latency is zeroed, disabling LPM.
[  100.467241] usb 2-1: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates (clock 128)
[  100.467444] usb 2-1: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates (clock 128)
[  100.467798] usb 2-1: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates (clock 128)
[  100.468047] usb 2-1: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates (clock 128)
[  100.468249] usb 2-1: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates (clock 128)

So, what I crucially couldn't figure out -- and what I still don't precisely know -- is what Windows does that Linux does not which causes the device to boot up and present itself appropriately as a USB audio device, at least basically. Obviously it still requires quite a bit of manual tuning, but I feel like if we can figure out how it's initialized and configured we could get USB audio IO working -- and that's all I care about right now. From what I could tell the USB audio interface is interface 1 (x-x:1.1), and the DSP engine is interface 0 (x-x:1.0).

Via repeated tries and lots of time, I've managed to set up a VirtualBox VM that I then installed Windows on and then the drivers. Though this VM doesn't fully identify the device as a UAC-conforming device (that is, it doesn't show up as an audio device but does get initialized), I have the packet captures from my windows install that I'll provide below for that part (switching to it as the default audio device, selecting sample rates and so on). I've managed to capture at least 3 captures of USB data, but all of them have over a thousand frames, which makes straightforward analysis difficult for me. It doesn't help that I'm not very good at this to begin with, though I'm learning as best I can. Though I am not positive all of the files I'll provide will be useful, I thought providing more data than was actually needed would be better than being overly conservative and not providing enough. Thus, this file (https://cloud.the-gdn.net/s/Kxme36mogoGFrWr), hosted on my nextcloud instance, has the following files:

- All the packet captures I have, with one being just a quick connect-forward-init sequence, one being a connect, forward-to-vm and then a wait for quite a while because I was installing the drivers (though they may not be all that desimilar), and one being the packets that USBPcap was able to get on my windows install, though I'm not positive how helpful that will be;
- A folder containing all drivers for UAD software;
- A folder containing an assembly language dump of the uausbaudio.sys driver, which I (believe) is what does this sequence, though I may be wrong; and
- A folder containing all the firmware for all of the devices in the UAD Apollo family, for both the initial firmware, update firmware, and firmware for the DSP engine.

The main directories that I think are important are:

- asm-dump
- captures
- Drivers/audio/usb/x64/win10
- Firmware/USB

I think the stuff related to UAD-2 are for the DSP engine and not all that relevant (but maybe it is relevant and I might be dismissing it out of hand, I don't know). The capture files are:

ua-init-short: this was when I'd plugged in the device and told VirtualBox to plug the device into the VM and capture it's USB data. After Windows initialized it, I immediately unplugged it.
ua-init-long: This file contains the packets from when I plugged in the device into the VM and began capturing it. Specifically, Windows set up the device as it does with any PNP device, and I obtained the drivers and installed them, and during that installation process the device was initialized.
ua-init-windows: This capture contains the data I was able to get from the USBPcap side of things. I had Windows running natively with the drivers installed, so I started capturing, plugged in the device, and let Windows fully initialize the device, including switching to it as the default audio device.

I know that this is a long message and will probably take a while to figure out, but I know I'm not the only one who's wanted to get these devices even preliminarily working on Linux, and I'm happy to assist and help in any way I can. I'll end this message here since it's getting quite long, but I hope something can come of all this, and again, sorry for the (really) long message!


Signed,
Ethin D. Probst

Sent with Proton Mail secure email.

[-- Attachment #1.2: publickey - ethindp@pm.me - 0x846BFA7B.asc --]
[-- Type: application/pgp-keys, Size: 4337 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[relevance 1%]

* Re: [PATCH] perf/x86/amd/uncore: Add flex array to struct amd_uncore_ctx
  @ 2024-05-11 20:04  0% ` Kees Cook
  0 siblings, 0 replies; 200+ results
From: Kees Cook @ 2024-05-11 20:04 UTC (permalink / raw)
  To: Erick Archer
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Liang, Kan, Thomas Gleixner,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Christophe JAILLET,
	Gustavo A. R. Silva, Justin Stitt, x86, linux-perf-users,
	linux-kernel, linux-hardening

On Sat, May 11, 2024 at 04:51:54PM +0200, Erick Archer wrote:
> This is an effort to get rid of all multiplications from allocation
> functions in order to prevent integer overflows [1][2].
> 
> The "struct amd_uncore_ctx" can be refactored to use a flex array for
> the "events" member. This way, the allocation/freeing of the memory can
> be simplified.
> 
> Specifically, as the "curr" variable is a pointer to the amd_uncore_ctx
> structure and it now ends up in a flexible array:
> 
> struct amd_uncore_ctx {
>         [...]
>         struct perf_event *events[];
> };
> 
> the two-step allocation can be simplifief by using just one kzalloc_node
> function and the struct_size() helper to do the arithmetic calculation
> for the memory to be allocated.
> 
> This way, the code is more readable and safer.
> 
> Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1]
> Link: https://github.com/KSPP/linux/issues/160 [2]
> Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Signed-off-by: Erick Archer <erick.archer@outlook.com>
> ---
> Hi,
> 
> This patch can be considered v4 of this other one [1]. However, since
> the patch has completely changed due to the addition of the flex array,
> I have decided to make a new series and remove the "Reviewed-by:" tag
> by Gustavo A. R. Silva and Kees cook.
> 
> [1] https://lore.kernel.org/linux-hardening/PAXPR02MB7248F46DEFA47E79677481B18B152@PAXPR02MB7248.eurprd02.prod.outlook.com/
> 
> Thanks,
> Erick
> ---
>  arch/x86/events/amd/uncore.c | 18 +++++-------------
>  1 file changed, 5 insertions(+), 13 deletions(-)

My favorite kind of patch: fewer lines, clearer code.

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

-- 
Kees Cook

^ permalink raw reply	[relevance 0%]

* [PATCH v2] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  2024-05-11 18:42  1%   ` Linus Torvalds
  2024-05-11 19:28  1%     ` Al Viro
@ 2024-05-11 20:02  7%     ` Linus Torvalds
  1 sibling, 0 replies; 200+ results
From: Linus Torvalds @ 2024-05-11 20:02 UTC (permalink / raw)
  To: torvalds
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, viro, walters,
	wangkai86, willy

Yafang Shao reports that he has seen loads that generate billions of
negative dentries in a directory, which then when the directory is
removed causes excessive latencies for other users because the dentry
shrinking is done under the directory inode lock.

There seems to be no actual reason for holding the inode lock any more
by the time we get rid of the now uninteresting negative dentries, and
it's an effect of the calling convention.

Split the 'vfs_rmdir()' function into two separate phases:

 - 'vfs_rmdir_raw()' does the actual main rmdir heavy lifting

 - 'vfs_rmdir_cleanup()' needs to be run by the caller after a
   successful raw call, after the caller has dropped the inode locks.

We leave the 'vfs_rmdir()' function around, since it has multiple
callers, and only convert the main system call path to the new two-phase
model.  The other uses will be left as an exercise for the reader for
when people find they care.

[ Side note: I think the 'dget()/dput()' pair in vfs_rmdir_raw() is
  superfluous, since callers always have to have a dentry reference over
  the call anyway. That's a separate issue.    - Linus ]

Reported-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/all/20240511022729.35144-1-laoar.shao@gmail.com/
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Waiman Long <longman@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

Second version - this time doing the dentry pruning even later, after
releasing the parent inode lock too. 

I did the same amount of "extensive testing" on this one as the previous
one.  IOW, little-to-none. 

 fs/namei.c | 61 ++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 41 insertions(+), 20 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 28e62238346e..15b4ff6ed1e5 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4176,21 +4176,7 @@ SYSCALL_DEFINE2(mkdir, const char __user *, pathname, umode_t, mode)
 	return do_mkdirat(AT_FDCWD, getname(pathname), mode);
 }
 
-/**
- * vfs_rmdir - remove directory
- * @idmap:	idmap of the mount the inode was found from
- * @dir:	inode of @dentry
- * @dentry:	pointer to dentry of the base directory
- *
- * Remove a directory.
- *
- * If the inode has been found through an idmapped mount the idmap of
- * the vfsmount must be passed through @idmap. This function will then take
- * care to map the inode according to @idmap before checking permissions.
- * On non-idmapped mounts or if permission checking is to be performed on the
- * raw inode simply pass @nop_mnt_idmap.
- */
-int vfs_rmdir(struct mnt_idmap *idmap, struct inode *dir,
+static int vfs_rmdir_raw(struct mnt_idmap *idmap, struct inode *dir,
 		     struct dentry *dentry)
 {
 	int error = may_delete(idmap, dir, dentry, 1);
@@ -4217,18 +4203,43 @@ int vfs_rmdir(struct mnt_idmap *idmap, struct inode *dir,
 	if (error)
 		goto out;
 
-	shrink_dcache_parent(dentry);
 	dentry->d_inode->i_flags |= S_DEAD;
 	dont_mount(dentry);
 	detach_mounts(dentry);
-
 out:
 	inode_unlock(dentry->d_inode);
 	dput(dentry);
-	if (!error)
-		d_delete_notify(dir, dentry);
 	return error;
 }
+
+static inline void vfs_rmdir_cleanup(struct inode *dir, struct dentry *dentry)
+{
+	shrink_dcache_parent(dentry);
+	d_delete_notify(dir, dentry);
+}
+
+/**
+ * vfs_rmdir - remove directory
+ * @idmap:	idmap of the mount the inode was found from
+ * @dir:	inode of @dentry
+ * @dentry:	pointer to dentry of the base directory
+ *
+ * Remove a directory.
+ *
+ * If the inode has been found through an idmapped mount the idmap of
+ * the vfsmount must be passed through @idmap. This function will then take
+ * care to map the inode according to @idmap before checking permissions.
+ * On non-idmapped mounts or if permission checking is to be performed on the
+ * raw inode simply pass @nop_mnt_idmap.
+ */
+int vfs_rmdir(struct mnt_idmap *idmap, struct inode *dir,
+		     struct dentry *dentry)
+{
+	int retval = vfs_rmdir_raw(idmap, dir, dentry);
+	if (!retval)
+		vfs_rmdir_cleanup(dir, dentry);
+	return retval;
+}
 EXPORT_SYMBOL(vfs_rmdir);
 
 int do_rmdir(int dfd, struct filename *name)
@@ -4272,7 +4283,17 @@ int do_rmdir(int dfd, struct filename *name)
 	error = security_path_rmdir(&path, dentry);
 	if (error)
 		goto exit4;
-	error = vfs_rmdir(mnt_idmap(path.mnt), path.dentry->d_inode, dentry);
+	error = vfs_rmdir_raw(mnt_idmap(path.mnt), path.dentry->d_inode, dentry);
+	if (error)
+		goto exit4;
+	inode_unlock(path.dentry->d_inode);
+	mnt_drop_write(path.mnt);
+	vfs_rmdir_cleanup(path.dentry->d_inode, dentry);
+	dput(dentry);
+	path_put(&path);
+	putname(name);
+	return 0;
+
 exit4:
 	dput(dentry);
 exit3:
-- 
2.44.0.330.g4d18c88175


^ permalink raw reply related	[relevance 7%]

* [Buildroot] [git commit] package/ustreamer: new package
@ 2024-05-11 11:56  4% Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 200+ results
From: Thomas Petazzoni via buildroot @ 2024-05-11 11:56 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=142fec6cbd8f6af0eb21cdf38ebbdf8dbea8724c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Lightweight and fast MJPEG-HTTP streamer
(https://github.com/pikvm/ustreamer/tree/master#%C2%B5streamer)

Signed-off-by: Kadambini Nema <kadambini.nema@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 DEVELOPERS                       |  3 +++
 package/Config.in                |  1 +
 package/ustreamer/Config.in      | 21 +++++++++++++++++++++
 package/ustreamer/ustreamer.hash |  3 +++
 package/ustreamer/ustreamer.mk   | 40 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 68 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index cb8a69a36a..1c0cd336ca 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1920,6 +1920,9 @@ F:	package/easy-rsa/
 N:	Justin Maggard <jmaggard@netgear.com>
 F:	package/dtach/
 
+N:	Kadambini Nema <kadambini.nema@gmail.com>
+F:	package/ustreamer/
+
 N:	Kamel Bouhara <kamel.bouhara@gmail.com>
 F:	package/libodb-boost/
 F:	package/libodb-mysql/
diff --git a/package/Config.in b/package/Config.in
index c7bad67553..edc56290ea 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2609,6 +2609,7 @@ endif
 	source "package/uredir/Config.in"
 	source "package/ushare/Config.in"
 	source "package/ussp-push/Config.in"
+	source "package/ustreamer/Config.in"
 	source "package/vde2/Config.in"
 	source "package/vdr/Config.in"
 	source "package/vdr-plugin-vnsiserver/Config.in"
diff --git a/package/ustreamer/Config.in b/package/ustreamer/Config.in
new file mode 100644
index 0000000000..79c22ee691
--- /dev/null
+++ b/package/ustreamer/Config.in
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_USTREAMER
+	bool "ustreamer"
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 # V4L2_EVENT_SOURCE_CHANGE
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libbsd
+	depends on !BR2_STATIC_LIBS # libbsd
+	depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS # libbsd
+	depends on BR2_USE_WCHAR # libbsd
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBBSD
+	select BR2_PACKAGE_LIBEVENT
+	help
+	  Lightweight and fast MJPEG-HTTP streamer
+
+	  https://github.com/pikvm/ustreamer
+
+comment "ustreamer needs a toolchain w/ headers >= 3.16, threads, dynamic library, wchar"
+	depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 || \
+		!BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_STATIC_LIBS || \
+		!BR2_USE_WCHAR
diff --git a/package/ustreamer/ustreamer.hash b/package/ustreamer/ustreamer.hash
new file mode 100644
index 0000000000..d3f603e0c8
--- /dev/null
+++ b/package/ustreamer/ustreamer.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  88f107e02a0b5c6493d55ed1bce0c85f66ce83d2bc0271ff6319ad593c6584bc  ustreamer-5.51.tar.gz
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE
diff --git a/package/ustreamer/ustreamer.mk b/package/ustreamer/ustreamer.mk
new file mode 100644
index 0000000000..dc8577b5e9
--- /dev/null
+++ b/package/ustreamer/ustreamer.mk
@@ -0,0 +1,40 @@
+################################################################################
+#
+# ustreamer
+#
+################################################################################
+
+USTREAMER_VERSION = 5.51
+USTREAMER_SITE = $(call github,pikvm,ustreamer,v$(USTREAMER_VERSION))
+USTREAMER_LICENSE = GPL-3.0+
+USTREAMER_LICENSE_FILES = LICENSE
+USTREAMER_DEPENDENCIES = jpeg libevent libbsd
+
+USTREAMER_MAKE_OPTS = \
+	$(TARGET_CONFIGURE_OPTS) \
+	WITH_PTHREAD_NP=1 \
+	WITH_SETPROCTITLE=1 \
+	HAS_PDEATHSIG=1
+
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+USTREAMER_MAKE_OPTS += WITH_SYSTEMD=1
+USTREAMER_DEPENDENCIES += systemd
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGPIOD),y)
+USTREAMER_MAKE_OPTS += WITH_GPIO=1
+USTREAMER_DEPENDENCIES += libgpiod
+endif
+
+define USTREAMER_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(USTREAMER_MAKE_OPTS) -C $(@D)
+endef
+
+define USTREAMER_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/ustreamer \
+		$(TARGET_DIR)/usr/bin/ustreamer
+	$(INSTALL) -D -m 0755 $(@D)/ustreamer-dump \
+		$(TARGET_DIR)/usr/bin/ustreamer-dump
+endef
+
+$(eval $(generic-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[relevance 4%]

* ✗ Fi.CI.IGT: failure for drm/i915: skl+ plane register stuff
  @ 2024-05-11 20:02  1% ` Patchwork
  0 siblings, 0 replies; 200+ results
From: Patchwork @ 2024-05-11 20:02 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 88224 bytes --]

== Series Details ==

Series: drm/i915: skl+ plane register stuff
URL   : https://patchwork.freedesktop.org/series/133458/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14747_full -> Patchwork_133458v1_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_133458v1_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133458v1_full, please notify your bug team (&#x27;I915-ci-infra@lists.freedesktop.org&#x27;) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (9 -> 9)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_133458v1_full:

### IGT changes ###

#### Possible regressions ####

  * igt@api_intel_bb@render-ccs:
    - shard-dg2:          NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@api_intel_bb@render-ccs.html

  
Known issues
------------

  Here are the changes found in Patchwork_133458v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@api_intel_bb@blit-reloc-keep-cache:
    - shard-mtlp:         NOTRUN -> [SKIP][2] ([i915#8411])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@api_intel_bb@blit-reloc-keep-cache.html

  * igt@api_intel_bb@blit-reloc-purge-cache:
    - shard-dg1:          NOTRUN -> [SKIP][3] ([i915#8411]) +1 other test skip
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@api_intel_bb@blit-reloc-purge-cache.html

  * igt@api_intel_bb@crc32:
    - shard-dg1:          NOTRUN -> [SKIP][4] ([i915#6230])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@api_intel_bb@crc32.html

  * igt@core_getversion@basic:
    - shard-rkl:          NOTRUN -> [CRASH][5] ([i915#11072])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@core_getversion@basic.html

  * igt@device_reset@unbind-cold-reset-rebind:
    - shard-dg2:          NOTRUN -> [SKIP][6] ([i915#11078])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@device_reset@unbind-cold-reset-rebind.html

  * igt@drm_fdinfo@busy-hang@rcs0:
    - shard-mtlp:         NOTRUN -> [SKIP][7] ([i915#8414]) +6 other tests skip
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@drm_fdinfo@busy-hang@rcs0.html

  * igt@drm_fdinfo@busy-idle@bcs0:
    - shard-dg2:          NOTRUN -> [SKIP][8] ([i915#8414]) +14 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@drm_fdinfo@busy-idle@bcs0.html

  * igt@drm_fdinfo@busy-idle@vcs1:
    - shard-dg1:          NOTRUN -> [SKIP][9] ([i915#8414]) +9 other tests skip
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@drm_fdinfo@busy-idle@vcs1.html

  * igt@gem_busy@semaphore:
    - shard-dg2:          NOTRUN -> [SKIP][10] ([i915#3936])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@gem_busy@semaphore.html

  * igt@gem_ccs@ctrl-surf-copy:
    - shard-dg1:          NOTRUN -> [SKIP][11] ([i915#3555] / [i915#9323])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@gem_ccs@ctrl-surf-copy.html

  * igt@gem_ccs@suspend-resume:
    - shard-dg1:          NOTRUN -> [SKIP][12] ([i915#9323])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gem_ccs@suspend-resume.html

  * igt@gem_close_race@multigpu-basic-process:
    - shard-mtlp:         NOTRUN -> [SKIP][13] ([i915#7697])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_close_race@multigpu-basic-process.html

  * igt@gem_close_race@multigpu-basic-threads:
    - shard-rkl:          NOTRUN -> [SKIP][14] ([i915#7697])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gem_close_race@multigpu-basic-threads.html

  * igt@gem_create@create-ext-set-pat:
    - shard-dg2:          NOTRUN -> [SKIP][15] ([i915#8562])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@gem_create@create-ext-set-pat.html

  * igt@gem_ctx_exec@basic-nohangcheck:
    - shard-tglu:         [PASS][16] -> [FAIL][17] ([i915#6268])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-tglu-4/igt@gem_ctx_exec@basic-nohangcheck.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@gem_ctx_exec@basic-nohangcheck.html

  * igt@gem_ctx_persistence@hang:
    - shard-mtlp:         NOTRUN -> [SKIP][18] ([i915#8555])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-6/igt@gem_ctx_persistence@hang.html

  * igt@gem_ctx_persistence@heartbeat-close:
    - shard-dg1:          NOTRUN -> [SKIP][19] ([i915#8555]) +1 other test skip
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gem_ctx_persistence@heartbeat-close.html
    - shard-dg2:          NOTRUN -> [SKIP][20] ([i915#8555])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@gem_ctx_persistence@heartbeat-close.html

  * igt@gem_ctx_sseu@engines:
    - shard-rkl:          NOTRUN -> [SKIP][21] ([i915#280])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-5/igt@gem_ctx_sseu@engines.html

  * igt@gem_ctx_sseu@invalid-sseu:
    - shard-dg1:          NOTRUN -> [SKIP][22] ([i915#280])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@gem_ctx_sseu@invalid-sseu.html

  * igt@gem_eio@kms:
    - shard-dg2:          NOTRUN -> [INCOMPLETE][23] ([i915#10513])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@gem_eio@kms.html

  * igt@gem_eio@reset-stress:
    - shard-dg1:          [PASS][24] -> [FAIL][25] ([i915#5784])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg1-18/igt@gem_eio@reset-stress.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@gem_eio@reset-stress.html

  * igt@gem_exec_balancer@bonded-false-hang:
    - shard-dg2:          NOTRUN -> [SKIP][26] ([i915#4812])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_exec_balancer@bonded-false-hang.html

  * igt@gem_exec_balancer@bonded-sync:
    - shard-dg2:          NOTRUN -> [SKIP][27] ([i915#4771])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@gem_exec_balancer@bonded-sync.html
    - shard-dg1:          NOTRUN -> [SKIP][28] ([i915#4771])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gem_exec_balancer@bonded-sync.html

  * igt@gem_exec_balancer@invalid-bonds:
    - shard-dg1:          NOTRUN -> [SKIP][29] ([i915#4036])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@gem_exec_balancer@invalid-bonds.html

  * igt@gem_exec_balancer@parallel-ordering:
    - shard-rkl:          NOTRUN -> [SKIP][30] ([i915#4525])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gem_exec_balancer@parallel-ordering.html

  * igt@gem_exec_capture@many-4k-incremental:
    - shard-rkl:          NOTRUN -> [FAIL][31] ([i915#9606])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gem_exec_capture@many-4k-incremental.html

  * igt@gem_exec_capture@many-4k-zero:
    - shard-dg1:          NOTRUN -> [FAIL][32] ([i915#9606])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@gem_exec_capture@many-4k-zero.html

  * igt@gem_exec_fair@basic-flow:
    - shard-mtlp:         NOTRUN -> [SKIP][33] ([i915#4473] / [i915#4771])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_exec_fair@basic-flow.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-tglu:         NOTRUN -> [FAIL][34] ([i915#2842])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-none-vip:
    - shard-dg2:          NOTRUN -> [SKIP][35] ([i915#3539] / [i915#4852])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_exec_fair@basic-none-vip.html

  * igt@gem_exec_fair@basic-none@rcs0:
    - shard-rkl:          [PASS][36] -> [FAIL][37] ([i915#2842]) +1 other test fail
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-rkl-6/igt@gem_exec_fair@basic-none@rcs0.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@gem_exec_fair@basic-none@rcs0.html

  * igt@gem_exec_fair@basic-pace:
    - shard-dg1:          NOTRUN -> [SKIP][38] ([i915#3539]) +1 other test skip
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gem_exec_fair@basic-pace.html

  * igt@gem_exec_fair@basic-pace-solo:
    - shard-dg2:          NOTRUN -> [SKIP][39] ([i915#3539]) +3 other tests skip
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@gem_exec_fair@basic-pace-solo.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [PASS][40] -> [FAIL][41] ([i915#2842])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-glk8/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_flush@basic-uc-rw-default:
    - shard-dg1:          NOTRUN -> [SKIP][42] ([i915#3539] / [i915#4852]) +4 other tests skip
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@gem_exec_flush@basic-uc-rw-default.html

  * igt@gem_exec_reloc@basic-cpu-read-noreloc:
    - shard-mtlp:         NOTRUN -> [SKIP][43] ([i915#3281]) +8 other tests skip
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_exec_reloc@basic-cpu-read-noreloc.html

  * igt@gem_exec_reloc@basic-gtt-cpu:
    - shard-dg1:          NOTRUN -> [SKIP][44] ([i915#3281]) +4 other tests skip
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gem_exec_reloc@basic-gtt-cpu.html

  * igt@gem_exec_reloc@basic-gtt-read-active:
    - shard-dg2:          NOTRUN -> [SKIP][45] ([i915#3281]) +7 other tests skip
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_exec_reloc@basic-gtt-read-active.html

  * igt@gem_exec_reloc@basic-gtt-wc:
    - shard-rkl:          NOTRUN -> [SKIP][46] ([i915#3281]) +5 other tests skip
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gem_exec_reloc@basic-gtt-wc.html

  * igt@gem_exec_schedule@preempt-queue:
    - shard-dg2:          NOTRUN -> [SKIP][47] ([i915#4537] / [i915#4812])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_exec_schedule@preempt-queue.html

  * igt@gem_exec_schedule@preempt-queue-contexts:
    - shard-mtlp:         NOTRUN -> [SKIP][48] ([i915#4537] / [i915#4812]) +1 other test skip
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_exec_schedule@preempt-queue-contexts.html

  * igt@gem_fence_thrash@bo-write-verify-none:
    - shard-dg1:          NOTRUN -> [SKIP][49] ([i915#4860]) +1 other test skip
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@gem_fence_thrash@bo-write-verify-none.html

  * igt@gem_fenced_exec_thrash@no-spare-fences-busy-interruptible:
    - shard-mtlp:         NOTRUN -> [SKIP][50] ([i915#4860])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_fenced_exec_thrash@no-spare-fences-busy-interruptible.html

  * igt@gem_lmem_swapping@basic:
    - shard-mtlp:         NOTRUN -> [SKIP][51] ([i915#4613]) +2 other tests skip
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_lmem_swapping@basic.html

  * igt@gem_lmem_swapping@basic@lmem0:
    - shard-dg2:          [PASS][52] -> [FAIL][53] ([i915#10378]) +1 other test fail
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-1/igt@gem_lmem_swapping@basic@lmem0.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_lmem_swapping@basic@lmem0.html

  * igt@gem_lmem_swapping@heavy-verify-random-ccs@lmem0:
    - shard-dg1:          NOTRUN -> [SKIP][54] ([i915#4565]) +1 other test skip
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@gem_lmem_swapping@heavy-verify-random-ccs@lmem0.html

  * igt@gem_lmem_swapping@parallel-random-verify-ccs:
    - shard-rkl:          NOTRUN -> [SKIP][55] ([i915#4613]) +3 other tests skip
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gem_lmem_swapping@parallel-random-verify-ccs.html

  * igt@gem_lmem_swapping@verify:
    - shard-glk:          NOTRUN -> [SKIP][56] ([i915#4613])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-glk7/igt@gem_lmem_swapping@verify.html

  * igt@gem_madvise@dontneed-before-exec:
    - shard-mtlp:         NOTRUN -> [SKIP][57] ([i915#3282]) +2 other tests skip
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_madvise@dontneed-before-exec.html

  * igt@gem_mmap_gtt@big-copy:
    - shard-dg2:          NOTRUN -> [SKIP][58] ([i915#4077]) +7 other tests skip
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@gem_mmap_gtt@big-copy.html

  * igt@gem_mmap_gtt@cpuset-basic-small-copy-xy:
    - shard-mtlp:         NOTRUN -> [SKIP][59] ([i915#4077])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_mmap_gtt@cpuset-basic-small-copy-xy.html

  * igt@gem_mmap_gtt@flink-race:
    - shard-dg1:          NOTRUN -> [SKIP][60] ([i915#4077]) +10 other tests skip
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@gem_mmap_gtt@flink-race.html

  * igt@gem_mmap_wc@write-cpu-read-wc-unflushed:
    - shard-mtlp:         NOTRUN -> [SKIP][61] ([i915#4083]) +2 other tests skip
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_mmap_wc@write-cpu-read-wc-unflushed.html

  * igt@gem_mmap_wc@write-prefaulted:
    - shard-dg2:          NOTRUN -> [SKIP][62] ([i915#4083]) +7 other tests skip
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_mmap_wc@write-prefaulted.html

  * igt@gem_mmap_wc@write-read:
    - shard-dg1:          NOTRUN -> [SKIP][63] ([i915#4083]) +6 other tests skip
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gem_mmap_wc@write-read.html

  * igt@gem_partial_pwrite_pread@reads:
    - shard-dg1:          NOTRUN -> [SKIP][64] ([i915#3282]) +5 other tests skip
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@gem_partial_pwrite_pread@reads.html

  * igt@gem_partial_pwrite_pread@writes-after-reads-uncached:
    - shard-rkl:          NOTRUN -> [SKIP][65] ([i915#3282]) +5 other tests skip
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html

  * igt@gem_pxp@create-regular-context-1:
    - shard-tglu:         NOTRUN -> [SKIP][66] ([i915#4270])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@gem_pxp@create-regular-context-1.html

  * igt@gem_pxp@protected-encrypted-src-copy-not-readible:
    - shard-dg1:          NOTRUN -> [SKIP][67] ([i915#4270]) +3 other tests skip
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@gem_pxp@protected-encrypted-src-copy-not-readible.html

  * igt@gem_pxp@protected-raw-src-copy-not-readible:
    - shard-mtlp:         NOTRUN -> [SKIP][68] ([i915#4270])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_pxp@protected-raw-src-copy-not-readible.html

  * igt@gem_pxp@regular-baseline-src-copy-readible:
    - shard-dg2:          NOTRUN -> [SKIP][69] ([i915#4270]) +3 other tests skip
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@gem_pxp@regular-baseline-src-copy-readible.html

  * igt@gem_pxp@verify-pxp-execution-after-suspend-resume:
    - shard-rkl:          NOTRUN -> [SKIP][70] ([i915#4270]) +1 other test skip
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-5/igt@gem_pxp@verify-pxp-execution-after-suspend-resume.html

  * igt@gem_readwrite@write-bad-handle:
    - shard-dg2:          NOTRUN -> [SKIP][71] ([i915#3282])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@gem_readwrite@write-bad-handle.html

  * igt@gem_render_copy@y-tiled-to-vebox-x-tiled:
    - shard-dg2:          NOTRUN -> [SKIP][72] ([i915#5190] / [i915#8428]) +1 other test skip
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_render_copy@y-tiled-to-vebox-x-tiled.html

  * igt@gem_render_copy@yf-tiled-ccs-to-yf-tiled:
    - shard-mtlp:         NOTRUN -> [SKIP][73] ([i915#8428]) +3 other tests skip
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gem_render_copy@yf-tiled-ccs-to-yf-tiled.html

  * igt@gem_set_tiling_vs_blt@tiled-to-untiled:
    - shard-rkl:          NOTRUN -> [SKIP][74] ([i915#8411])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@gem_set_tiling_vs_blt@tiled-to-untiled.html

  * igt@gem_set_tiling_vs_gtt:
    - shard-dg1:          NOTRUN -> [SKIP][75] ([i915#4079]) +1 other test skip
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@gem_set_tiling_vs_gtt.html

  * igt@gem_softpin@evict-snoop-interruptible:
    - shard-dg2:          NOTRUN -> [SKIP][76] ([i915#4885])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@gem_softpin@evict-snoop-interruptible.html

  * igt@gem_unfence_active_buffers:
    - shard-dg1:          NOTRUN -> [SKIP][77] ([i915#4879])
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gem_unfence_active_buffers.html
    - shard-dg2:          NOTRUN -> [SKIP][78] ([i915#4879])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@gem_unfence_active_buffers.html

  * igt@gem_userptr_blits@coherency-unsync:
    - shard-rkl:          NOTRUN -> [SKIP][79] ([i915#3297]) +1 other test skip
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gem_userptr_blits@coherency-unsync.html

  * igt@gem_userptr_blits@create-destroy-unsync:
    - shard-dg1:          NOTRUN -> [SKIP][80] ([i915#3297]) +2 other tests skip
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@gem_userptr_blits@create-destroy-unsync.html

  * igt@gem_userptr_blits@dmabuf-unsync:
    - shard-dg2:          NOTRUN -> [SKIP][81] ([i915#3297]) +2 other tests skip
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@gem_userptr_blits@dmabuf-unsync.html

  * igt@gen9_exec_parse@batch-without-end:
    - shard-tglu:         NOTRUN -> [SKIP][82] ([i915#2527] / [i915#2856])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@gen9_exec_parse@batch-without-end.html

  * igt@gen9_exec_parse@bb-chained:
    - shard-rkl:          NOTRUN -> [SKIP][83] ([i915#2527]) +2 other tests skip
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@gen9_exec_parse@bb-chained.html

  * igt@gen9_exec_parse@bb-secure:
    - shard-dg1:          NOTRUN -> [SKIP][84] ([i915#2527]) +2 other tests skip
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@gen9_exec_parse@bb-secure.html

  * igt@gen9_exec_parse@bb-start-param:
    - shard-mtlp:         NOTRUN -> [SKIP][85] ([i915#2856]) +2 other tests skip
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@gen9_exec_parse@bb-start-param.html

  * igt@gen9_exec_parse@unaligned-access:
    - shard-dg2:          NOTRUN -> [SKIP][86] ([i915#2856]) +4 other tests skip
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@gen9_exec_parse@unaligned-access.html

  * igt@i915_module_load@load:
    - shard-rkl:          NOTRUN -> [SKIP][87] ([i915#6227])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@i915_module_load@load.html

  * igt@i915_module_load@reload-with-fault-injection:
    - shard-mtlp:         [PASS][88] -> [ABORT][89] ([i915#10131] / [i915#9820])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-mtlp-1/igt@i915_module_load@reload-with-fault-injection.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-7/igt@i915_module_load@reload-with-fault-injection.html

  * igt@i915_module_load@resize-bar:
    - shard-mtlp:         NOTRUN -> [SKIP][90] ([i915#6412])
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@i915_module_load@resize-bar.html

  * igt@i915_pm_freq_mult@media-freq@gt0:
    - shard-dg1:          NOTRUN -> [SKIP][91] ([i915#6590])
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@i915_pm_freq_mult@media-freq@gt0.html

  * igt@i915_pm_rps@min-max-config-idle:
    - shard-mtlp:         NOTRUN -> [SKIP][92] ([i915#6621])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@i915_pm_rps@min-max-config-idle.html

  * igt@i915_pm_rps@waitboost:
    - shard-mtlp:         NOTRUN -> [FAIL][93] ([i915#8346])
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@i915_pm_rps@waitboost.html

  * igt@i915_pm_sseu@full-enable:
    - shard-mtlp:         NOTRUN -> [SKIP][94] ([i915#8437])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@i915_pm_sseu@full-enable.html

  * igt@i915_query@query-topology-coherent-slice-mask:
    - shard-dg2:          NOTRUN -> [SKIP][95] ([i915#6188])
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@i915_query@query-topology-coherent-slice-mask.html

  * igt@i915_query@test-query-geometry-subslices:
    - shard-dg1:          NOTRUN -> [SKIP][96] ([i915#5723])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@i915_query@test-query-geometry-subslices.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
    - shard-mtlp:         NOTRUN -> [SKIP][97] ([i915#4212])
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_addfb_basic@basic-y-tiled-legacy.html

  * igt@kms_addfb_basic@bo-too-small-due-to-tiling:
    - shard-dg1:          NOTRUN -> [SKIP][98] ([i915#4212])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_addfb_basic@bo-too-small-due-to-tiling.html

  * igt@kms_addfb_basic@invalid-smem-bo-on-discrete:
    - shard-tglu:         NOTRUN -> [SKIP][99] ([i915#3826])
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_addfb_basic@invalid-smem-bo-on-discrete.html

  * igt@kms_async_flips@async-flip-with-page-flip-events@pipe-a-hdmi-a-1-y-rc-ccs-cc:
    - shard-rkl:          NOTRUN -> [SKIP][100] ([i915#8709]) +3 other tests skip
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-2/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-a-hdmi-a-1-y-rc-ccs-cc.html

  * igt@kms_async_flips@async-flip-with-page-flip-events@pipe-d-hdmi-a-3-4-mc-ccs:
    - shard-dg2:          NOTRUN -> [SKIP][101] ([i915#8709]) +11 other tests skip
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-6/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-d-hdmi-a-3-4-mc-ccs.html

  * igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
    - shard-mtlp:         NOTRUN -> [SKIP][102] ([i915#1769] / [i915#3555])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_atomic_transition@plane-all-modeset-transition-fencing.html

  * igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-hflip:
    - shard-rkl:          NOTRUN -> [SKIP][103] ([i915#5286]) +3 other tests skip
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-5/igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-hflip.html

  * igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-0-async-flip:
    - shard-tglu:         NOTRUN -> [SKIP][104] ([i915#5286]) +1 other test skip
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-0-async-flip.html

  * igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip:
    - shard-dg1:          NOTRUN -> [SKIP][105] ([i915#4538] / [i915#5286]) +3 other tests skip
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip.html

  * igt@kms_big_fb@linear-8bpp-rotate-270:
    - shard-rkl:          NOTRUN -> [SKIP][106] ([i915#3638]) +2 other tests skip
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_big_fb@linear-8bpp-rotate-270.html

  * igt@kms_big_fb@x-tiled-64bpp-rotate-180:
    - shard-mtlp:         [PASS][107] -> [FAIL][108] ([i915#5138])
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-mtlp-1/igt@kms_big_fb@x-tiled-64bpp-rotate-180.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-7/igt@kms_big_fb@x-tiled-64bpp-rotate-180.html

  * igt@kms_big_fb@x-tiled-64bpp-rotate-270:
    - shard-dg2:          NOTRUN -> [SKIP][109] +12 other tests skip
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_big_fb@x-tiled-64bpp-rotate-270.html

  * igt@kms_big_fb@y-tiled-64bpp-rotate-90:
    - shard-dg1:          NOTRUN -> [SKIP][110] ([i915#3638]) +1 other test skip
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_big_fb@y-tiled-64bpp-rotate-90.html

  * igt@kms_big_fb@y-tiled-addfb:
    - shard-dg2:          NOTRUN -> [SKIP][111] ([i915#5190]) +2 other tests skip
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@kms_big_fb@y-tiled-addfb.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
    - shard-dg2:          NOTRUN -> [SKIP][112] ([i915#4538] / [i915#5190]) +7 other tests skip
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-6/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180:
    - shard-mtlp:         NOTRUN -> [SKIP][113] +12 other tests skip
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
    - shard-dg1:          NOTRUN -> [SKIP][114] ([i915#4538]) +4 other tests skip
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html

  * igt@kms_big_joiner@basic-force-joiner:
    - shard-dg1:          NOTRUN -> [SKIP][115] ([i915#10656])
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_big_joiner@basic-force-joiner.html

  * igt@kms_big_joiner@invalid-modeset-force-joiner:
    - shard-rkl:          NOTRUN -> [SKIP][116] ([i915#10656])
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_big_joiner@invalid-modeset-force-joiner.html

  * igt@kms_ccs@bad-aux-stride-y-tiled-ccs@pipe-c-hdmi-a-4:
    - shard-dg1:          NOTRUN -> [SKIP][117] ([i915#6095]) +87 other tests skip
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@kms_ccs@bad-aux-stride-y-tiled-ccs@pipe-c-hdmi-a-4.html

  * igt@kms_ccs@bad-aux-stride-y-tiled-gen12-rc-ccs-cc@pipe-d-hdmi-a-1:
    - shard-dg2:          NOTRUN -> [SKIP][118] ([i915#10307] / [i915#10434] / [i915#6095]) +4 other tests skip
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-8/igt@kms_ccs@bad-aux-stride-y-tiled-gen12-rc-ccs-cc@pipe-d-hdmi-a-1.html

  * igt@kms_ccs@bad-rotation-90-4-tiled-dg2-mc-ccs@pipe-c-hdmi-a-1:
    - shard-tglu:         NOTRUN -> [SKIP][119] ([i915#6095]) +7 other tests skip
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_ccs@bad-rotation-90-4-tiled-dg2-mc-ccs@pipe-c-hdmi-a-1.html

  * igt@kms_ccs@bad-rotation-90-4-tiled-mtl-rc-ccs@pipe-b-hdmi-a-2:
    - shard-rkl:          NOTRUN -> [SKIP][120] ([i915#6095]) +87 other tests skip
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_ccs@bad-rotation-90-4-tiled-mtl-rc-ccs@pipe-b-hdmi-a-2.html

  * igt@kms_ccs@ccs-on-another-bo-yf-tiled-ccs@pipe-a-hdmi-a-3:
    - shard-dg2:          NOTRUN -> [SKIP][121] ([i915#10307] / [i915#6095]) +190 other tests skip
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-6/igt@kms_ccs@ccs-on-another-bo-yf-tiled-ccs@pipe-a-hdmi-a-3.html

  * igt@kms_ccs@crc-primary-basic-4-tiled-xe2-ccs:
    - shard-dg1:          NOTRUN -> [SKIP][122] ([i915#10278])
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@kms_ccs@crc-primary-basic-4-tiled-xe2-ccs.html

  * igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-mc-ccs@pipe-c-hdmi-a-2:
    - shard-glk:          NOTRUN -> [SKIP][123] +57 other tests skip
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-glk7/igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-mc-ccs@pipe-c-hdmi-a-2.html

  * igt@kms_ccs@crc-primary-rotation-180-4-tiled-xe2-ccs:
    - shard-rkl:          NOTRUN -> [SKIP][124] ([i915#10278]) +1 other test skip
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_ccs@crc-primary-rotation-180-4-tiled-xe2-ccs.html

  * igt@kms_ccs@crc-sprite-planes-basic-4-tiled-xe2-ccs:
    - shard-mtlp:         NOTRUN -> [SKIP][125] ([i915#10278])
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_ccs@crc-sprite-planes-basic-4-tiled-xe2-ccs.html

  * igt@kms_ccs@missing-ccs-buffer-yf-tiled-ccs@pipe-a-edp-1:
    - shard-mtlp:         NOTRUN -> [SKIP][126] ([i915#6095]) +27 other tests skip
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-6/igt@kms_ccs@missing-ccs-buffer-yf-tiled-ccs@pipe-a-edp-1.html

  * igt@kms_cdclk@mode-transition:
    - shard-tglu:         NOTRUN -> [SKIP][127] ([i915#3742])
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_cdclk@mode-transition.html

  * igt@kms_cdclk@mode-transition-all-outputs:
    - shard-dg1:          NOTRUN -> [SKIP][128] ([i915#3742])
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_cdclk@mode-transition-all-outputs.html

  * igt@kms_cdclk@mode-transition@pipe-d-hdmi-a-1:
    - shard-dg2:          NOTRUN -> [SKIP][129] ([i915#7213]) +3 other tests skip
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-8/igt@kms_cdclk@mode-transition@pipe-d-hdmi-a-1.html

  * igt@kms_cdclk@plane-scaling@pipe-b-hdmi-a-3:
    - shard-dg2:          NOTRUN -> [SKIP][130] ([i915#4087]) +3 other tests skip
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_cdclk@plane-scaling@pipe-b-hdmi-a-3.html

  * igt@kms_chamelium_audio@dp-audio:
    - shard-mtlp:         NOTRUN -> [SKIP][131] ([i915#7828]) +3 other tests skip
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_chamelium_audio@dp-audio.html

  * igt@kms_chamelium_edid@dp-edid-stress-resolution-non-4k:
    - shard-dg2:          NOTRUN -> [SKIP][132] ([i915#7828]) +4 other tests skip
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_chamelium_edid@dp-edid-stress-resolution-non-4k.html

  * igt@kms_chamelium_frames@dp-crc-single:
    - shard-dg1:          NOTRUN -> [SKIP][133] ([i915#7828]) +7 other tests skip
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_chamelium_frames@dp-crc-single.html

  * igt@kms_chamelium_frames@vga-frame-dump:
    - shard-rkl:          NOTRUN -> [SKIP][134] ([i915#7828]) +7 other tests skip
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_chamelium_frames@vga-frame-dump.html

  * igt@kms_chamelium_hpd@vga-hpd-with-enabled-mode:
    - shard-tglu:         NOTRUN -> [SKIP][135] ([i915#7828]) +1 other test skip
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_chamelium_hpd@vga-hpd-with-enabled-mode.html

  * igt@kms_content_protection@content-type-change:
    - shard-tglu:         NOTRUN -> [SKIP][136] ([i915#6944] / [i915#9424])
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_content_protection@content-type-change.html

  * igt@kms_content_protection@dp-mst-lic-type-1:
    - shard-dg2:          NOTRUN -> [SKIP][137] ([i915#3299])
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_content_protection@dp-mst-lic-type-1.html
    - shard-dg1:          NOTRUN -> [SKIP][138] ([i915#3299])
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_content_protection@dp-mst-lic-type-1.html

  * igt@kms_content_protection@legacy:
    - shard-rkl:          NOTRUN -> [SKIP][139] ([i915#7118] / [i915#9424])
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_content_protection@legacy.html

  * igt@kms_content_protection@lic-type-0:
    - shard-dg2:          NOTRUN -> [SKIP][140] ([i915#9424]) +1 other test skip
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-10/igt@kms_content_protection@lic-type-0.html
    - shard-rkl:          NOTRUN -> [SKIP][141] ([i915#9424])
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_content_protection@lic-type-0.html

  * igt@kms_content_protection@mei-interface:
    - shard-mtlp:         NOTRUN -> [SKIP][142] ([i915#8063] / [i915#9433])
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_content_protection@mei-interface.html

  * igt@kms_content_protection@type1:
    - shard-dg2:          NOTRUN -> [SKIP][143] ([i915#7118] / [i915#9424]) +1 other test skip
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@kms_content_protection@type1.html

  * igt@kms_cursor_crc@cursor-offscreen-max-size:
    - shard-tglu:         NOTRUN -> [SKIP][144] ([i915#3555]) +2 other tests skip
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_cursor_crc@cursor-offscreen-max-size.html

  * igt@kms_cursor_crc@cursor-onscreen-512x512:
    - shard-dg2:          NOTRUN -> [SKIP][145] ([i915#3359])
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_cursor_crc@cursor-onscreen-512x512.html

  * igt@kms_cursor_crc@cursor-random-512x170:
    - shard-rkl:          NOTRUN -> [SKIP][146] ([i915#3359]) +1 other test skip
   [146]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_cursor_crc@cursor-random-512x170.html

  * igt@kms_cursor_crc@cursor-random-512x512:
    - shard-dg1:          NOTRUN -> [SKIP][147] ([i915#3359]) +2 other tests skip
   [147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_cursor_crc@cursor-random-512x512.html

  * igt@kms_cursor_crc@cursor-rapid-movement-64x21:
    - shard-mtlp:         NOTRUN -> [SKIP][148] ([i915#8814]) +1 other test skip
   [148]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_cursor_crc@cursor-rapid-movement-64x21.html

  * igt@kms_cursor_crc@cursor-sliding-512x512:
    - shard-mtlp:         NOTRUN -> [SKIP][149] ([i915#3359])
   [149]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_cursor_crc@cursor-sliding-512x512.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - shard-rkl:          NOTRUN -> [SKIP][150] ([i915#4103]) +1 other test skip
   [150]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_cursor_legacy@cursora-vs-flipb-atomic:
    - shard-mtlp:         NOTRUN -> [SKIP][151] ([i915#9809]) +1 other test skip
   [151]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_cursor_legacy@cursora-vs-flipb-atomic.html

  * igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size:
    - shard-rkl:          NOTRUN -> [SKIP][152] +44 other tests skip
   [152]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions:
    - shard-mtlp:         NOTRUN -> [SKIP][153] ([i915#4213])
   [153]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html

  * igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size:
    - shard-dg1:          NOTRUN -> [SKIP][154] ([i915#4103] / [i915#4213]) +1 other test skip
   [154]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@torture-move@pipe-a:
    - shard-tglu:         [PASS][155] -> [DMESG-WARN][156] ([i915#10166] / [i915#1982])
   [155]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-tglu-3/igt@kms_cursor_legacy@torture-move@pipe-a.html
   [156]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-3/igt@kms_cursor_legacy@torture-move@pipe-a.html

  * igt@kms_dirtyfb@fbc-dirtyfb-ioctl@a-dp-4:
    - shard-dg2:          NOTRUN -> [SKIP][157] ([i915#9227])
   [157]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_dirtyfb@fbc-dirtyfb-ioctl@a-dp-4.html

  * igt@kms_dirtyfb@fbc-dirtyfb-ioctl@a-hdmi-a-2:
    - shard-rkl:          NOTRUN -> [SKIP][158] ([i915#9723])
   [158]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-1/igt@kms_dirtyfb@fbc-dirtyfb-ioctl@a-hdmi-a-2.html

  * igt@kms_dirtyfb@psr-dirtyfb-ioctl:
    - shard-dg1:          NOTRUN -> [SKIP][159] ([i915#9723])
   [159]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_dirtyfb@psr-dirtyfb-ioctl.html
    - shard-dg2:          NOTRUN -> [SKIP][160] ([i915#9833])
   [160]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_dirtyfb@psr-dirtyfb-ioctl.html

  * igt@kms_display_modes@extended-mode-basic:
    - shard-dg2:          NOTRUN -> [SKIP][161] ([i915#3555]) +3 other tests skip
   [161]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_display_modes@extended-mode-basic.html

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-1:
    - shard-tglu:         NOTRUN -> [SKIP][162] ([i915#3804])
   [162]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-1.html

  * igt@kms_dp_aux_dev:
    - shard-dg2:          NOTRUN -> [SKIP][163] ([i915#1257])
   [163]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-6/igt@kms_dp_aux_dev.html

  * igt@kms_draw_crc@draw-method-mmap-gtt:
    - shard-dg1:          NOTRUN -> [SKIP][164] ([i915#8812])
   [164]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_draw_crc@draw-method-mmap-gtt.html

  * igt@kms_dsc@dsc-basic:
    - shard-dg2:          NOTRUN -> [SKIP][165] ([i915#3555] / [i915#3840]) +1 other test skip
   [165]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@kms_dsc@dsc-basic.html

  * igt@kms_dsc@dsc-fractional-bpp:
    - shard-rkl:          NOTRUN -> [SKIP][166] ([i915#3840])
   [166]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_dsc@dsc-fractional-bpp.html

  * igt@kms_dsc@dsc-with-formats:
    - shard-mtlp:         NOTRUN -> [SKIP][167] ([i915#3555] / [i915#3840])
   [167]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_dsc@dsc-with-formats.html

  * igt@kms_feature_discovery@display-3x:
    - shard-rkl:          NOTRUN -> [SKIP][168] ([i915#1839])
   [168]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_feature_discovery@display-3x.html

  * igt@kms_feature_discovery@display-4x:
    - shard-dg1:          NOTRUN -> [SKIP][169] ([i915#1839])
   [169]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_feature_discovery@display-4x.html

  * igt@kms_feature_discovery@dp-mst:
    - shard-mtlp:         NOTRUN -> [SKIP][170] ([i915#9337])
   [170]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_feature_discovery@dp-mst.html

  * igt@kms_flip@2x-flip-vs-dpms:
    - shard-mtlp:         NOTRUN -> [SKIP][171] ([i915#3637]) +5 other tests skip
   [171]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_flip@2x-flip-vs-dpms.html

  * igt@kms_flip@2x-flip-vs-fences:
    - shard-dg1:          NOTRUN -> [SKIP][172] ([i915#8381]) +1 other test skip
   [172]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_flip@2x-flip-vs-fences.html
    - shard-dg2:          NOTRUN -> [SKIP][173] ([i915#8381])
   [173]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_flip@2x-flip-vs-fences.html

  * igt@kms_flip@2x-flip-vs-panning-interruptible:
    - shard-tglu:         NOTRUN -> [SKIP][174] ([i915#3637])
   [174]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_flip@2x-flip-vs-panning-interruptible.html

  * igt@kms_flip@2x-plain-flip:
    - shard-dg1:          NOTRUN -> [SKIP][175] ([i915#9934]) +5 other tests skip
   [175]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_flip@2x-plain-flip.html

  * igt@kms_flip@flip-vs-panning-vs-hang@a-hdmi-a3:
    - shard-dg2:          NOTRUN -> [INCOMPLETE][176] ([i915#6113])
   [176]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-6/igt@kms_flip@flip-vs-panning-vs-hang@a-hdmi-a3.html

  * igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-valid-mode:
    - shard-dg1:          NOTRUN -> [SKIP][177] ([i915#2587] / [i915#2672]) +3 other tests skip
   [177]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-valid-mode.html

  * igt@kms_flip_scaled_crc@flip-32bpp-linear-to-64bpp-linear-downscaling@pipe-a-default-mode:
    - shard-mtlp:         NOTRUN -> [SKIP][178] ([i915#3555] / [i915#8810])
   [178]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_flip_scaled_crc@flip-32bpp-linear-to-64bpp-linear-downscaling@pipe-a-default-mode.html

  * igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-valid-mode:
    - shard-rkl:          NOTRUN -> [SKIP][179] ([i915#2672]) +4 other tests skip
   [179]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-valid-mode.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode:
    - shard-mtlp:         NOTRUN -> [SKIP][180] ([i915#2672])
   [180]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-downscaling@pipe-a-valid-mode:
    - shard-dg2:          NOTRUN -> [SKIP][181] ([i915#2672])
   [181]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-downscaling@pipe-a-valid-mode.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - shard-dg2:          NOTRUN -> [SKIP][182] ([i915#5274])
   [182]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_force_connector_basic@prune-stale-modes.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt:
    - shard-mtlp:         NOTRUN -> [SKIP][183] ([i915#8708]) +2 other tests skip
   [183]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-plflip-blt:
    - shard-dg2:          NOTRUN -> [SKIP][184] ([i915#5354]) +26 other tests skip
   [184]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-plflip-blt.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-msflip-blt:
    - shard-rkl:          NOTRUN -> [SKIP][185] ([i915#1825]) +34 other tests skip
   [185]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-5/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-msflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-render:
    - shard-dg1:          NOTRUN -> [SKIP][186] +41 other tests skip
   [186]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-shrfb-msflip-blt:
    - shard-tglu:         NOTRUN -> [SKIP][187] +17 other tests skip
   [187]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-shrfb-msflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-mmap-cpu:
    - shard-mtlp:         NOTRUN -> [SKIP][188] ([i915#1825]) +16 other tests skip
   [188]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-mmap-cpu.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-shrfb-fliptrack-mmap-gtt:
    - shard-dg2:          NOTRUN -> [SKIP][189] ([i915#8708]) +18 other tests skip
   [189]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_frontbuffer_tracking@fbcpsr-2p-shrfb-fliptrack-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-render:
    - shard-dg1:          NOTRUN -> [SKIP][190] ([i915#3458]) +15 other tests skip
   [190]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-tiling-4:
    - shard-dg1:          NOTRUN -> [SKIP][191] ([i915#5439])
   [191]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_frontbuffer_tracking@fbcpsr-tiling-4.html

  * igt@kms_frontbuffer_tracking@pipe-fbc-rte:
    - shard-rkl:          NOTRUN -> [SKIP][192] ([i915#9766])
   [192]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_frontbuffer_tracking@pipe-fbc-rte.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
    - shard-rkl:          NOTRUN -> [SKIP][193] ([i915#3023]) +24 other tests skip
   [193]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@psr-1p-rte:
    - shard-dg2:          NOTRUN -> [SKIP][194] ([i915#3458]) +13 other tests skip
   [194]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-6/igt@kms_frontbuffer_tracking@psr-1p-rte.html

  * igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-wc:
    - shard-dg1:          NOTRUN -> [SKIP][195] ([i915#8708]) +16 other tests skip
   [195]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-wc.html

  * igt@kms_hdr@invalid-metadata-sizes:
    - shard-dg2:          NOTRUN -> [SKIP][196] ([i915#3555] / [i915#8228]) +1 other test skip
   [196]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-10/igt@kms_hdr@invalid-metadata-sizes.html

  * igt@kms_hdr@static-swap:
    - shard-mtlp:         NOTRUN -> [SKIP][197] ([i915#3555] / [i915#8228])
   [197]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_hdr@static-swap.html

  * igt@kms_hdr@static-toggle-dpms:
    - shard-rkl:          NOTRUN -> [SKIP][198] ([i915#3555] / [i915#8228])
   [198]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@kms_hdr@static-toggle-dpms.html
    - shard-dg1:          NOTRUN -> [SKIP][199] ([i915#3555] / [i915#8228])
   [199]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@kms_hdr@static-toggle-dpms.html

  * igt@kms_panel_fitting@legacy:
    - shard-dg2:          NOTRUN -> [SKIP][200] ([i915#6301])
   [200]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_panel_fitting@legacy.html
    - shard-dg1:          NOTRUN -> [SKIP][201] ([i915#6301])
   [201]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_panel_fitting@legacy.html

  * igt@kms_plane_multiple@tiling-yf:
    - shard-rkl:          NOTRUN -> [SKIP][202] ([i915#3555]) +4 other tests skip
   [202]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-5/igt@kms_plane_multiple@tiling-yf.html

  * igt@kms_plane_scaling@intel-max-src-size:
    - shard-dg2:          NOTRUN -> [SKIP][203] ([i915#6953] / [i915#9423])
   [203]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_plane_scaling@intel-max-src-size.html

  * igt@kms_plane_scaling@intel-max-src-size@pipe-a-hdmi-a-2:
    - shard-rkl:          NOTRUN -> [FAIL][204] ([i915#8292])
   [204]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_plane_scaling@intel-max-src-size@pipe-a-hdmi-a-2.html

  * igt@kms_plane_scaling@plane-downscale-factor-0-25-with-pixel-format@pipe-a-dp-4:
    - shard-dg2:          NOTRUN -> [SKIP][205] ([i915#9423]) +7 other tests skip
   [205]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-pixel-format@pipe-a-dp-4.html

  * igt@kms_plane_scaling@plane-downscale-factor-0-5-with-rotation@pipe-a-hdmi-a-1:
    - shard-rkl:          NOTRUN -> [SKIP][206] ([i915#9423]) +11 other tests skip
   [206]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-5/igt@kms_plane_scaling@plane-downscale-factor-0-5-with-rotation@pipe-a-hdmi-a-1.html

  * igt@kms_plane_scaling@plane-scaler-unity-scaling-with-rotation@pipe-a-hdmi-a-1:
    - shard-tglu:         NOTRUN -> [SKIP][207] ([i915#9423]) +3 other tests skip
   [207]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_plane_scaling@plane-scaler-unity-scaling-with-rotation@pipe-a-hdmi-a-1.html

  * igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-rotation@pipe-a-hdmi-a-1:
    - shard-rkl:          NOTRUN -> [SKIP][208] ([i915#5176] / [i915#9423]) +1 other test skip
   [208]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-2/igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-rotation@pipe-a-hdmi-a-1.html

  * igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-d-hdmi-a-2:
    - shard-dg2:          NOTRUN -> [SKIP][209] ([i915#5235] / [i915#9423] / [i915#9728]) +3 other tests skip
   [209]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-d-hdmi-a-2.html

  * igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-b-hdmi-a-2:
    - shard-rkl:          NOTRUN -> [SKIP][210] ([i915#5235]) +7 other tests skip
   [210]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-b-hdmi-a-2.html

  * igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-factor-0-25@pipe-b-hdmi-a-3:
    - shard-dg1:          NOTRUN -> [SKIP][211] ([i915#5235]) +11 other tests skip
   [211]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-factor-0-25@pipe-b-hdmi-a-3.html

  * igt@kms_plane_scaling@planes-downscale-factor-0-5@pipe-b-edp-1:
    - shard-mtlp:         NOTRUN -> [SKIP][212] ([i915#5235]) +5 other tests skip
   [212]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_plane_scaling@planes-downscale-factor-0-5@pipe-b-edp-1.html

  * igt@kms_plane_scaling@planes-downscale-factor-0-5@pipe-d-edp-1:
    - shard-mtlp:         NOTRUN -> [SKIP][213] ([i915#3555] / [i915#5235]) +1 other test skip
   [213]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_plane_scaling@planes-downscale-factor-0-5@pipe-d-edp-1.html

  * igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-25@pipe-c-hdmi-a-1:
    - shard-dg2:          NOTRUN -> [SKIP][214] ([i915#5235] / [i915#9423]) +15 other tests skip
   [214]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-4/igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-25@pipe-c-hdmi-a-1.html

  * igt@kms_pm_backlight@fade-with-dpms:
    - shard-rkl:          NOTRUN -> [SKIP][215] ([i915#5354]) +1 other test skip
   [215]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_pm_backlight@fade-with-dpms.html

  * igt@kms_pm_dc@dc6-psr:
    - shard-mtlp:         NOTRUN -> [SKIP][216] ([i915#10139]) +1 other test skip
   [216]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_pm_dc@dc6-psr.html

  * igt@kms_pm_dc@dc9-dpms:
    - shard-rkl:          NOTRUN -> [SKIP][217] ([i915#3361])
   [217]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@kms_pm_dc@dc9-dpms.html

  * igt@kms_pm_lpsp@screens-disabled:
    - shard-dg1:          NOTRUN -> [SKIP][218] ([i915#8430])
   [218]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@kms_pm_lpsp@screens-disabled.html
    - shard-dg2:          NOTRUN -> [SKIP][219] ([i915#8430])
   [219]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_pm_lpsp@screens-disabled.html

  * igt@kms_pm_rpm@dpms-mode-unset-non-lpsp:
    - shard-dg2:          [PASS][220] -> [SKIP][221] ([i915#9519]) +1 other test skip
   [220]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-7/igt@kms_pm_rpm@dpms-mode-unset-non-lpsp.html
   [221]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-8/igt@kms_pm_rpm@dpms-mode-unset-non-lpsp.html

  * igt@kms_pm_rpm@modeset-non-lpsp:
    - shard-tglu:         NOTRUN -> [SKIP][222] ([i915#9519])
   [222]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_pm_rpm@modeset-non-lpsp.html

  * igt@kms_pm_rpm@modeset-non-lpsp-stress:
    - shard-rkl:          [PASS][223] -> [SKIP][224] ([i915#9519]) +1 other test skip
   [223]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-rkl-3/igt@kms_pm_rpm@modeset-non-lpsp-stress.html
   [224]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-4/igt@kms_pm_rpm@modeset-non-lpsp-stress.html
    - shard-mtlp:         NOTRUN -> [SKIP][225] ([i915#9519])
   [225]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_pm_rpm@modeset-non-lpsp-stress.html

  * igt@kms_prime@basic-crc-hybrid:
    - shard-rkl:          NOTRUN -> [SKIP][226] ([i915#6524])
   [226]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_prime@basic-crc-hybrid.html

  * igt@kms_prime@basic-modeset-hybrid:
    - shard-dg1:          NOTRUN -> [SKIP][227] ([i915#6524])
   [227]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_prime@basic-modeset-hybrid.html

  * igt@kms_psr2_sf@fbc-plane-move-sf-dmg-area@psr2-pipe-a-edp-1:
    - shard-mtlp:         NOTRUN -> [SKIP][228] ([i915#9808]) +1 other test skip
   [228]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_psr2_sf@fbc-plane-move-sf-dmg-area@psr2-pipe-a-edp-1.html

  * igt@kms_psr2_su@frontbuffer-xrgb8888:
    - shard-dg2:          NOTRUN -> [SKIP][229] ([i915#9683])
   [229]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@kms_psr2_su@frontbuffer-xrgb8888.html

  * igt@kms_psr2_su@page_flip-xrgb8888:
    - shard-rkl:          NOTRUN -> [SKIP][230] ([i915#9683])
   [230]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_psr2_su@page_flip-xrgb8888.html

  * igt@kms_psr@fbc-pr-cursor-mmap-gtt:
    - shard-dg2:          NOTRUN -> [SKIP][231] ([i915#1072] / [i915#9673] / [i915#9732]) +5 other tests skip
   [231]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_psr@fbc-pr-cursor-mmap-gtt.html

  * igt@kms_psr@fbc-pr-cursor-plane-onoff:
    - shard-rkl:          NOTRUN -> [SKIP][232] ([i915#1072] / [i915#9732]) +20 other tests skip
   [232]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@kms_psr@fbc-pr-cursor-plane-onoff.html

  * igt@kms_psr@fbc-pr-sprite-render:
    - shard-tglu:         NOTRUN -> [SKIP][233] ([i915#9732]) +5 other tests skip
   [233]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_psr@fbc-pr-sprite-render.html

  * igt@kms_psr@pr-cursor-mmap-cpu:
    - shard-dg2:          NOTRUN -> [SKIP][234] ([i915#1072] / [i915#9732]) +11 other tests skip
   [234]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_psr@pr-cursor-mmap-cpu.html

  * igt@kms_psr@pr-cursor-mmap-gtt:
    - shard-mtlp:         NOTRUN -> [SKIP][235] ([i915#9688]) +5 other tests skip
   [235]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_psr@pr-cursor-mmap-gtt.html

  * igt@kms_psr@psr-sprite-mmap-gtt@edp-1:
    - shard-mtlp:         NOTRUN -> [SKIP][236] ([i915#4077] / [i915#9688])
   [236]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_psr@psr-sprite-mmap-gtt@edp-1.html

  * igt@kms_psr@psr2-sprite-mmap-gtt:
    - shard-dg1:          NOTRUN -> [SKIP][237] ([i915#1072] / [i915#9732]) +22 other tests skip
   [237]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_psr@psr2-sprite-mmap-gtt.html

  * igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
    - shard-dg2:          NOTRUN -> [SKIP][238] ([i915#9685]) +1 other test skip
   [238]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html

  * igt@kms_rotation_crc@primary-rotation-270:
    - shard-mtlp:         NOTRUN -> [SKIP][239] ([i915#4235])
   [239]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_rotation_crc@primary-rotation-270.html

  * igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0:
    - shard-mtlp:         NOTRUN -> [SKIP][240] ([i915#5289])
   [240]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0.html

  * igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180:
    - shard-rkl:          NOTRUN -> [SKIP][241] ([i915#5289]) +2 other tests skip
   [241]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180.html

  * igt@kms_rotation_crc@sprite-rotation-90:
    - shard-dg2:          NOTRUN -> [SKIP][242] ([i915#4235]) +1 other test skip
   [242]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_rotation_crc@sprite-rotation-90.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - shard-dg1:          NOTRUN -> [SKIP][243] ([i915#3555]) +4 other tests skip
   [243]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@kms_setmode@invalid-clone-exclusive-crtc:
    - shard-mtlp:         NOTRUN -> [SKIP][244] ([i915#3555] / [i915#8823])
   [244]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_setmode@invalid-clone-exclusive-crtc.html

  * igt@kms_sysfs_edid_timing:
    - shard-dg1:          NOTRUN -> [FAIL][245] ([IGT#2] / [i915#6493])
   [245]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@kms_sysfs_edid_timing.html

  * igt@kms_universal_plane@cursor-fb-leak@pipe-d-hdmi-a-1:
    - shard-tglu:         [PASS][246] -> [FAIL][247] ([i915#9196])
   [246]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-tglu-6/igt@kms_universal_plane@cursor-fb-leak@pipe-d-hdmi-a-1.html
   [247]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-5/igt@kms_universal_plane@cursor-fb-leak@pipe-d-hdmi-a-1.html

  * igt@kms_vrr@flip-basic-fastset:
    - shard-tglu:         NOTRUN -> [SKIP][248] ([i915#9906])
   [248]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@kms_vrr@flip-basic-fastset.html

  * igt@kms_vrr@flipline:
    - shard-mtlp:         NOTRUN -> [SKIP][249] ([i915#3555] / [i915#8808])
   [249]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@kms_vrr@flipline.html

  * igt@kms_vrr@seamless-rr-switch-drrs:
    - shard-dg2:          NOTRUN -> [SKIP][250] ([i915#9906])
   [250]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_vrr@seamless-rr-switch-drrs.html

  * igt@kms_vrr@seamless-rr-switch-vrr:
    - shard-dg1:          NOTRUN -> [SKIP][251] ([i915#9906])
   [251]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@kms_vrr@seamless-rr-switch-vrr.html

  * igt@kms_writeback@writeback-check-output:
    - shard-dg2:          NOTRUN -> [SKIP][252] ([i915#2437])
   [252]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@kms_writeback@writeback-check-output.html

  * igt@kms_writeback@writeback-fb-id:
    - shard-rkl:          NOTRUN -> [SKIP][253] ([i915#2437])
   [253]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@kms_writeback@writeback-fb-id.html
    - shard-dg1:          NOTRUN -> [SKIP][254] ([i915#2437])
   [254]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@kms_writeback@writeback-fb-id.html

  * igt@perf@mi-rpc:
    - shard-rkl:          NOTRUN -> [SKIP][255] ([i915#2434])
   [255]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@perf@mi-rpc.html

  * igt@perf@per-context-mode-unprivileged:
    - shard-rkl:          NOTRUN -> [SKIP][256] ([i915#2435])
   [256]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-3/igt@perf@per-context-mode-unprivileged.html

  * igt@perf_pmu@frequency@gt0:
    - shard-dg2:          NOTRUN -> [FAIL][257] ([i915#6806])
   [257]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@perf_pmu@frequency@gt0.html

  * igt@prime_vgem@basic-fence-read:
    - shard-dg2:          NOTRUN -> [SKIP][258] ([i915#3291] / [i915#3708]) +1 other test skip
   [258]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@prime_vgem@basic-fence-read.html

  * igt@prime_vgem@basic-gtt:
    - shard-mtlp:         NOTRUN -> [SKIP][259] ([i915#3708] / [i915#4077])
   [259]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@prime_vgem@basic-gtt.html

  * igt@prime_vgem@basic-read:
    - shard-dg1:          NOTRUN -> [SKIP][260] ([i915#3708])
   [260]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-14/igt@prime_vgem@basic-read.html

  * igt@prime_vgem@fence-flip-hang:
    - shard-dg2:          NOTRUN -> [SKIP][261] ([i915#3708]) +1 other test skip
   [261]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@prime_vgem@fence-flip-hang.html

  * igt@prime_vgem@fence-read-hang:
    - shard-mtlp:         NOTRUN -> [SKIP][262] ([i915#3708])
   [262]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@prime_vgem@fence-read-hang.html

  * igt@sriov_basic@bind-unbind-vf:
    - shard-rkl:          NOTRUN -> [SKIP][263] ([i915#9917])
   [263]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-5/igt@sriov_basic@bind-unbind-vf.html

  * igt@sriov_basic@enable-vfs-autoprobe-on:
    - shard-dg1:          NOTRUN -> [SKIP][264] ([i915#9917])
   [264]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@sriov_basic@enable-vfs-autoprobe-on.html

  * igt@syncobj_timeline@invalid-wait-zero-handles:
    - shard-mtlp:         NOTRUN -> [FAIL][265] ([i915#9781])
   [265]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@syncobj_timeline@invalid-wait-zero-handles.html

  * igt@v3d/v3d_get_param@get-bad-param:
    - shard-dg1:          NOTRUN -> [SKIP][266] ([i915#2575]) +9 other tests skip
   [266]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-13/igt@v3d/v3d_get_param@get-bad-param.html

  * igt@v3d/v3d_mmap@mmap-bo:
    - shard-mtlp:         NOTRUN -> [SKIP][267] ([i915#2575]) +4 other tests skip
   [267]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@v3d/v3d_mmap@mmap-bo.html

  * igt@v3d/v3d_submit_cl@simple-flush-cache:
    - shard-dg2:          NOTRUN -> [SKIP][268] ([i915#2575]) +8 other tests skip
   [268]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@v3d/v3d_submit_cl@simple-flush-cache.html

  * igt@vc4/vc4_dmabuf_poll@poll-write-waits-until-write-done:
    - shard-dg1:          NOTRUN -> [SKIP][269] ([i915#7711]) +8 other tests skip
   [269]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-16/igt@vc4/vc4_dmabuf_poll@poll-write-waits-until-write-done.html

  * igt@vc4/vc4_label_bo@set-label:
    - shard-rkl:          NOTRUN -> [SKIP][270] ([i915#7711]) +6 other tests skip
   [270]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@vc4/vc4_label_bo@set-label.html

  * igt@vc4/vc4_perfmon@create-perfmon-exceed:
    - shard-mtlp:         NOTRUN -> [SKIP][271] ([i915#7711]) +5 other tests skip
   [271]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-8/igt@vc4/vc4_perfmon@create-perfmon-exceed.html

  * igt@vc4/vc4_perfmon@get-values-invalid-perfmon:
    - shard-dg2:          NOTRUN -> [SKIP][272] ([i915#7711]) +5 other tests skip
   [272]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@vc4/vc4_perfmon@get-values-invalid-perfmon.html

  * igt@vc4/vc4_tiling@set-bad-flags:
    - shard-tglu:         NOTRUN -> [SKIP][273] ([i915#2575]) +5 other tests skip
   [273]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-8/igt@vc4/vc4_tiling@set-bad-flags.html

  
#### Possible fixes ####

  * igt@gem_exec_endless@dispatch@bcs0:
    - shard-dg2:          [TIMEOUT][274] ([i915#3778] / [i915#7016]) -> [PASS][275]
   [274]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-8/igt@gem_exec_endless@dispatch@bcs0.html
   [275]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-6/igt@gem_exec_endless@dispatch@bcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-tglu:         [FAIL][276] ([i915#2842]) -> [PASS][277] +1 other test pass
   [276]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-tglu-7/igt@gem_exec_fair@basic-none-share@rcs0.html
   [277]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-tglu-9/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - shard-rkl:          [FAIL][278] ([i915#2842]) -> [PASS][279] +1 other test pass
   [278]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-rkl-6/igt@gem_exec_fair@basic-none@vecs0.html
   [279]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-6/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@i915_power@sanity:
    - shard-mtlp:         [SKIP][280] ([i915#7984]) -> [PASS][281]
   [280]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-mtlp-1/igt@i915_power@sanity.html
   [281]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-7/igt@i915_power@sanity.html

  * igt@kms_big_fb@4-tiled-64bpp-rotate-180:
    - shard-mtlp:         [FAIL][282] ([i915#5138]) -> [PASS][283]
   [282]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-mtlp-2/igt@kms_big_fb@4-tiled-64bpp-rotate-180.html
   [283]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-6/igt@kms_big_fb@4-tiled-64bpp-rotate-180.html

  * igt@kms_color@ctm-0-25@pipe-c:
    - shard-dg2:          [INCOMPLETE][284] -> [PASS][285]
   [284]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-1/igt@kms_color@ctm-0-25@pipe-c.html
   [285]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-2/igt@kms_color@ctm-0-25@pipe-c.html

  * igt@kms_flip@flip-vs-panning-vs-hang@a-edp1:
    - shard-mtlp:         [INCOMPLETE][286] ([i915#6113]) -> [PASS][287]
   [286]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-mtlp-2/igt@kms_flip@flip-vs-panning-vs-hang@a-edp1.html
   [287]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-6/igt@kms_flip@flip-vs-panning-vs-hang@a-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@d-hdmi-a4:
    - shard-dg1:          [DMESG-WARN][288] ([i915#4423]) -> [PASS][289]
   [288]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg1-18/igt@kms_flip@flip-vs-suspend-interruptible@d-hdmi-a4.html
   [289]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-18/igt@kms_flip@flip-vs-suspend-interruptible@d-hdmi-a4.html

  * igt@kms_pm_rpm@modeset-non-lpsp-stress:
    - shard-dg2:          [SKIP][290] ([i915#9519]) -> [PASS][291] +1 other test pass
   [290]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-4/igt@kms_pm_rpm@modeset-non-lpsp-stress.html
   [291]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_pm_rpm@modeset-non-lpsp-stress.html

  * igt@kms_pm_rpm@modeset-non-lpsp-stress-no-wait:
    - shard-rkl:          [SKIP][292] ([i915#9519]) -> [PASS][293]
   [292]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-rkl-4/igt@kms_pm_rpm@modeset-non-lpsp-stress-no-wait.html
   [293]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-rkl-1/igt@kms_pm_rpm@modeset-non-lpsp-stress-no-wait.html

  * igt@kms_universal_plane@cursor-fb-leak@pipe-b-hdmi-a-1:
    - shard-snb:          [FAIL][294] ([i915#9196]) -> [PASS][295] +1 other test pass
   [294]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-snb2/igt@kms_universal_plane@cursor-fb-leak@pipe-b-hdmi-a-1.html
   [295]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-snb6/igt@kms_universal_plane@cursor-fb-leak@pipe-b-hdmi-a-1.html

  * igt@sysfs_timeslice_duration@timeout@ccs0:
    - shard-mtlp:         [ABORT][296] -> [PASS][297]
   [296]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-mtlp-1/igt@sysfs_timeslice_duration@timeout@ccs0.html
   [297]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-mtlp-6/igt@sysfs_timeslice_duration@timeout@ccs0.html

  
#### Warnings ####

  * igt@gem_create@create-ext-cpu-access-big:
    - shard-dg2:          [INCOMPLETE][298] ([i915#9364]) -> [ABORT][299] ([i915#9846])
   [298]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-10/igt@gem_create@create-ext-cpu-access-big.html
   [299]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-7/igt@gem_create@create-ext-cpu-access-big.html

  * igt@gem_lmem_swapping@smem-oom@lmem0:
    - shard-dg1:          [DMESG-WARN][300] ([i915#1982] / [i915#4936] / [i915#5493]) -> [TIMEOUT][301] ([i915#5493])
   [300]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg1-16/igt@gem_lmem_swapping@smem-oom@lmem0.html
   [301]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg1-15/igt@gem_lmem_swapping@smem-oom@lmem0.html

  * igt@kms_frontbuffer_tracking@fbcpsr-shrfb-scaledprimary:
    - shard-dg2:          [SKIP][302] ([i915#10433] / [i915#3458]) -> [SKIP][303] ([i915#3458]) +1 other test skip
   [302]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-4/igt@kms_frontbuffer_tracking@fbcpsr-shrfb-scaledprimary.html
   [303]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-5/igt@kms_frontbuffer_tracking@fbcpsr-shrfb-scaledprimary.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu:
    - shard-dg2:          [SKIP][304] ([i915#3458]) -> [SKIP][305] ([i915#10433] / [i915#3458]) +3 other tests skip
   [304]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu.html
   [305]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu.html

  * igt@kms_psr@fbc-pr-primary-render:
    - shard-dg2:          [SKIP][306] ([i915#1072] / [i915#9732]) -> [SKIP][307] ([i915#1072] / [i915#9673] / [i915#9732]) +4 other tests skip
   [306]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-5/igt@kms_psr@fbc-pr-primary-render.html
   [307]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@kms_psr@fbc-pr-primary-render.html

  * igt@kms_psr@psr-cursor-render:
    - shard-dg2:          [SKIP][308] ([i915#1072] / [i915#9673] / [i915#9732]) -> [SKIP][309] ([i915#1072] / [i915#9732]) +13 other tests skip
   [308]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-11/igt@kms_psr@psr-cursor-render.html
   [309]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-10/igt@kms_psr@psr-cursor-render.html

  * igt@prime_mmap@test_aperture_limit@test_aperture_limit-smem:
    - shard-dg2:          [CRASH][310] ([i915#9351]) -> [INCOMPLETE][311] ([i915#5493])
   [310]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14747/shard-dg2-5/igt@prime_mmap@test_aperture_limit@test_aperture_limit-smem.html
   [311]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/shard-dg2-11/igt@prime_mmap@test_aperture_limit@test_aperture_limit-smem.html

  
  [IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
  [i915#10131]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10131
  [i915#10139]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10139
  [i915#10166]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10166
  [i915#10278]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10278
  [i915#10307]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10307
  [i915#10378]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10378
  [i915#10433]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10433
  [i915#10434]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10434
  [i915#10513]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10513
  [i915#10656]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10656
  [i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072
  [i915#11072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11072
  [i915#11078]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11078
  [i915#1257]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1257
  [i915#1769]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1769
  [i915#1825]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1825
  [i915#1839]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1839
  [i915#1982]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1982
  [i915#2434]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2434
  [i915#2435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2435
  [i915#2437]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2575
  [i915#2587]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2587
  [i915#2672]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2672
  [i915#280]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/280
  [i915#2842]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2842
  [i915#2856]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2856
  [i915#3023]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3023
  [i915#3281]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291
  [i915#3297]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3299
  [i915#3359]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3359
  [i915#3361]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3361
  [i915#3458]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3458
  [i915#3539]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3539
  [i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3638
  [i915#3708]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708
  [i915#3742]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3742
  [i915#3778]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3778
  [i915#3804]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3804
  [i915#3826]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3826
  [i915#3840]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3840
  [i915#3936]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3936
  [i915#4036]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4036
  [i915#4077]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083
  [i915#4087]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4087
  [i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4213
  [i915#4235]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4235
  [i915#4270]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4270
  [i915#4423]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4423
  [i915#4473]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4473
  [i915#4525]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4525
  [i915#4537]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4537
  [i915#4538]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4538
  [i915#4565]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4565
  [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
  [i915#4771]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4771
  [i915#4812]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4812
  [i915#4852]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4852
  [i915#4860]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4860
  [i915#4879]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4879
  [i915#4885]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4885
  [i915#4936]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4936
  [i915#5138]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5138
  [i915#5176]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5176
  [i915#5190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190
  [i915#5235]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5235
  [i915#5274]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5274
  [i915#5286]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5286
  [i915#5289]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5289
  [i915#5354]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354
  [i915#5439]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5439
  [i915#5493]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5493
  [i915#5723]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5723
  [i915#5784]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6095
  [i915#6113]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6113
  [i915#6188]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6188
  [i915#6227]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6227
  [i915#6230]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6230
  [i915#6268]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268
  [i915#6301]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6301
  [i915#6412]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6412
  [i915#6493]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6493
  [i915#6524]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6524
  [i915#6590]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6590
  [i915#6621]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6621
  [i915#6806]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6806
  [i915#6944]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6944
  [i915#6953]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6953
  [i915#7016]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7016
  [i915#7118]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7118
  [i915#7213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7213
  [i915#7697]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7697
  [i915#7711]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7711
  [i915#7828]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7828
  [i915#7984]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7984
  [i915#8063]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8063
  [i915#8228]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8228
  [i915#8292]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8292
  [i915#8346]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8346
  [i915#8381]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8381
  [i915#8411]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8411
  [i915#8414]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8414
  [i915#8428]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8428
  [i915#8430]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8430
  [i915#8437]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8437
  [i915#8555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8555
  [i915#8562]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8562
  [i915#8708]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8708
  [i915#8709]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8709
  [i915#8808]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8808
  [i915#8810]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8810
  [i915#8812]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8812
  [i915#8814]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8814
  [i915#8823]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8823
  [i915#9196]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9196
  [i915#9227]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9227
  [i915#9323]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9323
  [i915#9337]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9337
  [i915#9351]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9351
  [i915#9364]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9364
  [i915#9423]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9423
  [i915#9424]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9424
  [i915#9433]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9433
  [i915#9519]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9519
  [i915#9606]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9606
  [i915#9673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9673
  [i915#9683]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9683
  [i915#9685]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9685
  [i915#9688]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9688
  [i915#9723]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9723
  [i915#9728]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9728
  [i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732
  [i915#9766]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9766
  [i915#9781]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9781
  [i915#9808]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9808
  [i915#9809]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9809
  [i915#9820]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9820
  [i915#9833]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9833
  [i915#9846]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9846
  [i915#9906]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9906
  [i915#9917]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9917
  [i915#9934]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9934


Build changes
-------------

  * Linux: CI_DRM_14747 -> Patchwork_133458v1

  CI-20190529: 20190529
  CI_DRM_14747: b885b00e7fc01fc109887d59ce2d1283714b07c6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7846: 4a5fd4e7cb2798636f6464e2bd61399f3242b322 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_133458v1: b885b00e7fc01fc109887d59ce2d1283714b07c6 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133458v1/index.html

[-- Attachment #2: Type: text/html, Size: 109055 bytes --]

^ permalink raw reply	[relevance 1%]

* [qais-yousef:improve-sched-cpufreq-interaction 1/1] kernel/sched/core.c:5169:17: error: incompatible pointer to integer conversion passing 'struct task_struct *' to parameter of type 'int'
@ 2024-05-11 19:59  1% kernel test robot
  0 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 19:59 UTC (permalink / raw)
  To: Qais Yousef; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/qais-yousef/linux improve-sched-cpufreq-interaction
head:   7cf8a5268d5386ece305e160647503114338282b
commit: 7cf8a5268d5386ece305e160647503114338282b [1/1] sched: Consolidate cpufreq updates
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20240512/202405120337.tA7GEqCH-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120337.tA7GEqCH-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120337.tA7GEqCH-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/sched/core.c:5169:17: error: incompatible pointer to integer conversion passing 'struct task_struct *' to parameter of type 'int' [-Wint-conversion]
    5169 |                 if (rt_policy(prev)) {
         |                               ^~~~
   kernel/sched/sched.h:193:33: note: passing argument to parameter 'policy' here
     193 | static inline int rt_policy(int policy)
         |                                 ^
   1 error generated.


vim +5169 kernel/sched/core.c

  5136	
  5137	static inline void update_cpufreq_ctx_switch(struct rq *rq, struct task_struct *prev)
  5138	{
  5139	#ifdef CONFIG_CPU_FREQ
  5140		/*
  5141		 * RT and DL should always send a freq update. But we can do some
  5142		 * simple checks to avoid it when we know it's not necessary.
  5143		 *
  5144		 * iowait_boost will always trigger a freq update too.
  5145		 *
  5146		 * Fair tasks will only trigger an update if the root cfs_rq has
  5147		 * decayed.
  5148		 *
  5149		 * Everything else should do nothing.
  5150		 */
  5151		switch (current->policy) {
  5152		case SCHED_NORMAL:
  5153		case SCHED_BATCH:
  5154			if (unlikely(current->in_iowait)) {
  5155				cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT | SCHED_CPUFREQ_FORCE_UPDATE);
  5156				return;
  5157			}
  5158	
  5159	#ifdef CONFIG_SMP
  5160			if (unlikely(rq->cfs.decayed)) {
  5161				rq->cfs.decayed = false;
  5162				cpufreq_update_util(rq, 0);
  5163				return;
  5164			}
  5165	#endif
  5166			return;
  5167		case SCHED_FIFO:
  5168		case SCHED_RR:
> 5169			if (rt_policy(prev)) {
  5170	#ifdef CONFIG_UCLAMP_TASK
  5171				unsigned long curr_uclamp_min = uclamp_eff_value(current, UCLAMP_MIN);
  5172				unsigned long prev_uclamp_min = uclamp_eff_value(prev, UCLAMP_MIN);
  5173	
  5174				if (curr_uclamp_min == prev_uclamp_min)
  5175	#endif
  5176					return;
  5177			}
  5178	#ifdef CONFIG_SMP
  5179			/* Stopper task masquerades as RT */
  5180			if (unlikely(current->sched_class == &stop_sched_class))
  5181				return;
  5182	#endif
  5183			cpufreq_update_util(rq, SCHED_CPUFREQ_FORCE_UPDATE);
  5184			return;
  5185		case SCHED_DEADLINE:
  5186			if (current->dl.flags & SCHED_FLAG_SUGOV) {
  5187				/* Ignore sugov kthreads, they're responding to our requests */
  5188				return;
  5189			}
  5190			cpufreq_update_util(rq, SCHED_CPUFREQ_FORCE_UPDATE);
  5191			return;
  5192		default:
  5193			return;
  5194		}
  5195	#endif
  5196	}
  5197	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* [PATCH] Documentation: cve Korean translation
@ 2024-05-11 19:59  1% yskelg
  0 siblings, 0 replies; 200+ results
From: yskelg @ 2024-05-11 19:59 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Austin Kim, shjy180909, workflows, linux-doc, linux-kernel, Yunseong Kim

From: Yunseong Kim <yskelg@gmail.com>

This is a Documentation/process/cve korean version.

Signed-off-by: Yunseong Kim <yskelg@gmail.com>
---
 .../translations/ko_KR/process/cve.rst        | 107 ++++++++++++++++++
 1 file changed, 107 insertions(+)
 create mode 100644 Documentation/translations/ko_KR/process/cve.rst

diff --git a/Documentation/translations/ko_KR/process/cve.rst b/Documentation/translations/ko_KR/process/cve.rst
new file mode 100644
index 000000000000..26682969b2b7
--- /dev/null
+++ b/Documentation/translations/ko_KR/process/cve.rst
@@ -0,0 +1,107 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+:Original: Documentation/process/cve.rst
+:Translator: Yunseong Kim <yskelg@gmail.com>
+
+==========
+CVE 항목들
+==========
+
+공통 취약점 및 노출(CVE®) 번호는 공개적으로 발표된 보안 취약점을 식별, 정의 및
+목록화하기 위한 명확한 방법으로 개발되었습니다. 시간이 지남에 따라 커널
+프로젝트와 관련하여서는 그 유용성이 감소했으며, CVE 번호는 부적절한 방식과
+부적절한 이유로 할당되는 경우가 매우 많았습니다. 이로 인하여 커널 개발
+커뮤니티에서는 이를 기피하는 경향이 있었습니다. 그러나 커널 커뮤니티 외부의
+개인과 회사가 CVE 및 기타 형태의 보안 식별자를 할당하라는 지속적인 압박과
+지속적인 남용이 결합되면서 커널 커뮤니티가 이러한 할당에 대한 통제권을 가져야
+한다는 것이 분명해졌습니다.
+
+Linux 커널 개발자 팀은 잠재적인 Linux 커널 보안 문제에 대해 CVE를 할당할 수
+있는 권한이 있습니다. 여기서 할당은 :doc:`일반 Linux 커널 보안 버그 보고
+절차<../process/security-bugs>`와는 별개입니다.
+
+Linux 커널에 할당된 모든 CVE 목록은
+https://lore.kernel.org/linux-cve-announce/ 에 있는 Linux-CVE 메일링 리스트의
+아카이브에서 확인할 수 있습니다. 할당된 CVE에 대한 알림을 받으려면 해당
+메일링 리스트에 `구독
+<https://subspace.kernel.org/subscribing.html>`_ 하세요.
+
+절차
+====
+
+일반적인 안정 릴리스 절차의 일부로, 잠재적으로 보안 문제가 될 수 있는 커널
+변경 사항은 CVE 번호 할당을 담당하는 개발자가 식별하여 CVE 번호를 자동으로
+할당합니다. 이러한 할당은 linux-cve-announce 메일링 리스트에 공지사항으로
+수시로 게시됩니다.
+
+리눅스 커널이 시스템에 있는 계층으로 인해 거의 모든 버그가 커널의 보안을
+손상시키는 데 악용될 수 있지만 버그가 수정되면 악용 가능성이 명확하게 드러나지
+않는 경우가 많습니다. 이 때문에 CVE 할당 팀은 지나치게 조심스럽게 버그 수정이
+확인되는 모든 버그에 CVE 번호를 할당합니다.
+이것이 리눅스 커널 팀에서 발행하는 겉으로 보기에 많은 수의 CVE를 설명합니다.
+
+사용자가 CVE를 지정해야 한다고 생각하는 특정 수정 사항을 CVE 할당 팀이 놓친
+경우 <cve@kernel.org>로 이메일을 보내 주시면 해당 팀에서 함께 작업할 것입니다.
+이 별칭은 이미 릴리스된 커널 트리에 있는 수정 사항에 대한 CVE 할당 전용이므로
+잠재적인 보안 문제는 이 별칭으로 보내서는 안 됩니다.
+수정되지 않은 보안 문제를 발견했다고 생각되면 :doc:`일반 Linux 커널 보안
+버그 보고 절차<../process/security-bugs>`를 따르세요.
+
+Linux 커널에서 수정되지 않은 보안 이슈에 대해서는 CVE가 자동으로 할당되지
+않으며, 수정이 제공되고 안정적인 커널 트리에 적용된 후에만 자동으로 할당되며,
+기존 수정의 git 커밋 ID로 추적할 수 있습니다. 커밋으로 문제가 해결되기 전에
+CVE를 할당받고자 하는 사람은 커널 CVE 할당 팀<cve@kernel.org>에 문의하여
+예약된 식별자 항목들에서 식별자를 할당받으시기 바랍니다.
+
+현재 Stable/LTS 커널 팀에서 적극적으로 지원하지 않는 커널 버전에서 발견된
+문제에 대해서는 CVE가 할당되지 않습니다.
+현재 지원되는 커널 브랜치 목록은 https://kernel.org/releases.html 에서 확인할
+수 있습니다.
+
+할당된 CVE 항목들의 분쟁
+=========================
+
+특정 커널 변경에 대해 할당된 CVE에 대해 이의를 제기하거나 수정할 권한은
+전적으로 영향을 받는 관련 하위 시스템의 유지 관리자에게 있습니다.
+이 원칙은 취약점 보고에 있어 높은 수준의 정확성과 책임성을 보장합니다.
+하위 시스템에 대한 깊은 전문 지식과 친밀한 지식을 갖춘 사람만이 보고된
+취약점의 유효성과 범위를 효과적으로 평가하고 적절한 CVE 지정을 결정할 수
+있습니다. 이 지정된 기관 외부에서 CVE를 수정하거나 이의를 제기하려는 시도는
+혼란, 부정확한 보고, 궁극적으로 시스템 손상으로 이어질 수 있습니다.
+
+잘못된 CVE 항목들
+=================
+
+해당 배포판에서 변경된 사항으로 인해 또는 해당 배포판이 더 이상 kernel.org
+지원 릴리스가 아닌 커널 버전을 지원하기 때문에 Linux 배포판에서만 지원되는
+Linux 커널에서 보안 문제가 발견되는 경우 Linux 커널 CVE 팀에서 CVE를 할당할 수
+없으며 해당 Linux 배포판 자체에서 요청해야 합니다.
+
+커널 할당 CVE 팀이 아닌 다른 그룹에서 적극적으로 지원되는 커널 버전에 대해
+Linux 커널에 대해 할당된 CVE는 유효한 CVE로 취급해서는 안 됩니다.
+CNA 수정 절차를 통해 해당 항목을 무효화할 수 있도록 커널 CVE 할당 팀에
+<cve@kernel.org>로 알려주시기 바랍니다.
+
+특정 CVE의 적용 가능성
+======================
+
+Linux 커널은 외부 사용자가 다양한 방법으로 접근하거나 전혀 접근하지 않는
+등 다양한 방식으로 사용될 수 있으므로 특정 CVE의 적용 여부는 Linux 사용자가
+결정할 사항이며 CVE 할당 팀의 권한이 아닙니다. 특정 CVE의 적용 가능성을
+판단하기 위해 우리에게 문의하지 마시기 바랍니다.
+
+또한 소스 트리가 매우 방대하고 어떤 시스템도 소스 트리의 작은 하위 집합만
+사용하므로 Linux 사용자는 할당된 많은 수의 CVE가 자신의 시스템과 관련이 없다는
+사실을 알고 인지해야 합니다.
+
+즉, 우리는 사용자의 사용 사례를 알지 못하며 사용자가 커널의 어떤 부분을
+사용하는지 알 수 없으므로 특정 CVE가 사용자의 시스템과 관련이 있는지 판단할 수
+있는 방법이 없습니다.
+
+항상 그렇듯이 커널 변경 사항은 개별적으로 선별된 변경 사항이 아니라 많은
+커뮤니티 구성원이 통합된 전체에서 함께 테스트하는 것이므로 릴리스된 모든 커널
+변경 사항을 적용하는 것이 가장 좋습니다. 또한 많은 버그의 경우 전체 문제에
+대한 해결책은 단일 변경 사항이 아니라 여러 수정 사항을 모아놓고 보아야 찾을 수
+있다는 점에 유의하세요. 이상적으로는 모든 문제에 대한 모든 수정 사항에 CVE가
+할당되지만, 때로는 수정 사항을 발견하지 못하는 경우가 있으므로 CVE가 할당되지
+않은 일부 변경 사항이 관련성이 있을 수 있다고 가정합니다.
-- 
2.34.1


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround
  2024-05-11 18:47  1%   ` Jonas Karlman
@ 2024-05-11 19:57  0%     ` Mark Kettenis
  2024-05-11 20:55  1%       ` Jonas Karlman
  0 siblings, 1 reply; 200+ results
From: Mark Kettenis @ 2024-05-11 19:57 UTC (permalink / raw)
  To: Jonas Karlman
  Cc: knaerzche, kever.yang, sjg, philipp.tomsich, trini, jbx6244, u-boot

> Date: Sat, 11 May 2024 20:47:40 +0200
> From: Jonas Karlman <jonas@kwiboo.se>

Hi Jonas & Alex,

> Hi Alex,
> 
> On 2024-05-11 19:44, Alex Bee wrote:
> > Hi Jonas,
> > 
> > Am 11.05.24 um 13:28 schrieb Jonas Karlman:
> >> This series add gpio request() and pinctrl gpio_request_enable() ops so
> >> that a gpio requested pin automatically use gpio pinmux and U-Boot
> >> behaves more similar to Linux kernel.
> > 
> > I'm not sure that's a good idea.
> > While linux does it the same way, we really shouldn't expect every 
> > software/os/ … which uses DT (now or in future) to implicitly switch the 
> > pin function when using a pin as gpio. So the real fix would probably be 
> > to add the the correct pinctrl settings to the upstream DT of those 
> > boards and sync it later on (not sure those if those SoCs already using 
> > OF_UPSTREAM) and leave the -u-boot.dtsi-"hack" alone for now.

I missed Alex's mail, but OpenBSD certainly is one of the OSes that
could break if the pinctrl settings get removed.  We currently have no
code to automatically mux the gpio pins on these Rockchip SoCs. I
suppose as long as U-Boot probes the PCIe bus, the pins will already
be muxed correctly and things will continue to work.  But I think
there are certain boot scenarios where this won't happen.

I've wondered in the past what the purpose of the gpio-ranges
properties was.  I never considered that they could be used to
automatically mux the pins for GPIO since the gpio-ranges mapping
provides no indication of what the correct pin settings arefor the
GPIO pins.

> 
> I fully agree that the pinctrl for the problematic boards should be
> corrected in upstream DT, but that is a separate issue and should not
> block adding support for the request()/gpio_request_enable() ops.
> 
> While the pcie reset-gpios full board freeze that was my driving factor
> to fully implement the gpio request() ops it is not the only use case,
> using the gpio cmd on a pin that use a non-gpio pinmux is another.
> 
> Or do you see any technical issue with having the gpio request() ops
> implemented and having it ensure gpio pinmux is used on a gpio requested
> pin? Similar to how gpio/pinctrl is behaving in Linux and on some other
> platforms in U-Boot?

Well, it removes the incentive to fix the upstream DTs and would make
it harder to notice missing pinctrls in the DTs.

Cheers,

Mark

> > Alex
> >>
> >> With the gpio and pinctrl ops implemented this series also remove a PCIe
> >> reset-gpios related device lock-up workaround from board u-boot.dtsi.
> >>
> >> PX30, RK3066, RK3188, RK356x and RK3588 are the only SoCs that currently
> >> define gpio-ranges props and is affected by this series.
> >>
> >> A follow up series adding support for the pinmux status cmd will also
> >> add gpio-ranges props for remaining RK SoCs.
> >>
> >> Jonas Karlman (4):
> >>    pinctrl: rockchip: Add gpio_request_enable() ops
> >>    gpio: rockchip: Add request() ops
> >>    rockchip: rk3568-rock-3a: Drop PCIe reset-gpios workaround
> >>    rockchip: rk3568-radxa-e25: Drop PCIe reset-gpios workaround
> >>
> >>   arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi     | 12 -------
> >>   arch/arm/dts/rk3568-rock-3a-u-boot.dtsi       | 12 -------
> >>   drivers/gpio/rk_gpio.c                        | 10 ++++++
> >>   .../pinctrl/rockchip/pinctrl-rockchip-core.c  | 31 +++++++++++++++++++
> >>   4 files changed, 41 insertions(+), 24 deletions(-)
> >>
> > 
> 
> 

^ permalink raw reply	[relevance 0%]

* [PATCH v2] drm/msm/a6xx: request memory region
@ 2024-05-11 19:56  1% Kiarash Hajian
  2024-05-11 21:46  0% ` Dmitry Baryshkov
  0 siblings, 1 reply; 200+ results
From: Kiarash Hajian @ 2024-05-11 19:56 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	Marijn Suijten, David Airlie, Daniel Vetter
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Kiarash Hajian

The driver's memory regions are currently just ioremap()ed, but not
reserved through a request. That's not a bug, but having the request is
a little more robust.

Implement the region-request through the corresponding managed
devres-function.

Signed-off-by: Kiarash Hajian <kiarash8112hajian@gmail.com>
---
Changes in v2:
- update the subject prefix to "drm/msm/a6xx:", to match the majority of other changes to this file.
---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 8bea8ef26f77..aa83cb461a75 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -636,9 +636,9 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
 
 err:
 	if (!IS_ERR_OR_NULL(pdcptr))
-		iounmap(pdcptr);
+		devm_iounmap(&pdev->dev,pdcptr);
 	if (!IS_ERR_OR_NULL(seqptr))
-		iounmap(seqptr);
+		devm_iounmap(&pdev->dev,seqptr);
 }
 
 /*
@@ -1503,7 +1503,7 @@ static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev,
 		return ERR_PTR(-EINVAL);
 	}
 
-	ret = ioremap(res->start, resource_size(res));
+	ret = devm_ioremap_resource(&pdev->dev, res);
 	if (!ret) {
 		DRM_DEV_ERROR(&pdev->dev, "Unable to map the %s registers\n", name);
 		return ERR_PTR(-EINVAL);
@@ -1646,7 +1646,7 @@ int a6xx_gmu_wrapper_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
 	dev_pm_domain_detach(gmu->cxpd, false);
 
 err_mmio:
-	iounmap(gmu->mmio);
+	devm_iounmap(gmu->dev ,gmu->mmio);
 
 	/* Drop reference taken in of_find_device_by_node */
 	put_device(gmu->dev);
@@ -1825,9 +1825,9 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
 	dev_pm_domain_detach(gmu->cxpd, false);
 
 err_mmio:
-	iounmap(gmu->mmio);
+	devm_iounmap(gmu->dev ,gmu->mmio);
 	if (platform_get_resource_byname(pdev, IORESOURCE_MEM, "rscc"))
-		iounmap(gmu->rscc);
+		devm_iounmap(gmu->dev ,gmu->rscc);
 	free_irq(gmu->gmu_irq, gmu);
 	free_irq(gmu->hfi_irq, gmu);
 

---
base-commit: cf87f46fd34d6c19283d9625a7822f20d90b64a4
change-id: 20240511-msm-adreno-memory-region-2bcb1c958621

Best regards,
-- 
Kiarash Hajian <kiarash8112hajian@gmail.com>


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  2024-05-11 19:28  1%     ` Al Viro
@ 2024-05-11 19:55  1%       ` Linus Torvalds
  2024-05-11 20:31  1%         ` Al Viro
  0 siblings, 1 reply; 200+ results
From: Linus Torvalds @ 2024-05-11 19:55 UTC (permalink / raw)
  To: Al Viro
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, walters,
	wangkai86, willy

[-- Attachment #1: Type: text/plain, Size: 2457 bytes --]

On Sat, 11 May 2024 at 12:28, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Sat, May 11, 2024 at 11:42:34AM -0700, Linus Torvalds wrote:
> >
> > And that outside lock is the much more important one, I bet.
>
> ... and _that_ is where taking d_delete outside of the lock might
> take an unpleasant analysis of a lot of code.

Hmm. It really shouldn't matter. There can only be negative children
of the now deleted directory, so there are no actual effects on
inodes.

It only affects the d_child list, which is protected by d_lock (and
can be modified outside of the inode lock anyway due to memory
pressure).

What am I missing?

> In any case, I think the original poster said that parent directories
> were not removed, so I doubt that rmdir() behaviour is relevant for
> their load.

I don't see that at all. The load was a "rm -rf" of a directory tree,
and all of that was successful as far as I can see from the report.

The issue was that an unrelated process just looking at the directory
(either one - I clearly tested the wrong one) would be held up by the
directory lock while the pruning was going on.

And yes, the pruning can take a couple of seconds with "just" a few
million negative dentries. The negative dentries obviously don't even
have to be the result of a 'delete' - the easy way to see this is to
do a lot of bogus lookups.

Attached is my excessively stupid test-case in case you want to play
around with it:

    [dirtest]$ time ./a.out dir ; time rmdir dir

    real 0m12.592s
    user 0m1.153s
    sys 0m11.412s

    real 0m1.892s
    user 0m0.001s
    sys 0m1.528s

so you can see how it takes almost two seconds to then flush those
negative dentries - even when there were no 'unlink()' calls at all,
just failed lookups.

It's maybe instructive to do the same on tmpfs, which has

    /*
     * Retaining negative dentries for an in-memory filesystem just wastes
     * memory and lookup time: arrange for them to be deleted immediately.
     */
    int always_delete_dentry(const struct dentry *dentry)
    {
        return 1;
    }

and so if you do the same test on /tmp, the results are very different:

    [dirtest]$ time ./a.out /tmp/sillydir ; time rmdir /tmp/sillydir

    real 0m8.129s
    user 0m1.164s
    sys 0m6.592s

    real 0m0.001s
    user 0m0.000s
    sys 0m0.001s

so it does show very different patterns and you can test the whole
"what happens without negative dentries" case.

                 Linus

[-- Attachment #2: main.c --]
[-- Type: text/x-csrc, Size: 575 bytes --]

#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>

#define FATAL(x) do { if (x) die(#x); } while (0)

static void die(const char *s)
{
	fprintf(stderr, "%s: %s\n", s, strerror(errno));
	exit(1);
}

int main(int argc, char ** argv)
{
	char *dirname = argv[1];

	FATAL(argc < 2);
	FATAL(mkdir(dirname, 0700));
	for (int i = 0; i < 10000000; i++) {
		int fd;
		char name[128];
		snprintf(name, sizeof(name), "%s/name-%09d", dirname, i);
		FATAL(open(name, O_RDONLY) >= 0);
	}
	return 0;
}

^ permalink raw reply	[relevance 1%]

* [PATCH v3] rockchip: rv1126: Migrate to OF_UPSTREAM
@ 2024-05-11 16:12  1% Anand Moon
  0 siblings, 0 replies; 200+ results
From: Anand Moon @ 2024-05-11 16:12 UTC (permalink / raw)
  To: Tom Rini, Simon Glass, Philipp Tomsich, Kever Yang, Jagan Teki, Tim Lunn
  Cc: Anand Moon, u-boot

Migrate RV1126 boards that exists in Linux v6.8 to use OF_UPSTREAM.

Following targets is migrated to use OF_UPSTREAM:

- rv1126-edgeble-neu2 : Board is an industrial form factor
                        IO board.
- sonoff-ihost-rv1126 : Gateway device designed to provide a
                        Smart Home Hub.

Cc: Tim Lunn <tim@feathertop.org>
Cc: Jagan Teki <jagan@edgeble.ai>
Reviewed-By: Tim Lunn <tim@feathertop.org>
Tested-By: Tim Lunn <tim@feathertop.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Anand Moon <anand@edgable.ai>
---
v3: change the Signed off to edgeble id.
    collcted Reviewd-By and Tested-By

v2: remove the dt-bindings for clock and power
    fix the typo in commit message
---
 arch/arm/dts/Makefile                         |   3 -
 arch/arm/dts/rv1126-edgeble-neu2-io.dts       | 112 ----
 arch/arm/dts/rv1126-edgeble-neu2.dtsi         | 345 ----------
 arch/arm/dts/rv1126-pinctrl.dtsi              | 341 ----------
 arch/arm/dts/rv1126-sonoff-ihost.dts          |  29 -
 arch/arm/dts/rv1126-sonoff-ihost.dtsi         | 404 -----------
 arch/arm/dts/rv1126.dtsi                      | 623 -----------------
 arch/arm/mach-rockchip/Kconfig                |   1 +
 configs/neu2-io-rv1126_defconfig              |   2 +-
 configs/sonoff-ihost-rv1126_defconfig         |   2 +-
 .../dt-bindings/clock/rockchip,rv1126-cru.h   | 632 ------------------
 .../dt-bindings/power/rockchip,rv1126-power.h |  35 -
 12 files changed, 3 insertions(+), 2526 deletions(-)
 delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io.dts
 delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2.dtsi
 delete mode 100644 arch/arm/dts/rv1126-pinctrl.dtsi
 delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dts
 delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dtsi
 delete mode 100644 arch/arm/dts/rv1126.dtsi
 delete mode 100644 include/dt-bindings/clock/rockchip,rv1126-cru.h
 delete mode 100644 include/dt-bindings/power/rockchip,rv1126-power.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 087645f354..79fc100dce 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -97,9 +97,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
 	rk3368-geekbox.dtb \
 	rk3368-px5-evb.dtb \
 
-dtb-$(CONFIG_ROCKCHIP_RV1126) += \
-	rv1126-edgeble-neu2-io.dtb
-
 dtb-$(CONFIG_ARCH_S5P4418) += \
 	s5p4418-nanopi2.dtb
 
diff --git a/arch/arm/dts/rv1126-edgeble-neu2-io.dts b/arch/arm/dts/rv1126-edgeble-neu2-io.dts
deleted file mode 100644
index 0c2396b8f8..0000000000
--- a/arch/arm/dts/rv1126-edgeble-neu2-io.dts
+++ /dev/null
@@ -1,112 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
- * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
- */
-
-/dts-v1/;
-#include "rv1126.dtsi"
-#include "rv1126-edgeble-neu2.dtsi"
-
-/ {
-	model = "Edgeble Neu2 IO Board";
-	compatible = "edgeble,neural-compute-module-2-io",
-		     "edgeble,neural-compute-module-2", "rockchip,rv1126";
-
-	aliases {
-		serial2 = &uart2;
-	};
-
-	chosen {
-		stdout-path = "serial2:1500000n8";
-	};
-
-	vcc12v_dcin: vcc12v-dcin-regulator {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc12v_dcin";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <12000000>;
-		regulator-max-microvolt = <12000000>;
-	};
-
-	vcc5v0_sys: vcc5v0-sys-regulator {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_sys";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc12v_dcin>;
-	};
-
-	v3v3_sys: v3v3-sys-regulator {
-		compatible = "regulator-fixed";
-		regulator-name = "v3v3_sys";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		vin-supply = <&vcc5v0_sys>;
-	};
-};
-
-&gmac {
-	assigned-clocks = <&cru CLK_GMAC_SRC>, <&cru CLK_GMAC_TX_RX>,
-			  <&cru CLK_GMAC_ETHERNET_OUT>;
-	assigned-clock-parents = <&cru CLK_GMAC_SRC_M1>, <&cru RGMII_MODE_CLK>;
-	assigned-clock-rates = <125000000>, <0>, <25000000>;
-	clock_in_out = "input";
-	phy-handle = <&phy>;
-	phy-mode = "rgmii";
-	phy-supply = <&vcc_3v3>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&rgmiim1_miim &rgmiim1_bus2 &rgmiim1_bus4 &clk_out_ethernetm1_pins>;
-	tx_delay = <0x2a>;
-	rx_delay = <0x1a>;
-	status = "okay";
-};
-
-&mdio {
-	phy: ethernet-phy@0 {
-		compatible = "ethernet-phy-id001c.c916",
-			     "ethernet-phy-ieee802.3-c22";
-		reg = <0x0>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&eth_phy_rst>;
-		reset-assert-us = <20000>;
-		reset-deassert-us = <100000>;
-		reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
-	};
-};
-
-&pinctrl {
-	ethernet {
-		eth_phy_rst: eth-phy-rst {
-			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
-		};
-	};
-};
-
-&pwm11 {
-	status = "okay";
-};
-
-&sdmmc {
-	bus-width = <4>;
-	cap-mmc-highspeed;
-	cap-sd-highspeed;
-	card-detect-delay = <200>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_bus4 &sdmmc0_det>;
-	rockchip,default-sample-phase = <90>;
-	sd-uhs-sdr12;
-	sd-uhs-sdr25;
-	sd-uhs-sdr104;
-	vqmmc-supply = <&vccio_sd>;
-	status = "okay";
-};
-
-&uart2 {
-	status = "okay";
-};
diff --git a/arch/arm/dts/rv1126-edgeble-neu2.dtsi b/arch/arm/dts/rv1126-edgeble-neu2.dtsi
deleted file mode 100644
index 7ea8d7d16f..0000000000
--- a/arch/arm/dts/rv1126-edgeble-neu2.dtsi
+++ /dev/null
@@ -1,345 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
- * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
- */
-
-/ {
-	compatible = "edgeble,neural-compute-module-2", "rockchip,rv1126";
-
-	aliases {
-		mmc0 = &emmc;
-	};
-
-	vccio_flash: vccio-flash-regulator {
-		compatible = "regulator-fixed";
-		enable-active-high;
-		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&flash_vol_sel>;
-		regulator-name = "vccio_flash";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-		vin-supply = <&vcc_3v3>;
-	};
-
-	sdio_pwrseq: pwrseq-sdio {
-		compatible = "mmc-pwrseq-simple";
-		clocks = <&rk809 1>;
-		clock-names = "ext_clock";
-		pinctrl-names = "default";
-		pinctrl-0 = <&wifi_enable_h>;
-		reset-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
-	};
-};
-
-&cpu0 {
-	cpu-supply = <&vdd_arm>;
-};
-
-&emmc {
-	bus-width = <8>;
-	non-removable;
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk>;
-	rockchip,default-sample-phase = <90>;
-	vmmc-supply = <&vcc_3v3>;
-	vqmmc-supply = <&vccio_flash>;
-	status = "okay";
-};
-
-&i2c0 {
-	clock-frequency = <400000>;
-	status = "okay";
-
-	rk809: pmic@20 {
-		compatible = "rockchip,rk809";
-		reg = <0x20>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <RK_PB1 IRQ_TYPE_LEVEL_LOW>;
-		#clock-cells = <1>;
-		clock-output-names = "rk808-clkout1", "rk808-clkout2";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pmic_int_l>;
-		rockchip,system-power-controller;
-		wakeup-source;
-
-		vcc1-supply = <&vcc5v0_sys>;
-		vcc2-supply = <&vcc5v0_sys>;
-		vcc3-supply = <&vcc5v0_sys>;
-		vcc4-supply = <&vcc5v0_sys>;
-		vcc5-supply = <&vcc_buck5>;
-		vcc6-supply = <&vcc_buck5>;
-		vcc7-supply = <&vcc5v0_sys>;
-		vcc8-supply = <&vcc3v3_sys>;
-		vcc9-supply = <&vcc5v0_sys>;
-
-		regulators {
-			vdd_npu_vepu: DCDC_REG1 {
-				regulator-name = "vdd_npu_vepu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <650000>;
-				regulator-max-microvolt = <950000>;
-				regulator-ramp-delay = <6001>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vdd_arm: DCDC_REG2 {
-				regulator-name = "vdd_arm";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <725000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-ramp-delay = <6001>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_ddr: DCDC_REG3 {
-				regulator-name = "vcc_ddr";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-				};
-			};
-
-			vcc3v3_sys: DCDC_REG4 {
-				regulator-name = "vcc3v3_sys";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <3300000>;
-				};
-			};
-
-			vcc_buck5: DCDC_REG5 {
-				regulator-name = "vcc_buck5";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <2200000>;
-				regulator-max-microvolt = <2200000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <2200000>;
-				};
-			};
-
-			vcc_0v8: LDO_REG1 {
-				regulator-name = "vcc_0v8";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <800000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc1v8_pmu: LDO_REG2 {
-				regulator-name = "vcc1v8_pmu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <1800000>;
-				};
-			};
-
-			vdd0v8_pmu: LDO_REG3 {
-				regulator-name = "vcc0v8_pmu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <800000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <800000>;
-				};
-			};
-
-			vcc_1v8: LDO_REG4 {
-				regulator-name = "vcc_1v8";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <1800000>;
-				};
-			};
-
-			vcc_dovdd: LDO_REG5 {
-				regulator-name = "vcc_dovdd";
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_dvdd: LDO_REG6 {
-				regulator-name = "vcc_dvdd";
-				regulator-min-microvolt = <1200000>;
-				regulator-max-microvolt = <1200000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_avdd: LDO_REG7 {
-				regulator-name = "vcc_avdd";
-				regulator-min-microvolt = <2800000>;
-				regulator-max-microvolt = <2800000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vccio_sd: LDO_REG8 {
-				regulator-name = "vccio_sd";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc3v3_sd: LDO_REG9 {
-				regulator-name = "vcc3v3_sd";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_5v0: SWITCH_REG1 {
-				regulator-name = "vcc_5v0";
-			};
-
-			vcc_3v3: SWITCH_REG2 {
-				regulator-name = "vcc_3v3";
-				regulator-always-on;
-				regulator-boot-on;
-			};
-		};
-	};
-};
-
-&pinctrl {
-	bt {
-		bt_enable: bt-enable {
-			rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-
-	flash {
-		flash_vol_sel: flash-vol-sel {
-			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-
-	pmic {
-		pmic_int_l: pmic-int-l {
-			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
-	wifi {
-		wifi_enable_h: wifi-enable-h {
-			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-};
-
-&pmu_io_domains {
-	pmuio0-supply = <&vcc1v8_pmu>;
-	pmuio1-supply = <&vcc3v3_sys>;
-	vccio1-supply = <&vccio_flash>;
-	vccio2-supply = <&vccio_sd>;
-	vccio3-supply = <&vcc_1v8>;
-	vccio4-supply = <&vcc_dovdd>;
-	vccio5-supply = <&vcc_1v8>;
-	vccio6-supply = <&vcc_1v8>;
-	vccio7-supply = <&vcc_dovdd>;
-	status = "okay";
-};
-
-&saradc {
-	vref-supply = <&vcc_1v8>;
-	status = "okay";
-};
-
-&sfc {
-	pinctrl-names = "default";
-	pinctrl-0 = <&fspi_pins>;
-	#address-cells = <1>;
-	#size-cells = <0>;
-	status = "okay";
-
-	flash@0 {
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-		spi-max-frequency = <50000000>;
-		spi-rx-bus-width = <4>;
-		spi-tx-bus-width = <1>;
-	};
-};
-
-&sdio {
-	bus-width = <4>;
-	cap-sd-highspeed;
-	cap-sdio-irq;
-	keep-power-in-suspend;
-	max-frequency = <100000000>;
-	mmc-pwrseq = <&sdio_pwrseq>;
-	non-removable;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc1_clk &sdmmc1_cmd &sdmmc1_bus4>;
-	rockchip,default-sample-phase = <90>;
-	sd-uhs-sdr104;
-	vmmc-supply = <&vcc3v3_sys>;
-	vqmmc-supply = <&vcc_1v8>;
-	status = "okay";
-	#address-cells = <1>;
-	#size-cells = <0>;
-};
-
-&uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_xfer &uart0_ctsn &uart0_rtsn>;
-	status = "okay";
-
-	bluetooth {
-		compatible = "qcom,qca9377-bt";
-		clocks = <&rk809 1>;
-		enable-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; /* BT_RST */
-		max-speed = <2000000>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&bt_enable>;
-		vddxo-supply = <&vcc3v3_sys>;
-		vddio-supply = <&vcc_1v8>;
-	};
-};
diff --git a/arch/arm/dts/rv1126-pinctrl.dtsi b/arch/arm/dts/rv1126-pinctrl.dtsi
deleted file mode 100644
index f84f5f2d96..0000000000
--- a/arch/arm/dts/rv1126-pinctrl.dtsi
+++ /dev/null
@@ -1,341 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd
- */
-
-#include <dt-bindings/pinctrl/rockchip.h>
-#include "rockchip-pinconf.dtsi"
-
-/*
- * This file is auto generated by pin2dts tool, please keep these code
- * by adding changes at end of this file.
- */
-&pinctrl {
-	clk_out_ethernet {
-		/omit-if-no-ref/
-		clk_out_ethernetm1_pins: clk-out-ethernetm1-pins {
-			rockchip,pins =
-				/* clk_out_ethernet_m1 */
-				<2 RK_PC5 2 &pcfg_pull_none>;
-		};
-	};
-	emmc {
-		/omit-if-no-ref/
-		emmc_rstnout: emmc-rstnout {
-			rockchip,pins =
-				/* emmc_rstn */
-				<1 RK_PA3 2 &pcfg_pull_none>;
-		};
-		/omit-if-no-ref/
-		emmc_bus8: emmc-bus8 {
-			rockchip,pins =
-				/* emmc_d0 */
-				<0 RK_PC4 2 &pcfg_pull_up_drv_level_2>,
-				/* emmc_d1 */
-				<0 RK_PC5 2 &pcfg_pull_up_drv_level_2>,
-				/* emmc_d2 */
-				<0 RK_PC6 2 &pcfg_pull_up_drv_level_2>,
-				/* emmc_d3 */
-				<0 RK_PC7 2 &pcfg_pull_up_drv_level_2>,
-				/* emmc_d4 */
-				<0 RK_PD0 2 &pcfg_pull_up_drv_level_2>,
-				/* emmc_d5 */
-				<0 RK_PD1 2 &pcfg_pull_up_drv_level_2>,
-				/* emmc_d6 */
-				<0 RK_PD2 2 &pcfg_pull_up_drv_level_2>,
-				/* emmc_d7 */
-				<0 RK_PD3 2 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		emmc_clk: emmc-clk {
-			rockchip,pins =
-				/* emmc_clko */
-				<0 RK_PD7 2 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		emmc_cmd: emmc-cmd {
-			rockchip,pins =
-				/* emmc_cmd */
-				<0 RK_PD5 2 &pcfg_pull_up_drv_level_2>;
-		};
-	};
-	fspi {
-		/omit-if-no-ref/
-		fspi_pins: fspi-pins {
-			rockchip,pins =
-				/* fspi_clk */
-				<1 RK_PA3 3 &pcfg_pull_down>,
-				/* fspi_cs0n */
-				<0 RK_PD4 3 &pcfg_pull_up>,
-				/* fspi_d0 */
-				<1 RK_PA0 3 &pcfg_pull_up>,
-				/* fspi_d1 */
-				<1 RK_PA1 3 &pcfg_pull_up>,
-				/* fspi_d2 */
-				<0 RK_PD6 3 &pcfg_pull_up>,
-				/* fspi_d3 */
-				<1 RK_PA2 3 &pcfg_pull_up>;
-		};
-	};
-	i2c0 {
-		/omit-if-no-ref/
-		i2c0_xfer: i2c0-xfer {
-			rockchip,pins =
-				/* i2c0_scl */
-				<0 RK_PB4 1 &pcfg_pull_none_drv_level_0_smt>,
-				/* i2c0_sda */
-				<0 RK_PB5 1 &pcfg_pull_none_drv_level_0_smt>;
-		};
-	};
-	i2c2 {
-		/omit-if-no-ref/
-		i2c2_xfer: i2c2-xfer {
-			rockchip,pins =
-				/* i2c2_scl */
-				<0 RK_PC2 1 &pcfg_pull_none_drv_level_0_smt>,
-				/* i2c2_sda */
-				<0 RK_PC3 1 &pcfg_pull_none_drv_level_0_smt>;
-		};
-	};
-	pwm2 {
-		/omit-if-no-ref/
-		pwm2m0_pins: pwm2m0-pins {
-			rockchip,pins =
-				/* pwm2_pin_m0 */
-				<0 RK_PC0 3 &pcfg_pull_none>;
-		};
-	};
-	pwm11 {
-		/omit-if-no-ref/
-		pwm11m0_pins: pwm11m0-pins {
-			rockchip,pins =
-				/* pwm11_pin_m0 */
-				<3 RK_PA7 6 &pcfg_pull_none>;
-		};
-	};
-	rgmii {
-		/omit-if-no-ref/
-		rgmiim1_miim: rgmiim1-miim {
-			rockchip,pins =
-				/* rgmii_mdc_m1 */
-				<2 RK_PC2 2 &pcfg_pull_none>,
-				/* rgmii_mdio_m1 */
-				<2 RK_PC1 2 &pcfg_pull_none>;
-		};
-		/omit-if-no-ref/
-		rgmiim1_rxer: rgmiim1-rxer {
-			rockchip,pins =
-				/* rgmii_rxer_m1 */
-				<2 RK_PC0 2 &pcfg_pull_none>;
-		};
-		/omit-if-no-ref/
-		rgmiim1_bus2: rgmiim1-bus2 {
-			rockchip,pins =
-				/* rgmii_rxd0_m1 */
-				<2 RK_PB5 2 &pcfg_pull_none>,
-				/* rgmii_rxd1_m1 */
-				<2 RK_PB6 2 &pcfg_pull_none>,
-				/* rgmii_rxdv_m1 */
-				<2 RK_PB4 2 &pcfg_pull_none>,
-				/* rgmii_txd0_m1 */
-				<2 RK_PC3 2 &pcfg_pull_none_drv_level_3>,
-				/* rgmii_txd1_m1 */
-				<2 RK_PC4 2 &pcfg_pull_none_drv_level_3>,
-				/* rgmii_txen_m1 */
-				<2 RK_PC6 2 &pcfg_pull_none_drv_level_3>;
-		};
-		/omit-if-no-ref/
-		rgmiim1_bus4: rgmiim1-bus4 {
-			rockchip,pins =
-				/* rgmii_rxclk_m1 */
-				<2 RK_PD3 2 &pcfg_pull_none>,
-				/* rgmii_rxd2_m1 */
-				<2 RK_PC7 2 &pcfg_pull_none>,
-				/* rgmii_rxd3_m1 */
-				<2 RK_PD0 2 &pcfg_pull_none>,
-				/* rgmii_txclk_m1 */
-				<2 RK_PD2 2 &pcfg_pull_none_drv_level_3>,
-				/* rgmii_txd2_m1 */
-				<2 RK_PD1 2 &pcfg_pull_none_drv_level_3>,
-				/* rgmii_txd3_m1 */
-				<2 RK_PA4 2 &pcfg_pull_none_drv_level_3>;
-		};
-		/omit-if-no-ref/
-		rgmiim1_mclkinout: rgmiim1-mclkinout {
-			rockchip,pins =
-				/* rgmii_clk_m1 */
-				<2 RK_PB7 2 &pcfg_pull_none>;
-		};
-	};
-	sdmmc0 {
-		/omit-if-no-ref/
-		sdmmc0_bus4: sdmmc0-bus4 {
-			rockchip,pins =
-				/* sdmmc0_d0 */
-				<1 RK_PA4 1 &pcfg_pull_up_drv_level_2>,
-				/* sdmmc0_d1 */
-				<1 RK_PA5 1 &pcfg_pull_up_drv_level_2>,
-				/* sdmmc0_d2 */
-				<1 RK_PA6 1 &pcfg_pull_up_drv_level_2>,
-				/* sdmmc0_d3 */
-				<1 RK_PA7 1 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		sdmmc0_clk: sdmmc0-clk {
-			rockchip,pins =
-				/* sdmmc0_clk */
-				<1 RK_PB0 1 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		sdmmc0_cmd: sdmmc0-cmd {
-			rockchip,pins =
-				/* sdmmc0_cmd */
-				<1 RK_PB1 1 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		sdmmc0_det: sdmmc0-det {
-			rockchip,pins =
-				<0 RK_PA3 1 &pcfg_pull_none>;
-		};
-		/omit-if-no-ref/
-		sdmmc0_pwr: sdmmc0-pwr {
-			rockchip,pins =
-				<0 RK_PC0 1 &pcfg_pull_none>;
-		};
-	};
-	sdmmc1 {
-		/omit-if-no-ref/
-		sdmmc1_bus4: sdmmc1-bus4 {
-			rockchip,pins =
-				/* sdmmc1_d0 */
-				<1 RK_PB4 1 &pcfg_pull_up_drv_level_2>,
-				/* sdmmc1_d1 */
-				<1 RK_PB5 1 &pcfg_pull_up_drv_level_2>,
-				/* sdmmc1_d2 */
-				<1 RK_PB6 1 &pcfg_pull_up_drv_level_2>,
-				/* sdmmc1_d3 */
-				<1 RK_PB7 1 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		sdmmc1_clk: sdmmc1-clk {
-			rockchip,pins =
-				/* sdmmc1_clk */
-				<1 RK_PB2 1 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		sdmmc1_cmd: sdmmc1-cmd {
-			rockchip,pins =
-				/* sdmmc1_cmd */
-				<1 RK_PB3 1 &pcfg_pull_up_drv_level_2>;
-		};
-		/omit-if-no-ref/
-		sdmmc1_det: sdmmc1-det {
-			rockchip,pins =
-				<1 RK_PD0 2 &pcfg_pull_none>;
-		};
-		/omit-if-no-ref/
-		sdmmc1_pwr: sdmmc1-pwr {
-			rockchip,pins =
-				<1 RK_PD1 2 &pcfg_pull_none>;
-		};
-	};
-	uart0 {
-		/omit-if-no-ref/
-		uart0_xfer: uart0-xfer {
-			rockchip,pins =
-				/* uart0_rx */
-				<1 RK_PC2 1 &pcfg_pull_up>,
-				/* uart0_tx */
-				<1 RK_PC3 1 &pcfg_pull_up>;
-		};
-		/omit-if-no-ref/
-		uart0_ctsn: uart0-ctsn {
-			rockchip,pins =
-				<1 RK_PC1 1 &pcfg_pull_none>;
-		};
-		/omit-if-no-ref/
-		uart0_rtsn: uart0-rtsn {
-			rockchip,pins =
-				<1 RK_PC0 1 &pcfg_pull_none>;
-		};
-		/omit-if-no-ref/
-		uart0_rtsn_gpio: uart0-rts-pin {
-			rockchip,pins =
-				<1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-	uart1 {
-		/omit-if-no-ref/
-		uart1m0_xfer: uart1m0-xfer {
-			rockchip,pins =
-				/* uart1_rx_m0 */
-				<0 RK_PB7 2 &pcfg_pull_up>,
-				/* uart1_tx_m0 */
-				<0 RK_PB6 2 &pcfg_pull_up>;
-		};
-	};
-	uart2 {
-		/omit-if-no-ref/
-		uart2m1_xfer: uart2m1-xfer {
-			rockchip,pins =
-				/* uart2_rx_m1 */
-				<3 RK_PA3 1 &pcfg_pull_up>,
-				/* uart2_tx_m1 */
-				<3 RK_PA2 1 &pcfg_pull_up>;
-		};
-	};
-	uart3 {
-		/omit-if-no-ref/
-		uart3m0_xfer: uart3m0-xfer {
-			rockchip,pins =
-				/* uart3_rx_m0 */
-				<3 RK_PC7 4 &pcfg_pull_up>,
-				/* uart3_tx_m0 */
-				<3 RK_PC6 4 &pcfg_pull_up>;
-		};
-		/omit-if-no-ref/
-		uart3m2_xfer: uart3m2-xfer {
-			rockchip,pins =
-				/* uart3_rx_m2 */
-				<3 RK_PA1 4 &pcfg_pull_up>,
-				/* uart3_tx_m2 */
-				<3 RK_PA0 4 &pcfg_pull_up>;
-		};
-	};
-	uart4 {
-		/omit-if-no-ref/
-		uart4m0_xfer: uart4m0-xfer {
-			rockchip,pins =
-				/* uart4_rx_m0 */
-				<3 RK_PA5 4 &pcfg_pull_up>,
-				/* uart4_tx_m0 */
-				<3 RK_PA4 4 &pcfg_pull_up>;
-		};
-		/omit-if-no-ref/
-		uart4m2_xfer: uart4m2-xfer {
-			rockchip,pins =
-				/* uart4_rx_m2 */
-				<1 RK_PD4 3 &pcfg_pull_up>,
-				/* uart4_tx_m2 */
-				<1 RK_PD5 3 &pcfg_pull_up>;
-		};
-	};
-	uart5 {
-		/omit-if-no-ref/
-		uart5m0_xfer: uart5m0-xfer {
-			rockchip,pins =
-				/* uart5_rx_m0 */
-				<3 RK_PA7 4 &pcfg_pull_up>,
-				/* uart5_tx_m0 */
-				<3 RK_PA6 4 &pcfg_pull_up>;
-		};
-		/omit-if-no-ref/
-		uart5m2_xfer: uart5m2-xfer {
-			rockchip,pins =
-				/* uart5_rx_m2 */
-				<2 RK_PA1 3 &pcfg_pull_up>,
-				/* uart5_tx_m2 */
-				<2 RK_PA0 3 &pcfg_pull_up>;
-		};
-	};
-};
diff --git a/arch/arm/dts/rv1126-sonoff-ihost.dts b/arch/arm/dts/rv1126-sonoff-ihost.dts
deleted file mode 100644
index 77386a48d8..0000000000
--- a/arch/arm/dts/rv1126-sonoff-ihost.dts
+++ /dev/null
@@ -1,29 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
- */
-
-/dts-v1/;
-#include "rv1126.dtsi"
-#include "rv1126-sonoff-ihost.dtsi"
-
-/ {
-	model = "Sonoff iHost 4G";
-	compatible = "itead,sonoff-ihost", "rockchip,rv1126";
-};
-
-&cpu0 {
-	cpu-supply = <&vdd_arm>;
-};
-
-&cpu1 {
-	cpu-supply = <&vdd_arm>;
-};
-
-&cpu2 {
-	cpu-supply = <&vdd_arm>;
-};
-
-&cpu3 {
-	cpu-supply = <&vdd_arm>;
-};
diff --git a/arch/arm/dts/rv1126-sonoff-ihost.dtsi b/arch/arm/dts/rv1126-sonoff-ihost.dtsi
deleted file mode 100644
index 32b329e87a..0000000000
--- a/arch/arm/dts/rv1126-sonoff-ihost.dtsi
+++ /dev/null
@@ -1,404 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
- * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
- */
-
-/ {
-	aliases {
-		ethernet0 = &gmac;
-		mmc0 = &emmc;
-	};
-
-	chosen {
-		stdout-path = "serial2:1500000n8";
-	};
-
-	vcc5v0_sys: regulator-vcc5v0-sys {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_sys";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-	};
-
-	sdio_pwrseq: pwrseq-sdio {
-		compatible = "mmc-pwrseq-simple";
-		clocks = <&rk809 1>;
-		clock-names = "ext_clock";
-		pinctrl-names = "default";
-		pinctrl-0 = <&wifi_enable_h>;
-		reset-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
-	};
-};
-
-&emmc {
-	bus-width = <8>;
-	cap-mmc-highspeed;
-	mmc-hs200-1_8v;
-	non-removable;
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk &emmc_rstnout>;
-	rockchip,default-sample-phase = <90>;
-	vmmc-supply = <&vcc_3v3>;
-	vqmmc-supply = <&vcc_1v8>;
-	status = "okay";
-};
-
-&i2c0 {
-	clock-frequency = <400000>;
-	status = "okay";
-
-	rk809: pmic@20 {
-		compatible = "rockchip,rk809";
-		reg = <0x20>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <RK_PB1 IRQ_TYPE_LEVEL_LOW>;
-		#clock-cells = <1>;
-		clock-output-names = "rk808-clkout1", "rk808-clkout2";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pmic_int_l>;
-		rockchip,system-power-controller;
-		wakeup-source;
-
-		vcc1-supply = <&vcc5v0_sys>;
-		vcc2-supply = <&vcc5v0_sys>;
-		vcc3-supply = <&vcc5v0_sys>;
-		vcc4-supply = <&vcc5v0_sys>;
-		vcc5-supply = <&vcc_buck5>;
-		vcc6-supply = <&vcc_buck5>;
-		vcc7-supply = <&vcc5v0_sys>;
-		vcc8-supply = <&vcc3v3_sys>;
-		vcc9-supply = <&vcc5v0_sys>;
-
-		regulators {
-			vdd_npu_vepu: DCDC_REG1 {
-				regulator-name = "vdd_npu_vepu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <650000>;
-				regulator-max-microvolt = <950000>;
-				regulator-ramp-delay = <6001>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vdd_arm: DCDC_REG2 {
-				regulator-name = "vdd_arm";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <725000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-ramp-delay = <6001>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_ddr: DCDC_REG3 {
-				regulator-name = "vcc_ddr";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-				};
-			};
-
-			vcc3v3_sys: DCDC_REG4 {
-				regulator-name = "vcc3v3_sys";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <3300000>;
-				};
-			};
-
-			vcc_buck5: DCDC_REG5 {
-				regulator-name = "vcc_buck5";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <2200000>;
-				regulator-max-microvolt = <2200000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <2200000>;
-				};
-			};
-
-			vcc_0v8: LDO_REG1 {
-				regulator-name = "vcc_0v8";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <800000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc1v8_pmu: LDO_REG2 {
-				regulator-name = "vcc1v8_pmu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <1800000>;
-				};
-			};
-
-			vdd0v8_pmu: LDO_REG3 {
-				regulator-name = "vcc0v8_pmu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <800000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <800000>;
-				};
-			};
-
-			vcc_1v8: LDO_REG4 {
-				regulator-name = "vcc_1v8";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <1800000>;
-				};
-			};
-
-			vcc_dovdd: LDO_REG5 {
-				regulator-name = "vcc_dovdd";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_dvdd: LDO_REG6 {
-				regulator-name = "vcc_dvdd";
-				regulator-min-microvolt = <1200000>;
-				regulator-max-microvolt = <1200000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_avdd: LDO_REG7 {
-				regulator-name = "vcc_avdd";
-				regulator-min-microvolt = <2800000>;
-				regulator-max-microvolt = <2800000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vccio_sd: LDO_REG8 {
-				regulator-name = "vccio_sd";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc3v3_sd: LDO_REG9 {
-				regulator-name = "vcc3v3_sd";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_5v0: SWITCH_REG1 {
-				regulator-name = "vcc_5v0";
-			};
-
-			vcc_3v3: SWITCH_REG2 {
-				regulator-name = "vcc_3v3";
-				regulator-always-on;
-				regulator-boot-on;
-			};
-		};
-	};
-};
-
-&i2c2 {
-	status = "okay";
-	clock-frequency = <400000>;
-
-	pcf8563: rtc@51 {
-		compatible = "nxp,pcf8563";
-		reg = <0x51>;
-		#clock-cells = <0>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
-		clock-output-names = "xin32k";
-	};
-};
-
-&gmac {
-	assigned-clocks = <&cru CLK_GMAC_SRC_M1>, <&cru CLK_GMAC_SRC>,
-			  <&cru CLK_GMAC_TX_RX>;
-	assigned-clock-parents = <&cru CLK_GMAC_RGMII_M1>, <&cru CLK_GMAC_SRC_M1>,
-				 <&cru RMII_MODE_CLK>;
-	assigned-clock-rates = <0>, <50000000>;
-	clock_in_out = "output";
-	phy-handle = <&phy>;
-	phy-mode = "rmii";
-	phy-supply = <&vcc_3v3>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&rgmiim1_miim &rgmiim1_rxer &rgmiim1_bus2 &rgmiim1_mclkinout>;
-	status = "okay";
-};
-
-&mdio {
-	phy: ethernet-phy@0 {
-		compatible = "ethernet-phy-ieee802.3-c22";
-		reg = <0x0>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&eth_phy_rst>;
-		reset-active-low;
-		reset-assert-us = <50000>;
-		reset-deassert-us = <10000>;
-		reset-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
-	};
-};
-
-&pinctrl {
-	ethernet {
-		eth_phy_rst: eth-phy-rst {
-			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
-		};
-	};
-	bt {
-		bt_enable: bt-enable {
-			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-
-		bt_wake_dev: bt-wake-dev {
-			rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-
-		bt_wake_host: bt-wake-host {
-			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-
-	pmic {
-		pmic_int_l: pmic-int-l {
-			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
-	wifi {
-		wifi_enable_h: wifi-enable-h {
-			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-};
-
-&pmu_io_domains {
-	pmuio0-supply = <&vcc1v8_pmu>;
-	pmuio1-supply = <&vcc3v3_sys>;
-	vccio1-supply = <&vcc_1v8>;
-	vccio2-supply = <&vccio_sd>;
-	vccio3-supply = <&vcc_1v8>;
-	vccio4-supply = <&vcc_dovdd>;
-	vccio5-supply = <&vcc_1v8>;
-	vccio6-supply = <&vcc_1v8>;
-	vccio7-supply = <&vcc_dovdd>;
-	status = "okay";
-};
-
-&saradc {
-	vref-supply = <&vcc_1v8>;
-	status = "okay";
-};
-
-&sdio {
-	bus-width = <4>;
-	cap-sd-highspeed;
-	cap-sdio-irq;
-	keep-power-in-suspend;
-	max-frequency = <100000000>;
-	mmc-pwrseq = <&sdio_pwrseq>;
-	non-removable;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc1_clk &sdmmc1_cmd &sdmmc1_bus4>;
-	rockchip,default-sample-phase = <90>;
-	sd-uhs-sdr104;
-	vmmc-supply = <&vcc3v3_sys>;
-	vqmmc-supply = <&vcc_1v8>;
-	status = "okay";
-};
-
-&sdmmc {
-	bus-width = <4>;
-	cap-mmc-highspeed;
-	cap-sd-highspeed;
-	card-detect-delay = <200>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_bus4 &sdmmc0_det>;
-	rockchip,default-sample-phase = <90>;
-	sd-uhs-sdr12;
-	sd-uhs-sdr25;
-	sd-uhs-sdr104;
-	vqmmc-supply = <&vccio_sd>;
-	status = "okay";
-};
-
-&uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_xfer &uart0_ctsn &uart0_rtsn>;
-	uart-has-rtscts;
-	status = "okay";
-
-	bluetooth {
-		compatible = "realtek,rtl8723ds-bt";
-		device-wake-gpios = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>; /* BT_WAKE */
-		enable-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>; /* BT_RST */
-		host-wake-gpios = <&gpio1 RK_PC5 GPIO_ACTIVE_HIGH>; /* BT_WAKE_HOST */
-		max-speed = <2000000>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&bt_enable>, <&bt_wake_dev>, <&bt_wake_host>;
-	};
-};
-
-&uart2 {
-	status = "okay";
-};
-
-&uart3 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart3m2_xfer>;
-	status = "okay";
-};
-
-&uart4 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart4m2_xfer>;
-	status = "okay";
-};
diff --git a/arch/arm/dts/rv1126.dtsi b/arch/arm/dts/rv1126.dtsi
deleted file mode 100644
index bb603cae13..0000000000
--- a/arch/arm/dts/rv1126.dtsi
+++ /dev/null
@@ -1,623 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd.
- */
-
-#include <dt-bindings/clock/rockchip,rv1126-cru.h>
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/pinctrl/rockchip.h>
-#include <dt-bindings/power/rockchip,rv1126-power.h>
-#include <dt-bindings/soc/rockchip,boot-mode.h>
-
-/ {
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	compatible = "rockchip,rv1126";
-
-	interrupt-parent = <&gic>;
-
-	aliases {
-		i2c0 = &i2c0;
-		i2c2 = &i2c2;
-		serial0 = &uart0;
-		serial1 = &uart1;
-		serial2 = &uart2;
-		serial3 = &uart3;
-		serial4 = &uart4;
-		serial5 = &uart5;
-	};
-
-	cpus {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		cpu0: cpu@f00 {
-			device_type = "cpu";
-			compatible = "arm,cortex-a7";
-			reg = <0xf00>;
-			enable-method = "psci";
-			clocks = <&cru ARMCLK>;
-		};
-
-		cpu1: cpu@f01 {
-			device_type = "cpu";
-			compatible = "arm,cortex-a7";
-			reg = <0xf01>;
-			enable-method = "psci";
-			clocks = <&cru ARMCLK>;
-		};
-
-		cpu2: cpu@f02 {
-			device_type = "cpu";
-			compatible = "arm,cortex-a7";
-			reg = <0xf02>;
-			enable-method = "psci";
-			clocks = <&cru ARMCLK>;
-		};
-
-		cpu3: cpu@f03 {
-			device_type = "cpu";
-			compatible = "arm,cortex-a7";
-			reg = <0xf03>;
-			enable-method = "psci";
-			clocks = <&cru ARMCLK>;
-		};
-	};
-
-	arm-pmu {
-		compatible = "arm,cortex-a7-pmu";
-		interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
-		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
-	};
-
-	psci {
-		compatible = "arm,psci-1.0";
-		method = "smc";
-	};
-
-	timer {
-		compatible = "arm,armv7-timer";
-		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
-		clock-frequency = <24000000>;
-	};
-
-	display_subsystem {
-		compatible = "rockchip,display-subsystem";
-		ports = <&vop_out>;
-	};
-
-	xin24m: oscillator {
-		compatible = "fixed-clock";
-		clock-frequency = <24000000>;
-		clock-output-names = "xin24m";
-		#clock-cells = <0>;
-	};
-
-	grf: syscon@fe000000 {
-		compatible = "rockchip,rv1126-grf", "syscon", "simple-mfd";
-		reg = <0xfe000000 0x20000>;
-	};
-
-	pmugrf: syscon@fe020000 {
-		compatible = "rockchip,rv1126-pmugrf", "syscon", "simple-mfd";
-		reg = <0xfe020000 0x1000>;
-
-		pmu_io_domains: io-domains {
-			compatible = "rockchip,rv1126-pmu-io-voltage-domain";
-			status = "disabled";
-		};
-	};
-
-	qos_emmc: qos@fe860000 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe860000 0x20>;
-	};
-
-	qos_nandc: qos@fe860080 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe860080 0x20>;
-	};
-
-	qos_sfc: qos@fe860200 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe860200 0x20>;
-	};
-
-	qos_sdio: qos@fe86c000 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe86c000 0x20>;
-	};
-
-	qos_iep: qos@fe8a0000 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe8a0000 0x20>;
-	};
-
-	qos_rga_rd: qos@fe8a0080 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe8a0080 0x20>;
-	};
-
-	qos_rga_wr: qos@fe8a0100 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe8a0100 0x20>;
-	};
-
-	qos_vop: qos@fe8a0180 {
-		compatible = "rockchip,rv1126-qos", "syscon";
-		reg = <0xfe8a0180 0x20>;
-	};
-
-	gic: interrupt-controller@feff0000 {
-		compatible = "arm,gic-400";
-		interrupt-controller;
-		#interrupt-cells = <3>;
-		#address-cells = <0>;
-
-		reg = <0xfeff1000 0x1000>,
-		      <0xfeff2000 0x2000>,
-		      <0xfeff4000 0x2000>,
-		      <0xfeff6000 0x2000>;
-		interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
-	};
-
-	pmu: power-management@ff3e0000 {
-		compatible = "rockchip,rv1126-pmu", "syscon", "simple-mfd";
-		reg = <0xff3e0000 0x1000>;
-
-		power: power-controller {
-			compatible = "rockchip,rv1126-power-controller";
-			#power-domain-cells = <1>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			power-domain@RV1126_PD_NVM {
-				reg = <RV1126_PD_NVM>;
-				clocks = <&cru HCLK_EMMC>,
-					 <&cru CLK_EMMC>,
-					 <&cru HCLK_NANDC>,
-					 <&cru CLK_NANDC>,
-					 <&cru HCLK_SFC>,
-					 <&cru HCLK_SFCXIP>,
-					 <&cru SCLK_SFC>;
-				pm_qos = <&qos_emmc>,
-					 <&qos_nandc>,
-					 <&qos_sfc>;
-				#power-domain-cells = <0>;
-			};
-
-			power-domain@RV1126_PD_SDIO {
-				reg = <RV1126_PD_SDIO>;
-				clocks = <&cru HCLK_SDIO>,
-					 <&cru CLK_SDIO>;
-				pm_qos = <&qos_sdio>;
-				#power-domain-cells = <0>;
-			};
-
-			power-domain@RV1126_PD_VO {
-				reg = <RV1126_PD_VO>;
-				clocks = <&cru ACLK_RGA>,
-					 <&cru HCLK_RGA>,
-					 <&cru CLK_RGA_CORE>,
-					 <&cru ACLK_VOP>,
-					 <&cru HCLK_VOP>,
-					 <&cru DCLK_VOP>,
-					 <&cru PCLK_DSIHOST>,
-					 <&cru ACLK_IEP>,
-					 <&cru HCLK_IEP>,
-					 <&cru CLK_IEP_CORE>;
-				pm_qos = <&qos_rga_rd>,
-					 <&qos_rga_wr>,
-					 <&qos_vop>,
-					 <&qos_iep>;
-				#power-domain-cells = <0>;
-			};
-		};
-	};
-
-	i2c0: i2c@ff3f0000 {
-		compatible = "rockchip,rv1126-i2c", "rockchip,rk3399-i2c";
-		reg = <0xff3f0000 0x1000>;
-		interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
-		rockchip,grf = <&pmugrf>;
-		clocks = <&pmucru CLK_I2C0>, <&pmucru PCLK_I2C0>;
-		clock-names = "i2c", "pclk";
-		pinctrl-names = "default";
-		pinctrl-0 = <&i2c0_xfer>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		status = "disabled";
-	};
-
-	i2c2: i2c@ff400000 {
-		compatible = "rockchip,rv1126-i2c", "rockchip,rk3399-i2c";
-		reg = <0xff400000 0x1000>;
-		interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
-		rockchip,grf = <&pmugrf>;
-		clocks = <&pmucru CLK_I2C2>, <&pmucru PCLK_I2C2>;
-		clock-names = "i2c", "pclk";
-		pinctrl-names = "default";
-		pinctrl-0 = <&i2c2_xfer>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		status = "disabled";
-	};
-
-	uart1: serial@ff410000 {
-		compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
-		reg = <0xff410000 0x100>;
-		interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
-		clock-frequency = <24000000>;
-		clocks = <&pmucru SCLK_UART1>, <&pmucru PCLK_UART1>;
-		clock-names = "baudclk", "apb_pclk";
-		dmas = <&dmac 7>, <&dmac 6>;
-		dma-names = "tx", "rx";
-		pinctrl-names = "default";
-		pinctrl-0 = <&uart1m0_xfer>;
-		reg-shift = <2>;
-		reg-io-width = <4>;
-		status = "disabled";
-	};
-
-	pwm2: pwm@ff430020 {
-		compatible = "rockchip,rv1126-pwm", "rockchip,rk3328-pwm";
-		reg = <0xff430020 0x10>;
-		clock-names = "pwm", "pclk";
-		clocks = <&pmucru CLK_PWM0>, <&pmucru PCLK_PWM0>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&pwm2m0_pins>;
-		#pwm-cells = <3>;
-		status = "disabled";
-	};
-
-	pmucru: clock-controller@ff480000 {
-		compatible = "rockchip,rv1126-pmucru";
-		reg = <0xff480000 0x1000>;
-		rockchip,grf = <&grf>;
-		#clock-cells = <1>;
-		#reset-cells = <1>;
-	};
-
-	cru: clock-controller@ff490000 {
-		compatible = "rockchip,rv1126-cru";
-		reg = <0xff490000 0x1000>;
-		clocks = <&xin24m>;
-		clock-names = "xin24m";
-		rockchip,grf = <&grf>;
-		#clock-cells = <1>;
-		#reset-cells = <1>;
-	};
-
-	dmac: dma-controller@ff4e0000 {
-		compatible = "arm,pl330", "arm,primecell";
-		reg = <0xff4e0000 0x4000>;
-		interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-		#dma-cells = <1>;
-		arm,pl330-periph-burst;
-		clocks = <&cru ACLK_DMAC>;
-		clock-names = "apb_pclk";
-	};
-
-	pwm11: pwm@ff550030 {
-		compatible = "rockchip,rv1126-pwm", "rockchip,rk3328-pwm";
-		reg = <0xff550030 0x10>;
-		clock-names = "pwm", "pclk";
-		clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
-		pinctrl-0 = <&pwm11m0_pins>;
-		pinctrl-names = "default";
-		#pwm-cells = <3>;
-		status = "disabled";
-	};
-
-	uart0: serial@ff560000 {
-		compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
-		reg = <0xff560000 0x100>;
-		interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
-		clock-frequency = <24000000>;
-		clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
-		clock-names = "baudclk", "apb_pclk";
-		dmas = <&dmac 5>, <&dmac 4>;
-		dma-names = "tx", "rx";
-		pinctrl-names = "default";
-		pinctrl-0 = <&uart0_xfer>;
-		reg-shift = <2>;
-		reg-io-width = <4>;
-		status = "disabled";
-	};
-
-	uart2: serial@ff570000 {
-		compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
-		reg = <0xff570000 0x100>;
-		interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
-		clock-frequency = <24000000>;
-		clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
-		clock-names = "baudclk", "apb_pclk";
-		dmas = <&dmac 9>, <&dmac 8>;
-		dma-names = "tx", "rx";
-		pinctrl-names = "default";
-		pinctrl-0 = <&uart2m1_xfer>;
-		reg-shift = <2>;
-		reg-io-width = <4>;
-		status = "disabled";
-	};
-
-	uart3: serial@ff580000 {
-		compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
-		reg = <0xff580000 0x100>;
-		interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
-		clock-frequency = <24000000>;
-		clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
-		clock-names = "baudclk", "apb_pclk";
-		dmas = <&dmac 11>, <&dmac 10>;
-		dma-names = "tx", "rx";
-		pinctrl-names = "default";
-		pinctrl-0 = <&uart3m0_xfer>;
-		reg-shift = <2>;
-		reg-io-width = <4>;
-		status = "disabled";
-	};
-
-	uart4: serial@ff590000 {
-		compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
-		reg = <0xff590000 0x100>;
-		interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
-		clock-frequency = <24000000>;
-		clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
-		clock-names = "baudclk", "apb_pclk";
-		dmas = <&dmac 13>, <&dmac 12>;
-		dma-names = "tx", "rx";
-		pinctrl-names = "default";
-		pinctrl-0 = <&uart4m0_xfer>;
-		reg-shift = <2>;
-		reg-io-width = <4>;
-		status = "disabled";
-	};
-
-	uart5: serial@ff5a0000 {
-		compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
-		reg = <0xff5a0000 0x100>;
-		interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
-		clock-frequency = <24000000>;
-		clocks = <&cru SCLK_UART5>, <&cru PCLK_UART5>;
-		clock-names = "baudclk", "apb_pclk";
-		dmas = <&dmac 15>, <&dmac 14>;
-		dma-names = "tx", "rx";
-		pinctrl-names = "default";
-		pinctrl-0 = <&uart5m0_xfer>;
-		reg-shift = <2>;
-		reg-io-width = <4>;
-		status = "disabled";
-	};
-
-	saradc: adc@ff5e0000 {
-		compatible = "rockchip,rv1126-saradc", "rockchip,rk3399-saradc";
-		reg = <0xff5e0000 0x100>;
-		interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
-		#io-channel-cells = <1>;
-		clocks = <&cru CLK_SARADC>, <&cru PCLK_SARADC>;
-		clock-names = "saradc", "apb_pclk";
-		resets = <&cru SRST_SARADC_P>;
-		reset-names = "saradc-apb";
-		status = "disabled";
-	};
-
-	timer0: timer@ff660000 {
-		compatible = "rockchip,rv1126-timer", "rockchip,rk3288-timer";
-		reg = <0xff660000 0x20>;
-		interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cru PCLK_TIMER>, <&cru CLK_TIMER0>;
-		clock-names = "pclk", "timer";
-	};
-
-	vop: vop@ffb00000 {
-		compatible = "rockchip,rv1126-vop";
-		reg = <0xffb00000 0x200>, <0xffb00a00 0x400>;
-		interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
-		clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
-		clocks = <&cru ACLK_VOP>, <&cru DCLK_VOP>, <&cru HCLK_VOP>;
-		reset-names = "axi", "ahb", "dclk";
-		resets = <&cru SRST_VOP_A>, <&cru SRST_VOP_H>, <&cru SRST_VOP_D>;
-		iommus = <&vop_mmu>;
-		power-domains = <&power RV1126_PD_VO>;
-		status = "disabled";
-
-		vop_out: port {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			vop_out_rgb: endpoint@0 {
-				reg = <0>;
-			};
-
-			vop_out_dsi: endpoint@1 {
-				reg = <1>;
-			};
-		};
-	};
-
-	vop_mmu: iommu@ffb00f00 {
-		compatible = "rockchip,iommu";
-		reg = <0xffb00f00 0x100>;
-		interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
-		clock-names = "aclk", "iface";
-		clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
-		#iommu-cells = <0>;
-		power-domains = <&power RV1126_PD_VO>;
-		status = "disabled";
-	};
-
-	gmac: ethernet@ffc40000 {
-		compatible = "rockchip,rv1126-gmac", "snps,dwmac-4.20a";
-		reg = <0xffc40000 0x4000>;
-		interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
-		interrupt-names = "macirq", "eth_wake_irq";
-		rockchip,grf = <&grf>;
-		clocks = <&cru CLK_GMAC_SRC>, <&cru CLK_GMAC_TX_RX>,
-			 <&cru CLK_GMAC_TX_RX>, <&cru CLK_GMAC_REF>,
-			 <&cru ACLK_GMAC>, <&cru PCLK_GMAC>,
-			 <&cru CLK_GMAC_TX_RX>, <&cru CLK_GMAC_PTPREF>;
-		clock-names = "stmmaceth", "mac_clk_rx",
-			      "mac_clk_tx", "clk_mac_ref",
-			      "aclk_mac", "pclk_mac",
-			      "clk_mac_speed", "ptp_ref";
-		resets = <&cru SRST_GMAC_A>;
-		reset-names = "stmmaceth";
-
-		snps,mixed-burst;
-		snps,tso;
-
-		snps,axi-config = <&stmmac_axi_setup>;
-		snps,mtl-rx-config = <&mtl_rx_setup>;
-		snps,mtl-tx-config = <&mtl_tx_setup>;
-		status = "disabled";
-
-		mdio: mdio {
-			compatible = "snps,dwmac-mdio";
-			#address-cells = <0x1>;
-			#size-cells = <0x0>;
-		};
-
-		stmmac_axi_setup: stmmac-axi-config {
-			snps,wr_osr_lmt = <4>;
-			snps,rd_osr_lmt = <8>;
-			snps,blen = <0 0 0 0 16 8 4>;
-		};
-
-		mtl_rx_setup: rx-queues-config {
-			snps,rx-queues-to-use = <1>;
-			queue0 {};
-		};
-
-		mtl_tx_setup: tx-queues-config {
-			snps,tx-queues-to-use = <1>;
-			queue0 {};
-		};
-	};
-
-	emmc: mmc@ffc50000 {
-		compatible = "rockchip,rv1126-dw-mshc", "rockchip,rk3288-dw-mshc";
-		reg = <0xffc50000 0x4000>;
-		interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cru HCLK_EMMC>, <&cru CLK_EMMC>,
-			 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
-		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
-		fifo-depth = <0x100>;
-		max-frequency = <200000000>;
-		power-domains = <&power RV1126_PD_NVM>;
-		status = "disabled";
-	};
-
-	sdmmc: mmc@ffc60000 {
-		compatible = "rockchip,rv1126-dw-mshc", "rockchip,rk3288-dw-mshc";
-		reg = <0xffc60000 0x4000>;
-		interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cru HCLK_SDMMC>, <&cru CLK_SDMMC>,
-			 <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
-		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
-		fifo-depth = <0x100>;
-		max-frequency = <200000000>;
-		status = "disabled";
-	};
-
-	sdio: mmc@ffc70000 {
-		compatible = "rockchip,rv1126-dw-mshc", "rockchip,rk3288-dw-mshc";
-		reg = <0xffc70000 0x4000>;
-		interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cru HCLK_SDIO>, <&cru CLK_SDIO>,
-			 <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
-		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
-		fifo-depth = <0x100>;
-		max-frequency = <200000000>;
-		power-domains = <&power RV1126_PD_SDIO>;
-		status = "disabled";
-	};
-
-	sfc: spi@ffc90000  {
-		compatible = "rockchip,sfc";
-		reg = <0xffc90000 0x4000>;
-		interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
-		assigned-clocks = <&cru SCLK_SFC>;
-		assigned-clock-rates = <80000000>;
-		clock-names = "clk_sfc", "hclk_sfc";
-		clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
-		power-domains = <&power RV1126_PD_NVM>;
-		status = "disabled";
-	};
-
-	pinctrl: pinctrl {
-		compatible = "rockchip,rv1126-pinctrl";
-		rockchip,grf = <&grf>;
-		rockchip,pmu = <&pmugrf>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		gpio0: gpio@ff460000 {
-			compatible = "rockchip,gpio-bank";
-			reg = <0xff460000 0x100>;
-			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>;
-			gpio-controller;
-			#gpio-cells = <2>;
-			interrupt-controller;
-			#interrupt-cells = <2>;
-		};
-
-		gpio1: gpio@ff620000 {
-			compatible = "rockchip,gpio-bank";
-			reg = <0xff620000 0x100>;
-			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>;
-			gpio-controller;
-			#gpio-cells = <2>;
-			interrupt-controller;
-			#interrupt-cells = <2>;
-		};
-
-		gpio2: gpio@ff630000 {
-			compatible = "rockchip,gpio-bank";
-			reg = <0xff630000 0x100>;
-			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>;
-			gpio-controller;
-			#gpio-cells = <2>;
-			interrupt-controller;
-			#interrupt-cells = <2>;
-		};
-
-		gpio3: gpio@ff640000 {
-			compatible = "rockchip,gpio-bank";
-			reg = <0xff640000 0x100>;
-			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>;
-			gpio-controller;
-			#gpio-cells = <2>;
-			interrupt-controller;
-			#interrupt-cells = <2>;
-		};
-
-		gpio4: gpio@ff650000 {
-			compatible = "rockchip,gpio-bank";
-			reg = <0xff650000 0x100>;
-			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>;
-			gpio-controller;
-			#gpio-cells = <2>;
-			interrupt-controller;
-			#interrupt-cells = <2>;
-		};
-	};
-};
-
-#include "rv1126-pinctrl.dtsi"
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index ec3697f358..661e7fd1c9 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -427,6 +427,7 @@ config ROCKCHIP_RV1126
 	imply SPL_ROCKCHIP_COMMON_BOARD
 	imply SPL_SERIAL
 	imply SPL_SYSCON
+	imply OF_UPSTREAM
 
 config ROCKCHIP_USB_UART
 	bool "Route uart output to usb pins"
diff --git a/configs/neu2-io-rv1126_defconfig b/configs/neu2-io-rv1126_defconfig
index dc27b9e6fe..2a4c9b45a0 100644
--- a/configs/neu2-io-rv1126_defconfig
+++ b/configs/neu2-io-rv1126_defconfig
@@ -5,7 +5,7 @@ CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_SYS_ARCH_TIMER=y
 CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
-CONFIG_DEFAULT_DEVICE_TREE="rv1126-edgeble-neu2-io"
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rv1126-edgeble-neu2-io"
 CONFIG_SYS_MONITOR_LEN=614400
 CONFIG_ROCKCHIP_RV1126=y
 CONFIG_TARGET_RV1126_NEU2=y
diff --git a/configs/sonoff-ihost-rv1126_defconfig b/configs/sonoff-ihost-rv1126_defconfig
index dfc71b1397..4890644c7e 100644
--- a/configs/sonoff-ihost-rv1126_defconfig
+++ b/configs/sonoff-ihost-rv1126_defconfig
@@ -5,7 +5,7 @@ CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_SYS_ARCH_TIMER=y
 CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=2
-CONFIG_DEFAULT_DEVICE_TREE="rv1126-sonoff-ihost"
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rv1126-sonoff-ihost"
 CONFIG_SYS_MONITOR_LEN=614400
 CONFIG_ROCKCHIP_RV1126=y
 CONFIG_TARGET_RV1126_SONOFF_IHOST=y
diff --git a/include/dt-bindings/clock/rockchip,rv1126-cru.h b/include/dt-bindings/clock/rockchip,rv1126-cru.h
deleted file mode 100644
index e89a3a5a4a..0000000000
--- a/include/dt-bindings/clock/rockchip,rv1126-cru.h
+++ /dev/null
@@ -1,632 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
-/*
- * Copyright (c) 2019 Rockchip Electronics Co. Ltd.
- * Author: Finley Xiao <finley.xiao@rock-chips.com>
- */
-
-#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RV1126_H
-#define _DT_BINDINGS_CLK_ROCKCHIP_RV1126_H
-
-/* pmucru-clocks indices */
-
-/* pll clocks */
-#define PLL_GPLL		1
-
-/* sclk (special clocks) */
-#define CLK_OSC0_DIV32K		2
-#define CLK_RTC32K		3
-#define CLK_WIFI_DIV		4
-#define CLK_WIFI_OSC0		5
-#define CLK_WIFI		6
-#define CLK_PMU			7
-#define SCLK_UART1_DIV		8
-#define SCLK_UART1_FRACDIV	9
-#define SCLK_UART1_MUX		10
-#define SCLK_UART1		11
-#define CLK_I2C0		12
-#define CLK_I2C2		13
-#define CLK_CAPTURE_PWM0	14
-#define CLK_PWM0		15
-#define CLK_CAPTURE_PWM1	16
-#define CLK_PWM1		17
-#define CLK_SPI0		18
-#define DBCLK_GPIO0		19
-#define CLK_PMUPVTM		20
-#define CLK_CORE_PMUPVTM	21
-#define CLK_REF12M		22
-#define CLK_USBPHY_OTG_REF	23
-#define CLK_USBPHY_HOST_REF	24
-#define CLK_REF24M		25
-#define CLK_MIPIDSIPHY_REF	26
-
-/* pclk */
-#define PCLK_PDPMU		30
-#define PCLK_PMU		31
-#define PCLK_UART1		32
-#define PCLK_I2C0		33
-#define PCLK_I2C2		34
-#define PCLK_PWM0		35
-#define PCLK_PWM1		36
-#define PCLK_SPI0		37
-#define PCLK_GPIO0		38
-#define PCLK_PMUSGRF		39
-#define PCLK_PMUGRF		40
-#define PCLK_PMUCRU		41
-#define PCLK_CHIPVEROTP		42
-#define PCLK_PDPMU_NIU		43
-#define PCLK_PMUPVTM		44
-#define PCLK_SCRKEYGEN		45
-
-#define CLKPMU_NR_CLKS		(PCLK_SCRKEYGEN + 1)
-
-/* cru-clocks indices */
-
-/* pll clocks */
-#define PLL_APLL		1
-#define PLL_DPLL		2
-#define PLL_CPLL		3
-#define PLL_HPLL		4
-
-/* sclk (special clocks) */
-#define ARMCLK			5
-#define USB480M			6
-#define CLK_CORE_CPUPVTM	7
-#define CLK_CPUPVTM		8
-#define CLK_SCR1		9
-#define CLK_SCR1_CORE		10
-#define CLK_SCR1_RTC		11
-#define CLK_SCR1_JTAG		12
-#define SCLK_UART0_DIV		13
-#define SCLK_UART0_FRAC		14
-#define SCLK_UART0_MUX		15
-#define SCLK_UART0		16
-#define SCLK_UART2_DIV		17
-#define SCLK_UART2_FRAC		18
-#define SCLK_UART2_MUX		19
-#define SCLK_UART2		20
-#define SCLK_UART3_DIV		21
-#define SCLK_UART3_FRAC		22
-#define SCLK_UART3_MUX		23
-#define SCLK_UART3		24
-#define SCLK_UART4_DIV		25
-#define SCLK_UART4_FRAC		26
-#define SCLK_UART4_MUX		27
-#define SCLK_UART4		28
-#define SCLK_UART5_DIV		29
-#define SCLK_UART5_FRAC		30
-#define SCLK_UART5_MUX		31
-#define SCLK_UART5		32
-#define CLK_I2C1		33
-#define CLK_I2C3		34
-#define CLK_I2C4		35
-#define CLK_I2C5		36
-#define CLK_SPI1		37
-#define CLK_CAPTURE_PWM2	38
-#define CLK_PWM2		39
-#define DBCLK_GPIO1		40
-#define DBCLK_GPIO2		41
-#define DBCLK_GPIO3		42
-#define DBCLK_GPIO4		43
-#define CLK_SARADC		44
-#define CLK_TIMER0		45
-#define CLK_TIMER1		46
-#define CLK_TIMER2		47
-#define CLK_TIMER3		48
-#define CLK_TIMER4		49
-#define CLK_TIMER5		50
-#define CLK_CAN			51
-#define CLK_NPU_TSADC		52
-#define CLK_NPU_TSADCPHY	53
-#define CLK_CPU_TSADC		54
-#define CLK_CPU_TSADCPHY	55
-#define CLK_CRYPTO_CORE		56
-#define CLK_CRYPTO_PKA		57
-#define MCLK_I2S0_TX_DIV	58
-#define MCLK_I2S0_TX_FRACDIV	59
-#define MCLK_I2S0_TX_MUX	60
-#define MCLK_I2S0_TX		61
-#define MCLK_I2S0_RX_DIV	62
-#define MCLK_I2S0_RX_FRACDIV	63
-#define MCLK_I2S0_RX_MUX	64
-#define MCLK_I2S0_RX		65
-#define MCLK_I2S0_TX_OUT2IO	66
-#define MCLK_I2S0_RX_OUT2IO	67
-#define MCLK_I2S1_DIV		68
-#define MCLK_I2S1_FRACDIV	69
-#define MCLK_I2S1_MUX		70
-#define MCLK_I2S1		71
-#define MCLK_I2S1_OUT2IO	72
-#define MCLK_I2S2_DIV		73
-#define MCLK_I2S2_FRACDIV	74
-#define MCLK_I2S2_MUX		75
-#define MCLK_I2S2		76
-#define MCLK_I2S2_OUT2IO	77
-#define MCLK_PDM		78
-#define SCLK_ADUPWM_DIV		79
-#define SCLK_AUDPWM_FRACDIV	80
-#define SCLK_AUDPWM_MUX		81
-#define	SCLK_AUDPWM		82
-#define CLK_ACDCDIG_ADC		83
-#define CLK_ACDCDIG_DAC		84
-#define CLK_ACDCDIG_I2C		85
-#define CLK_VENC_CORE		86
-#define CLK_VDEC_CORE		87
-#define CLK_VDEC_CA		88
-#define CLK_VDEC_HEVC_CA	89
-#define CLK_RGA_CORE		90
-#define CLK_IEP_CORE		91
-#define CLK_ISP_DIV		92
-#define CLK_ISP_NP5		93
-#define CLK_ISP_NUX		94
-#define CLK_ISP			95
-#define CLK_CIF_OUT_DIV		96
-#define CLK_CIF_OUT_FRACDIV	97
-#define CLK_CIF_OUT_MUX		98
-#define CLK_CIF_OUT		99
-#define CLK_MIPICSI_OUT_DIV	100
-#define CLK_MIPICSI_OUT_FRACDIV	101
-#define CLK_MIPICSI_OUT_MUX	102
-#define CLK_MIPICSI_OUT		103
-#define CLK_ISPP_DIV		104
-#define CLK_ISPP_NP5		105
-#define CLK_ISPP_NUX		106
-#define CLK_ISPP		107
-#define CLK_SDMMC		108
-#define SCLK_SDMMC_DRV		109
-#define SCLK_SDMMC_SAMPLE	110
-#define CLK_SDIO		111
-#define SCLK_SDIO_DRV		112
-#define SCLK_SDIO_SAMPLE	113
-#define CLK_EMMC		114
-#define SCLK_EMMC_DRV		115
-#define SCLK_EMMC_SAMPLE	116
-#define CLK_NANDC		117
-#define SCLK_SFC		118
-#define CLK_USBHOST_UTMI_OHCI	119
-#define CLK_USBOTG_REF		120
-#define CLK_GMAC_DIV		121
-#define CLK_GMAC_RGMII_M0	122
-#define CLK_GMAC_SRC_M0		123
-#define CLK_GMAC_RGMII_M1	124
-#define CLK_GMAC_SRC_M1		125
-#define CLK_GMAC_SRC		126
-#define CLK_GMAC_REF		127
-#define CLK_GMAC_TX_SRC		128
-#define CLK_GMAC_TX_DIV5	129
-#define CLK_GMAC_TX_DIV50	130
-#define RGMII_MODE_CLK		131
-#define CLK_GMAC_RX_SRC		132
-#define CLK_GMAC_RX_DIV2	133
-#define CLK_GMAC_RX_DIV20	134
-#define RMII_MODE_CLK		135
-#define CLK_GMAC_TX_RX		136
-#define CLK_GMAC_PTPREF		137
-#define CLK_GMAC_ETHERNET_OUT	138
-#define CLK_DDRPHY		139
-#define CLK_DDR_MON		140
-#define TMCLK_DDR_MON		141
-#define CLK_NPU_DIV		142
-#define CLK_NPU_NP5		143
-#define CLK_CORE_NPU		144
-#define CLK_CORE_NPUPVTM	145
-#define CLK_NPUPVTM		146
-#define SCLK_DDRCLK		147
-#define CLK_OTP			148
-
-/* dclk */
-#define DCLK_DECOM		150
-#define DCLK_VOP_DIV		151
-#define DCLK_VOP_FRACDIV	152
-#define DCLK_VOP_MUX		153
-#define DCLK_VOP		154
-#define DCLK_CIF		155
-#define DCLK_CIFLITE		156
-
-/* aclk */
-#define ACLK_PDBUS		160
-#define ACLK_DMAC		161
-#define ACLK_DCF		162
-#define ACLK_SPINLOCK		163
-#define ACLK_DECOM		164
-#define ACLK_PDCRYPTO		165
-#define ACLK_CRYPTO		166
-#define ACLK_PDVEPU		167
-#define ACLK_VENC		168
-#define ACLK_PDVDEC		169
-#define ACLK_PDJPEG		170
-#define ACLK_VDEC		171
-#define ACLK_JPEG		172
-#define ACLK_PDVO		173
-#define ACLK_RGA		174
-#define ACLK_VOP		175
-#define ACLK_IEP		176
-#define ACLK_PDVI_DIV		177
-#define ACLK_PDVI_NP5		178
-#define ACLK_PDVI		179
-#define ACLK_ISP		180
-#define ACLK_CIF		181
-#define ACLK_CIFLITE		182
-#define ACLK_PDISPP_DIV		183
-#define ACLK_PDISPP_NP5		184
-#define ACLK_PDISPP		185
-#define ACLK_ISPP		186
-#define ACLK_PDPHP		187
-#define ACLK_PDUSB		188
-#define ACLK_USBOTG		189
-#define ACLK_PDGMAC		190
-#define ACLK_GMAC		191
-#define ACLK_PDNPU_DIV		192
-#define ACLK_PDNPU_NP5		193
-#define ACLK_PDNPU		194
-#define ACLK_NPU		195
-
-/* hclk */
-#define HCLK_PDCORE_NIU		200
-#define HCLK_PDUSB		201
-#define HCLK_PDCRYPTO		202
-#define HCLK_CRYPTO		203
-#define HCLK_PDAUDIO		204
-#define HCLK_I2S0		205
-#define HCLK_I2S1		206
-#define HCLK_I2S2		207
-#define HCLK_PDM		208
-#define HCLK_AUDPWM		209
-#define HCLK_PDVEPU		210
-#define HCLK_VENC		211
-#define HCLK_PDVDEC		212
-#define HCLK_PDJPEG		213
-#define HCLK_VDEC		214
-#define HCLK_JPEG		215
-#define HCLK_PDVO		216
-#define HCLK_RGA		217
-#define HCLK_VOP		218
-#define HCLK_IEP		219
-#define HCLK_PDVI		220
-#define HCLK_ISP		221
-#define HCLK_CIF		222
-#define HCLK_CIFLITE		223
-#define HCLK_PDISPP		224
-#define HCLK_ISPP		225
-#define HCLK_PDPHP		226
-#define HCLK_PDSDMMC		227
-#define HCLK_SDMMC		228
-#define HCLK_PDSDIO		229
-#define HCLK_SDIO		230
-#define HCLK_PDNVM		231
-#define HCLK_EMMC		232
-#define HCLK_NANDC		233
-#define HCLK_SFC		234
-#define HCLK_SFCXIP		235
-#define HCLK_PDBUS		236
-#define HCLK_USBHOST		237
-#define HCLK_USBHOST_ARB	238
-#define HCLK_PDNPU		239
-#define HCLK_NPU		240
-
-/* pclk */
-#define PCLK_CPUPVTM		245
-#define PCLK_PDBUS		246
-#define PCLK_DCF		247
-#define PCLK_WDT		248
-#define PCLK_MAILBOX		249
-#define PCLK_UART0		250
-#define PCLK_UART2		251
-#define PCLK_UART3		252
-#define PCLK_UART4		253
-#define PCLK_UART5		254
-#define PCLK_I2C1		255
-#define PCLK_I2C3		256
-#define PCLK_I2C4		257
-#define PCLK_I2C5		258
-#define PCLK_SPI1		259
-#define PCLK_PWM2		261
-#define PCLK_GPIO1		262
-#define PCLK_GPIO2		263
-#define PCLK_GPIO3		264
-#define PCLK_GPIO4		265
-#define PCLK_SARADC		266
-#define PCLK_TIMER		267
-#define PCLK_DECOM		268
-#define PCLK_CAN		269
-#define PCLK_NPU_TSADC		270
-#define PCLK_CPU_TSADC		271
-#define PCLK_ACDCDIG		272
-#define PCLK_PDVO		273
-#define PCLK_DSIHOST		274
-#define PCLK_PDVI		275
-#define PCLK_CSIHOST		276
-#define PCLK_PDGMAC		277
-#define PCLK_GMAC		278
-#define PCLK_PDDDR		279
-#define PCLK_DDR_MON		280
-#define PCLK_PDNPU		281
-#define PCLK_NPUPVTM		282
-#define PCLK_PDTOP		283
-#define PCLK_TOPCRU		284
-#define PCLK_TOPGRF		285
-#define PCLK_CPUEMADET		286
-#define PCLK_DDRPHY		287
-#define PCLK_DSIPHY		289
-#define PCLK_CSIPHY0		290
-#define PCLK_CSIPHY1		291
-#define PCLK_USBPHY_HOST	292
-#define PCLK_USBPHY_OTG		293
-#define PCLK_OTP		294
-
-#define CLK_NR_CLKS		(PCLK_OTP + 1)
-
-/* pmu soft-reset indices */
-
-/* pmu_cru_softrst_con0 */
-#define SRST_PDPMU_NIU_P	0
-#define SRST_PMU_SGRF_P		1
-#define SRST_PMU_SGRF_REMAP_P	2
-#define SRST_I2C0_P		3
-#define SRST_I2C0		4
-#define SRST_I2C2_P		7
-#define SRST_I2C2		8
-#define SRST_UART1_P		9
-#define SRST_UART1		10
-#define SRST_PWM0_P		11
-#define SRST_PWM0		12
-#define SRST_PWM1_P		13
-#define SRST_PWM1		14
-#define SRST_DDR_FAIL_SAFE	15
-
-/* pmu_cru_softrst_con1 */
-#define SRST_GPIO0_P		17
-#define SRST_GPIO0_DB		18
-#define SRST_SPI0_P		19
-#define SRST_SPI0		20
-#define SRST_PMUGRF_P		21
-#define SRST_CHIPVEROTP_P	22
-#define SRST_PMUPVTM		24
-#define SRST_PMUPVTM_P		25
-#define SRST_PMUCRU_P		30
-
-/* soft-reset indices */
-
-/* cru_softrst_con0 */
-#define SRST_CORE0_PO		0
-#define SRST_CORE1_PO		1
-#define SRST_CORE2_PO		2
-#define SRST_CORE3_PO		3
-#define SRST_CORE0		4
-#define SRST_CORE1		5
-#define SRST_CORE2		6
-#define SRST_CORE3		7
-#define SRST_CORE0_DBG		8
-#define SRST_CORE1_DBG		9
-#define SRST_CORE2_DBG		10
-#define SRST_CORE3_DBG		11
-#define SRST_NL2		12
-#define SRST_CORE_NIU_A		13
-#define SRST_DBG_DAPLITE_P	14
-#define SRST_DAPLITE_P		15
-
-/* cru_softrst_con1 */
-#define SRST_PDBUS_NIU1_A	16
-#define SRST_PDBUS_NIU1_H	17
-#define SRST_PDBUS_NIU1_P	18
-#define SRST_PDBUS_NIU2_A	19
-#define SRST_PDBUS_NIU2_H	20
-#define SRST_PDBUS_NIU3_A	21
-#define SRST_PDBUS_NIU3_H	22
-#define SRST_PDBUS_HOLD_NIU1_A	23
-#define SRST_DBG_NIU_P		24
-#define SRST_PDCORE_NIIU_H	25
-#define SRST_MUC_NIU		26
-#define SRST_DCF_A		29
-#define SRST_DCF_P		30
-#define SRST_SYSTEM_SRAM_A	31
-
-/* cru_softrst_con2 */
-#define SRST_I2C1_P		32
-#define SRST_I2C1		33
-#define SRST_I2C3_P		34
-#define SRST_I2C3		35
-#define SRST_I2C4_P		36
-#define SRST_I2C4		37
-#define SRST_I2C5_P		38
-#define SRST_I2C5		39
-#define SRST_SPI1_P		40
-#define SRST_SPI1		41
-#define SRST_MCU_CORE		42
-#define SRST_PWM2_P		44
-#define SRST_PWM2		45
-#define SRST_SPINLOCK_A		46
-
-/* cru_softrst_con3 */
-#define SRST_UART0_P		48
-#define SRST_UART0		49
-#define SRST_UART2_P		50
-#define SRST_UART2		51
-#define SRST_UART3_P		52
-#define SRST_UART3		53
-#define SRST_UART4_P		54
-#define SRST_UART4		55
-#define SRST_UART5_P		56
-#define SRST_UART5		57
-#define SRST_WDT_P		58
-#define SRST_SARADC_P		59
-#define SRST_GRF_P		61
-#define SRST_TIMER_P		62
-#define SRST_MAILBOX_P		63
-
-/* cru_softrst_con4 */
-#define SRST_TIMER0		64
-#define SRST_TIMER1		65
-#define SRST_TIMER2		66
-#define SRST_TIMER3		67
-#define SRST_TIMER4		68
-#define SRST_TIMER5		69
-#define SRST_INTMUX_P		70
-#define SRST_GPIO1_P		72
-#define SRST_GPIO1_DB		73
-#define SRST_GPIO2_P		74
-#define SRST_GPIO2_DB		75
-#define SRST_GPIO3_P		76
-#define SRST_GPIO3_DB		77
-#define SRST_GPIO4_P		78
-#define SRST_GPIO4_DB		79
-
-/* cru_softrst_con5 */
-#define SRST_CAN_P		80
-#define SRST_CAN		81
-#define SRST_DECOM_A		85
-#define SRST_DECOM_P		86
-#define SRST_DECOM_D		87
-#define SRST_PDCRYPTO_NIU_A	88
-#define SRST_PDCRYPTO_NIU_H	89
-#define SRST_CRYPTO_A		90
-#define SRST_CRYPTO_H		91
-#define SRST_CRYPTO_CORE	92
-#define SRST_CRYPTO_PKA		93
-#define SRST_SGRF_P		95
-
-/* cru_softrst_con6 */
-#define SRST_PDAUDIO_NIU_H	96
-#define SRST_PDAUDIO_NIU_P	97
-#define SRST_I2S0_H		98
-#define SRST_I2S0_TX_M		99
-#define SRST_I2S0_RX_M		100
-#define SRST_I2S1_H		101
-#define SRST_I2S1_M		102
-#define SRST_I2S2_H		103
-#define SRST_I2S2_M		104
-#define SRST_PDM_H		105
-#define SRST_PDM_M		106
-#define SRST_AUDPWM_H		107
-#define SRST_AUDPWM		108
-#define SRST_ACDCDIG_P		109
-#define SRST_ACDCDIG		110
-
-/* cru_softrst_con7 */
-#define SRST_PDVEPU_NIU_A	112
-#define SRST_PDVEPU_NIU_H	113
-#define SRST_VENC_A		114
-#define SRST_VENC_H		115
-#define SRST_VENC_CORE		116
-#define SRST_PDVDEC_NIU_A	117
-#define SRST_PDVDEC_NIU_H	118
-#define SRST_VDEC_A		119
-#define SRST_VDEC_H		120
-#define SRST_VDEC_CORE		121
-#define SRST_VDEC_CA		122
-#define SRST_VDEC_HEVC_CA	123
-#define SRST_PDJPEG_NIU_A	124
-#define SRST_PDJPEG_NIU_H	125
-#define SRST_JPEG_A		126
-#define SRST_JPEG_H		127
-
-/* cru_softrst_con8 */
-#define SRST_PDVO_NIU_A		128
-#define SRST_PDVO_NIU_H		129
-#define SRST_PDVO_NIU_P		130
-#define SRST_RGA_A		131
-#define SRST_RGA_H		132
-#define SRST_RGA_CORE		133
-#define SRST_VOP_A		134
-#define SRST_VOP_H		135
-#define SRST_VOP_D		136
-#define SRST_TXBYTEHS_DSIHOST	137
-#define SRST_DSIHOST_P		138
-#define SRST_IEP_A		139
-#define SRST_IEP_H		140
-#define SRST_IEP_CORE		141
-#define SRST_ISP_RX_P		142
-
-/* cru_softrst_con9 */
-#define SRST_PDVI_NIU_A		144
-#define SRST_PDVI_NIU_H		145
-#define SRST_PDVI_NIU_P		146
-#define SRST_ISP		147
-#define SRST_CIF_A		148
-#define SRST_CIF_H		149
-#define SRST_CIF_D		150
-#define SRST_CIF_P		151
-#define SRST_CIF_I		152
-#define SRST_CIF_RX_P		153
-#define SRST_PDISPP_NIU_A	154
-#define SRST_PDISPP_NIU_H	155
-#define SRST_ISPP_A		156
-#define SRST_ISPP_H		157
-#define SRST_ISPP		158
-#define SRST_CSIHOST_P		159
-
-/* cru_softrst_con10 */
-#define SRST_PDPHPMID_NIU_A	160
-#define SRST_PDPHPMID_NIU_H	161
-#define SRST_PDNVM_NIU_H	163
-#define SRST_SDMMC_H		164
-#define SRST_SDIO_H		165
-#define SRST_EMMC_H		166
-#define SRST_SFC_H		167
-#define SRST_SFCXIP_H		168
-#define SRST_SFC		169
-#define SRST_NANDC_H		170
-#define SRST_NANDC		171
-#define SRST_PDSDMMC_H		173
-#define SRST_PDSDIO_H		174
-
-/* cru_softrst_con11 */
-#define SRST_PDUSB_NIU_A	176
-#define SRST_PDUSB_NIU_H	177
-#define SRST_USBHOST_H		178
-#define SRST_USBHOST_ARB_H	179
-#define SRST_USBHOST_UTMI	180
-#define SRST_USBOTG_A		181
-#define SRST_USBPHY_OTG_P	182
-#define SRST_USBPHY_HOST_P	183
-#define SRST_USBPHYPOR_OTG	184
-#define SRST_USBPHYPOR_HOST	185
-#define SRST_PDGMAC_NIU_A	188
-#define SRST_PDGMAC_NIU_P	189
-#define SRST_GMAC_A		190
-
-/* cru_softrst_con12 */
-#define SRST_DDR_DFICTL_P	193
-#define SRST_DDR_MON_P		194
-#define SRST_DDR_STANDBY_P	195
-#define SRST_DDR_GRF_P		196
-#define SRST_DDR_MSCH_P		197
-#define SRST_DDR_SPLIT_A	198
-#define SRST_DDR_MSCH		199
-#define SRST_DDR_DFICTL		202
-#define SRST_DDR_STANDBY	203
-#define SRST_NPUMCU_NIU		205
-#define SRST_DDRPHY_P		206
-#define SRST_DDRPHY		207
-
-/* cru_softrst_con13 */
-#define SRST_PDNPU_NIU_A	208
-#define SRST_PDNPU_NIU_H	209
-#define SRST_PDNPU_NIU_P	210
-#define SRST_NPU_A		211
-#define SRST_NPU_H		212
-#define SRST_NPU		213
-#define SRST_NPUPVTM_P		214
-#define SRST_NPUPVTM		215
-#define SRST_NPU_TSADC_P	216
-#define SRST_NPU_TSADC		217
-#define SRST_NPU_TSADCPHY	218
-#define SRST_CIFLITE_A		220
-#define SRST_CIFLITE_H		221
-#define SRST_CIFLITE_D		222
-#define SRST_CIFLITE_RX_P	223
-
-/* cru_softrst_con14 */
-#define SRST_TOPNIU_P		224
-#define SRST_TOPCRU_P		225
-#define SRST_TOPGRF_P		226
-#define SRST_CPUEMADET_P	227
-#define SRST_CSIPHY0_P		228
-#define SRST_CSIPHY1_P		229
-#define SRST_DSIPHY_P		230
-#define SRST_CPU_TSADC_P	232
-#define SRST_CPU_TSADC		233
-#define SRST_CPU_TSADCPHY	234
-#define SRST_CPUPVTM_P		235
-#define SRST_CPUPVTM		236
-
-#endif
diff --git a/include/dt-bindings/power/rockchip,rv1126-power.h b/include/dt-bindings/power/rockchip,rv1126-power.h
deleted file mode 100644
index 38a68e000d..0000000000
--- a/include/dt-bindings/power/rockchip,rv1126-power.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef __DT_BINDINGS_POWER_RV1126_POWER_H__
-#define __DT_BINDINGS_POWER_RV1126_POWER_H__
-
-/* VD_CORE */
-#define RV1126_PD_CPU_0		0
-#define RV1126_PD_CPU_1		1
-#define RV1126_PD_CPU_2		2
-#define RV1126_PD_CPU_3		3
-#define RV1126_PD_CORE_ALIVE	4
-
-/* VD_PMU */
-#define RV1126_PD_PMU		5
-#define RV1126_PD_PMU_ALIVE	6
-
-/* VD_NPU */
-#define RV1126_PD_NPU		7
-
-/* VD_VEPU */
-#define RV1126_PD_VEPU		8
-
-/* VD_LOGIC */
-#define RV1126_PD_VI		9
-#define RV1126_PD_VO		10
-#define RV1126_PD_ISPP		11
-#define RV1126_PD_VDPU		12
-#define RV1126_PD_CRYPTO	13
-#define RV1126_PD_DDR		14
-#define RV1126_PD_NVM		15
-#define RV1126_PD_SDIO		16
-#define RV1126_PD_USB		17
-#define RV1126_PD_LOGIC_ALIVE	18
-
-#endif
-- 
2.44.0


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH] drm/msm/adreno: request memory region
  2024-05-11 19:35  1% [PATCH] drm/msm/adreno: request memory region Kiarash Hajian
@ 2024-05-11 19:49  0% ` Dmitry Baryshkov
  0 siblings, 0 replies; 200+ results
From: Dmitry Baryshkov @ 2024-05-11 19:49 UTC (permalink / raw)
  To: Kiarash Hajian
  Cc: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten,
	David Airlie, Daniel Vetter, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

On Sat, 11 May 2024 at 22:35, Kiarash Hajian
<kiarash8112hajian@gmail.com> wrote:
>
> The driver's memory regions are currently just ioremap()ed, but not
> reserved through a request. That's not a bug, but having the request is
> a little more robust.
>
> Implement the region-request through the corresponding managed
> devres-function.
>
> Signed-off-by: Kiarash Hajian <kiarash8112hajian@gmail.com>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 8bea8ef26f77..aa83cb461a75 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -636,9 +636,9 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
>
>  err:
>         if (!IS_ERR_OR_NULL(pdcptr))
> -               iounmap(pdcptr);
> +               devm_iounmap(&pdev->dev,pdcptr);
>         if (!IS_ERR_OR_NULL(seqptr))
> -               iounmap(seqptr);
> +               devm_iounmap(&pdev->dev,seqptr);

Is there any reason to keep devm_iounmap calls? IMO with the devres
management in place, there should be no need to unmap them manually.

>  }
>
>  /*
> @@ -1503,7 +1503,7 @@ static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev,
>                 return ERR_PTR(-EINVAL);
>         }
>
> -       ret = ioremap(res->start, resource_size(res));
> +       ret = devm_ioremap_resource(&pdev->dev, res);
>         if (!ret) {
>                 DRM_DEV_ERROR(&pdev->dev, "Unable to map the %s registers\n", name);
>                 return ERR_PTR(-EINVAL);
> @@ -1646,7 +1646,7 @@ int a6xx_gmu_wrapper_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
>         dev_pm_domain_detach(gmu->cxpd, false);
>
>  err_mmio:
> -       iounmap(gmu->mmio);
> +       devm_iounmap(gmu->dev ,gmu->mmio);
>
>         /* Drop reference taken in of_find_device_by_node */
>         put_device(gmu->dev);
> @@ -1825,9 +1825,9 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
>         dev_pm_domain_detach(gmu->cxpd, false);
>
>  err_mmio:
> -       iounmap(gmu->mmio);
> +       devm_iounmap(gmu->dev ,gmu->mmio);
>         if (platform_get_resource_byname(pdev, IORESOURCE_MEM, "rscc"))
> -               iounmap(gmu->rscc);
> +               devm_iounmap(gmu->dev ,gmu->rscc);
>         free_irq(gmu->gmu_irq, gmu);
>         free_irq(gmu->hfi_irq, gmu);
>
>
> ---
> base-commit: cf87f46fd34d6c19283d9625a7822f20d90b64a4
> change-id: 20240511-msm-adreno-memory-region-2bcb1c958621
>
> Best regards,
> --
> Kiarash Hajian <kiarash8112hajian@gmail.com>
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[relevance 0%]

* [GIT PULL] i2c-host changes for v6.10 - pt. 1
@ 2024-05-11 19:43  1% Andi Shyti
  0 siblings, 0 replies; 200+ results
From: Andi Shyti @ 2024-05-11 19:43 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, lkml

Hi Wolfram,

This is the first part of the pull request for the merge window.

You will find a detailed description in the tag comment.

Two additional changes need to be submitted as part of a second
pull request:

 1. i2c: synquacer: Remove a clk reference from struct synquacer_i2c

     ** Depends on:
        i2c: synquacer: Fix an error handling path in synquacer_i2c_probe()

    This commit from Christophe depends on a patch that was
    included in fixes.

 2. i2c: Remove I2C_CLASS_SPD

     ** Depends on:
        hwmon: jc42: Remove I2C_CLASS_SPD support

    This commit breaks compilation as it relies on a patch that
    was independently taken by Guenter Rock. Therefore, I need to
    ensure that Guenter merges this patch first.

Thanks,
Andi

The following changes since commit dd5a440a31fae6e459c0d6271dddd62825505361:

  Linux 6.9-rc7 (2024-05-05 14:06:01 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git tags/i2c-host-6.10

for you to fetch changes up to 61e05bad821cb293418794738e7cc359949f44fe:

  i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE() (2024-05-06 00:56:55 +0200)

----------------------------------------------------------------
Code cleanup:

A substantial code cleanup from Wolfram affects many drivers:

 - Removed dev_err() in case of timeout during i2c transfers, as
   timeouts are not considered errors and should not be treated
   as such.
 - For the same reason, 'timeout' variables have been renamed to
   'time_left'.

Other cleanups:

 - The viperboard driver now omits the "owner = THIS_MODULE"
   assignment.
 - Finally, we have eliminated the last remnants of
   I2C_CLASS_SPD: support for class-based devices has been
   completely removed from the mux-gpio driver.
 - In the ocore devices, a more standard use of ioport_map() for
   8-bit I/O read/write operations has been implemented.
 - The mpc driver will be among the first i2c drivers and one of
   the first in the kernel to use the __free auto cleanup
   routine.
 - The designware driver now uses MODULE_DEVICE_TABLE() instead
   of MODULE_ALIAS() for better consistency with the ID table.
 - Added prefixes to the octeon register macros.
 - Fixed some checkpatch errors in the newly created
   i2c-viai2c-common.c file.

Code refactoring:

 - The riic driver has refactored read/write operations to more
   flexibly support new platforms, laying the foundation for new
   SoC peculiarities.
 - In the i801 driver, a notifier callback has been created for
   muxed child segments.
 - The lpi2c driver now sets a clock rate during probe instead
   of continuously calling clk_get_rate().
 - Improvements in the clock divisor logic to accommodate other
   clock frequencies.
 - Combined some common functionalities during initialization
   for the wmt driver and separated others that can be
   independently used by different drivers. Now, all the common
   functionalities are grouped in the i2c-viai2c-common.c file.
 - Improved the clock stretching mechanism in the newly created
   i2c-viai2c-common.c file, inherited from the previous
   i2c-wmt.c.

Features added:

 - The octeon driver now includes watchdog timeout handling.
 - Added high-speed support for the octeon driver.

Added support for:

 - R9A09G057 SoC in the riic driver.
 - Rapids-D I2C controller in the designware driver.
 - Cadence driver now also supports RISC-V architectures.
 - Added support to the WMT device as a separate driver using the
   newly created i2c-viai2c-common.c functionalities.
 - Added support for the Zhaoxin I2C controller.

Some improvements in the bindings:

 - The pnx driver is converted to dtschema.
 - Added documentation for the Qualcomm SC8280XP.

----------------------------------------------------------------
Abhinav Jain (1):
      i2c: mpc: Removal of of_node_put with __free for auto cleanup

Alexander Stein (1):
      i2c: lpi2c: Avoid calling clk_get_rate during transfer

Andy Shevchenko (1):
      i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE()

Animesh Agarwal (1):
      dt-bindings: i2c: nxp,pnx-i2c: Convert to dtschema

Arnd Bergmann (1):
      i2c: ocores: convert to ioport_map() for IORESOURCE_IO

Bryan O'Donoghue (1):
      dt-bindings: i2c: qcom-cci: Document sc8280xp compatible

Hans Hu (6):
      i2c: wmt: create wmt_i2c_init for general init
      i2c: wmt: split out common files
      i2c: wmt: rename something
      i2c: wmt: fix a bug when thread blocked
      i2c: wmt: add platform type VIAI2C_PLAT_WMT
      i2c: add zhaoxin i2c controller driver

Heiner Kallweit (5):
      i2c: i801: Call i2c_register_spd for muxed child segments
      i2c: i801: Fix missing Kconfig dependency
      i2c: i801: Remove usage of I2C_CLASS_SPD
      i2c: mux: gpio: remove support for class-based device instantiation
      i2c: i801: Annotate apanel_addr as __ro_after_init

Ji Sheng Teoh (1):
      i2c: cadence: Add RISCV architecture support

Krzysztof Kozlowski (1):
      i2c: viperboard: drop driver owner assignment

Lad Prabhakar (4):
      dt-bindings: i2c: renesas,riic: Document R9A09G057 support
      i2c: riic: Introduce helper functions for I2C read/write operations
      i2c: riic: Pass register offsets and chip details as OF data
      i2c: riic: Add support for R9A09G057 SoC

Lukas Bulwahn (1):
      MAINTAINERS: adjust file entry in ARM/LPC32XX SOC SUPPORT

Niklas Schnelle (1):
      i2c: add HAS_IOPORT dependencies

Piyush Malgujar (2):
      i2c: octeon: Add platform prefix to macros
      i2c: thunderx: Adding ioclk support

Shanth Murthy (1):
      i2c: designware: Add ACPI ID for Granite Rapids-D I2C controller

Suneel Garapati (3):
      i2c: thunderx: Clock divisor logic changes
      i2c: thunderx: Support for High speed mode
      i2c: octeon: Handle watchdog timeout

Wolfram Sang (36):
      i2c: at91-master: remove printout on handled timeouts
      i2c: bcm-iproc: remove printout on handled timeouts
      i2c: bcm2835: remove printout on handled timeouts
      i2c: cadence: remove printout on handled timeouts
      i2c: davinci: remove printout on handled timeouts
      i2c: img-scb: remove printout on handled timeouts
      i2c: ismt: remove printout on handled timeouts
      i2c: nomadik: remove printout on handled timeouts
      i2c: omap: remove printout on handled timeouts
      i2c: qcom-geni: remove printout on handled timeouts
      i2c: qup: remove printout on handled timeouts
      i2c: rk3x: remove printout on handled timeouts
      i2c: sh_mobile: remove printout on handled timeouts
      i2c: st: remove printout on handled timeouts
      i2c: tegra: remove printout on handled timeouts
      i2c: uniphier-f: remove printout on handled timeouts
      i2c: uniphier: remove printout on handled timeouts
      i2c: i801: remove printout on handled timeouts
      i2c: ali1535: remove printout on handled timeouts
      i2c: ali1563: remove printout on handled timeouts
      i2c: ali15x3: remove printout on handled timeouts
      i2c: amd-mp2-plat: use 'time_left' variable with wait_for_completion_timeout()
      i2c: digicolor: use 'time_left' variable with wait_for_completion_timeout()
      i2c: exynos5: use 'time_left' variable with wait_for_completion_timeout()
      i2c: hix5hd2: use 'time_left' variable with wait_for_completion_timeout()
      i2c: imx-lpi2c: use 'time_left' variable with wait_for_completion_timeout()
      i2c: omap: use 'time_left' variable with wait_for_completion_timeout()
      i2c: st: use 'time_left' variable with wait_for_completion_timeout()
      i2c: stm32f4: use 'time_left' variable with wait_for_completion_timeout()
      i2c: stm32f7: use 'time_left' variable with wait_for_completion_timeout()
      i2c: synquacer: use 'time_left' variable with wait_for_completion_timeout()
      i2c: jz4780: use 'time_left' variable with wait_for_completion_timeout()
      i2c: qcom-geni: use 'time_left' variable with wait_for_completion_timeout()
      i2c: rk3x: use 'time_left' variable with wait_event_timeout()
      i2c: s3c2410: use 'time_left' variable with wait_event_timeout()
      i2c: pxa: use 'time_left' variable with wait_event_timeout()

 Documentation/devicetree/bindings/i2c/i2c-pnx.txt  |  34 --
 .../devicetree/bindings/i2c/nxp,pnx-i2c.yaml       |  46 +++
 .../devicetree/bindings/i2c/qcom,i2c-cci.yaml      |  19 +
 .../devicetree/bindings/i2c/renesas,riic.yaml      |  19 +-
 MAINTAINERS                                        |  12 +-
 drivers/i2c/busses/Kconfig                         |  49 ++-
 drivers/i2c/busses/Makefile                        |   3 +
 drivers/i2c/busses/i2c-ali1535.c                   |   8 +-
 drivers/i2c/busses/i2c-ali1563.c                   |   1 -
 drivers/i2c/busses/i2c-ali15x3.c                   |   4 +-
 drivers/i2c/busses/i2c-amd-mp2-plat.c              |   8 +-
 drivers/i2c/busses/i2c-at91-master.c               |   1 -
 drivers/i2c/busses/i2c-bcm-iproc.c                 |   2 -
 drivers/i2c/busses/i2c-bcm2835.c                   |   1 -
 drivers/i2c/busses/i2c-cadence.c                   |   2 -
 drivers/i2c/busses/i2c-davinci.c                   |   1 -
 drivers/i2c/busses/i2c-designware-pcidrv.c         |   2 -
 drivers/i2c/busses/i2c-designware-platdrv.c        |   9 +-
 drivers/i2c/busses/i2c-digicolor.c                 |   6 +-
 drivers/i2c/busses/i2c-exynos5.c                   |  12 +-
 drivers/i2c/busses/i2c-hix5hd2.c                   |   8 +-
 drivers/i2c/busses/i2c-i801.c                      |  41 +-
 drivers/i2c/busses/i2c-img-scb.c                   |   5 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c                 |  25 +-
 drivers/i2c/busses/i2c-ismt.c                      |   1 -
 drivers/i2c/busses/i2c-jz4780.c                    |  22 +-
 drivers/i2c/busses/i2c-mpc.c                       |  11 +-
 drivers/i2c/busses/i2c-nomadik.c                   |   7 +-
 drivers/i2c/busses/i2c-ocores.c                    |  21 +-
 drivers/i2c/busses/i2c-octeon-core.c               | 141 +++++--
 drivers/i2c/busses/i2c-octeon-core.h               |  53 ++-
 drivers/i2c/busses/i2c-omap.c                      |  11 +-
 drivers/i2c/busses/i2c-pxa.c                       |  14 +-
 drivers/i2c/busses/i2c-qcom-geni.c                 |  10 +-
 drivers/i2c/busses/i2c-qup.c                       |   4 +-
 drivers/i2c/busses/i2c-riic.c                      | 125 ++++--
 drivers/i2c/busses/i2c-rk3x.c                      |  14 +-
 drivers/i2c/busses/i2c-s3c2410.c                   |   6 +-
 drivers/i2c/busses/i2c-sh_mobile.c                 |   1 -
 drivers/i2c/busses/i2c-st.c                        |  11 +-
 drivers/i2c/busses/i2c-stm32f4.c                   |   8 +-
 drivers/i2c/busses/i2c-stm32f7.c                   |   8 +-
 drivers/i2c/busses/i2c-synquacer.c                 |   8 +-
 drivers/i2c/busses/i2c-tegra.c                     |   2 -
 drivers/i2c/busses/i2c-thunderx-pcidrv.c           |  13 +-
 drivers/i2c/busses/i2c-uniphier-f.c                |   1 -
 drivers/i2c/busses/i2c-uniphier.c                  |   4 +-
 drivers/i2c/busses/i2c-viai2c-common.c             | 256 +++++++++++++
 drivers/i2c/busses/i2c-viai2c-common.h             |  85 +++++
 drivers/i2c/busses/i2c-viai2c-wmt.c                | 148 ++++++++
 drivers/i2c/busses/i2c-viai2c-zhaoxin.c            | 298 +++++++++++++++
 drivers/i2c/busses/i2c-viperboard.c                |   1 -
 drivers/i2c/busses/i2c-wmt.c                       | 421 ---------------------
 drivers/i2c/muxes/i2c-mux-gpio.c                   |   3 +-
 include/linux/platform_data/i2c-mux-gpio.h         |   2 -
 55 files changed, 1295 insertions(+), 733 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-pnx.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/nxp,pnx-i2c.yaml
 create mode 100644 drivers/i2c/busses/i2c-viai2c-common.c
 create mode 100644 drivers/i2c/busses/i2c-viai2c-common.h
 create mode 100644 drivers/i2c/busses/i2c-viai2c-wmt.c
 create mode 100644 drivers/i2c/busses/i2c-viai2c-zhaoxin.c
 delete mode 100644 drivers/i2c/busses/i2c-wmt.c

^ permalink raw reply	[relevance 1%]

* [PATCH] x86/cpufreq: Rename cpuid variable/parameters to cpu
@ 2024-05-11 19:42  1% Andrew Cooper
  0 siblings, 0 replies; 200+ results
From: Andrew Cooper @ 2024-05-11 19:42 UTC (permalink / raw)
  To: Xen-devel
  Cc: Andrew Cooper, Jan Beulich, Roger Pau Monné,
	Stefano Stabellini, Nicola Vetrini, consulting @ bugseng . com

Various functions have a parameter or local variable called cpuid, but this
triggers a MISRA R5.3 violation because we also have a function called cpuid()
which wraps the real CPUID instruction.

In all these cases, it's a Xen cpu index, which is far more commonly named
just cpu in our code.

While adjusting these, fix a couple of other issues:

 * cpufreq_cpu_init() is on the end of a hypercall (with in-memory parameters,
   even), making EFAULT the wrong error to use.  Use EOPNOTSUPP instead.

 * check_est_cpu() is wrong to tie EIST to just Intel, and nowhere else using
   EIST makes this restriction.  Just check the feature itself, which is more
   succinctly done after being folded into its single caller.

 * In powernow_cpufreq_update(), replace an opencoded cpu_online().

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Nicola Vetrini <nicola.vetrini@bugseng.com>
CC: consulting@bugseng.com <consulting@bugseng.com>

cpu needs to stay signed for now in set_px_pminfo(), because of get_cpu_id().
This can be cleaned up by making better use of BAD_APICID, but that's a much
more involved change.
---
 xen/arch/x86/acpi/cpu_idle.c              | 14 ++++----
 xen/arch/x86/acpi/cpufreq/cpufreq.c       | 24 +++----------
 xen/arch/x86/acpi/cpufreq/hwp.c           |  6 ++--
 xen/arch/x86/acpi/cpufreq/powernow.c      |  6 ++--
 xen/drivers/cpufreq/cpufreq.c             | 18 +++++-----
 xen/drivers/cpufreq/utility.c             | 43 +++++++++++------------
 xen/include/acpi/cpufreq/cpufreq.h        |  6 ++--
 xen/include/acpi/cpufreq/processor_perf.h |  8 ++---
 xen/include/xen/pmstat.h                  |  6 ++--
 9 files changed, 57 insertions(+), 74 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index cfce4cc0408f..c8db1aa9913a 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -1498,14 +1498,14 @@ static void amd_cpuidle_init(struct acpi_processor_power *power)
         vendor_override = -1;
 }
 
-uint32_t pmstat_get_cx_nr(uint32_t cpuid)
+uint32_t pmstat_get_cx_nr(unsigned int cpu)
 {
-    return processor_powers[cpuid] ? processor_powers[cpuid]->count : 0;
+    return processor_powers[cpu] ? processor_powers[cpu]->count : 0;
 }
 
-int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat)
+int pmstat_get_cx_stat(unsigned int cpu, struct pm_cx_stat *stat)
 {
-    struct acpi_processor_power *power = processor_powers[cpuid];
+    struct acpi_processor_power *power = processor_powers[cpu];
     uint64_t idle_usage = 0, idle_res = 0;
     uint64_t last_state_update_tick, current_stime, current_tick;
     uint64_t usage[ACPI_PROCESSOR_MAX_POWER] = { 0 };
@@ -1522,7 +1522,7 @@ int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat)
         return 0;
     }
 
-    stat->idle_time = get_cpu_idle_time(cpuid);
+    stat->idle_time = get_cpu_idle_time(cpu);
     nr = min(stat->nr, power->count);
 
     /* mimic the stat when detail info hasn't been registered by dom0 */
@@ -1572,7 +1572,7 @@ int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat)
             idle_res += res[i];
         }
 
-        get_hw_residencies(cpuid, &hw_res);
+        get_hw_residencies(cpu, &hw_res);
 
 #define PUT_xC(what, n) do { \
         if ( stat->nr_##what >= n && \
@@ -1613,7 +1613,7 @@ int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat)
     return 0;
 }
 
-int pmstat_reset_cx_stat(uint32_t cpuid)
+int pmstat_reset_cx_stat(unsigned int cpu)
 {
     return 0;
 }
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index 2b6ef99678ae..a341f2f02063 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -55,17 +55,6 @@ struct acpi_cpufreq_data *cpufreq_drv_data[NR_CPUS];
 static bool __read_mostly acpi_pstate_strict;
 boolean_param("acpi_pstate_strict", acpi_pstate_strict);
 
-static int check_est_cpu(unsigned int cpuid)
-{
-    struct cpuinfo_x86 *cpu = &cpu_data[cpuid];
-
-    if (cpu->x86_vendor != X86_VENDOR_INTEL ||
-        !cpu_has(cpu, X86_FEATURE_EIST))
-        return 0;
-
-    return 1;
-}
-
 static unsigned extract_io(u32 value, struct acpi_cpufreq_data *data)
 {
     struct processor_performance *perf;
@@ -530,7 +519,7 @@ static int cf_check acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
         if (cpufreq_verbose)
             printk("xen_pminfo: @acpi_cpufreq_cpu_init,"
                    "HARDWARE addr space\n");
-        if (!check_est_cpu(cpu)) {
+        if (!cpu_has(c, X86_FEATURE_EIST)) {
             result = -ENODEV;
             goto err_unreg;
         }
@@ -690,15 +679,12 @@ static int __init cf_check cpufreq_driver_late_init(void)
 }
 __initcall(cpufreq_driver_late_init);
 
-int cpufreq_cpu_init(unsigned int cpuid)
+int cpufreq_cpu_init(unsigned int cpu)
 {
-    int ret;
-
     /* Currently we only handle Intel, AMD and Hygon processor */
     if ( boot_cpu_data.x86_vendor &
          (X86_VENDOR_INTEL | X86_VENDOR_AMD | X86_VENDOR_HYGON) )
-        ret = cpufreq_add_cpu(cpuid);
-    else
-        ret = -EFAULT;
-    return ret;
+        return cpufreq_add_cpu(cpu);
+
+    return -EOPNOTSUPP;
 }
diff --git a/xen/arch/x86/acpi/cpufreq/hwp.c b/xen/arch/x86/acpi/cpufreq/hwp.c
index e61212803e71..59b57a4cef86 100644
--- a/xen/arch/x86/acpi/cpufreq/hwp.c
+++ b/xen/arch/x86/acpi/cpufreq/hwp.c
@@ -506,11 +506,11 @@ static void cf_check hwp_set_misc_turbo(void *info)
     }
 }
 
-static int cf_check hwp_cpufreq_update(int cpuid, struct cpufreq_policy *policy)
+static int cf_check hwp_cpufreq_update(unsigned int cpu, struct cpufreq_policy *policy)
 {
-    on_selected_cpus(cpumask_of(cpuid), hwp_set_misc_turbo, policy, 1);
+    on_selected_cpus(cpumask_of(cpu), hwp_set_misc_turbo, policy, 1);
 
-    return per_cpu(hwp_drv_data, cpuid)->ret;
+    return per_cpu(hwp_drv_data, cpu)->ret;
 }
 
 static const struct cpufreq_driver __initconst_cf_clobber
diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c
index 8a27ee82a5b0..69364e185562 100644
--- a/xen/arch/x86/acpi/cpufreq/powernow.c
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c
@@ -68,12 +68,12 @@ static void cf_check update_cpb(void *data)
 }
 
 static int cf_check powernow_cpufreq_update(
-    int cpuid, struct cpufreq_policy *policy)
+    unsigned int cpu, struct cpufreq_policy *policy)
 {
-    if (!cpumask_test_cpu(cpuid, &cpu_online_map))
+    if ( !cpu_online(cpu) )
         return -EINVAL;
 
-    on_selected_cpus(cpumask_of(cpuid), update_cpb, policy, 1);
+    on_selected_cpus(cpumask_of(cpu), update_cpb, policy, 1);
 
     return 0;
 }
diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c
index 36c800f4fa39..a74593b70577 100644
--- a/xen/drivers/cpufreq/cpufreq.c
+++ b/xen/drivers/cpufreq/cpufreq.c
@@ -459,21 +459,21 @@ static void print_PPC(unsigned int platform_limit)
 
 int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf)
 {
-    int ret=0, cpuid;
+    int ret=0, cpu;
     struct processor_pminfo *pmpt;
     struct processor_performance *pxpt;
 
-    cpuid = get_cpu_id(acpi_id);
-    if ( cpuid < 0 || !perf )
+    cpu = get_cpu_id(acpi_id);
+    if ( cpu < 0 || !perf )
     {
         ret = -EINVAL;
         goto out;
     }
     if ( cpufreq_verbose )
-        printk("Set CPU acpi_id(%d) cpuid(%d) Px State info:\n",
+        printk("Set CPU acpi_id(%d) cpu(%d) Px State info:\n",
                acpi_id, cpuid);
 
-    pmpt = processor_pminfo[cpuid];
+    pmpt = processor_pminfo[cpu];
     if ( !pmpt )
     {
         pmpt = xzalloc(struct processor_pminfo);
@@ -482,11 +482,11 @@ int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf)
             ret = -ENOMEM;
             goto out;
         }
-        processor_pminfo[cpuid] = pmpt;
+        processor_pminfo[cpu] = pmpt;
     }
     pxpt = &pmpt->perf;
     pmpt->acpi_id = acpi_id;
-    pmpt->id = cpuid;
+    pmpt->id = cpu;
 
     if ( perf->flags & XEN_PX_PCT )
     {
@@ -564,7 +564,7 @@ int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf)
 
         if ( pxpt->init == XEN_PX_INIT )
         {
-            ret = cpufreq_limit_change(cpuid);
+            ret = cpufreq_limit_change(cpu);
             goto out;
         }
     }
@@ -573,7 +573,7 @@ int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf)
     {
         pxpt->init = XEN_PX_INIT;
 
-        ret = cpufreq_cpu_init(cpuid);
+        ret = cpufreq_cpu_init(cpu);
         goto out;
     }
 
diff --git a/xen/drivers/cpufreq/utility.c b/xen/drivers/cpufreq/utility.c
index dbf8985969b2..6d2413b32a55 100644
--- a/xen/drivers/cpufreq/utility.c
+++ b/xen/drivers/cpufreq/utility.c
@@ -86,13 +86,12 @@ void cpufreq_statistic_update(unsigned int cpu, uint8_t from, uint8_t to)
     spin_unlock(cpufreq_statistic_lock);
 }
 
-int cpufreq_statistic_init(unsigned int cpuid)
+int cpufreq_statistic_init(unsigned int cpu)
 {
     uint32_t i, count;
     struct pm_px *pxpt;
-    const struct processor_pminfo *pmpt = processor_pminfo[cpuid];
-    spinlock_t *cpufreq_statistic_lock = 
-                          &per_cpu(cpufreq_statistic_lock, cpuid);
+    const struct processor_pminfo *pmpt = processor_pminfo[cpu];
+    spinlock_t *cpufreq_statistic_lock = &per_cpu(cpufreq_statistic_lock, cpu);
 
     spin_lock_init(cpufreq_statistic_lock);
 
@@ -101,7 +100,7 @@ int cpufreq_statistic_init(unsigned int cpuid)
 
     spin_lock(cpufreq_statistic_lock);
 
-    pxpt = per_cpu(cpufreq_statistic_data, cpuid);
+    pxpt = per_cpu(cpufreq_statistic_data, cpu);
     if ( pxpt ) {
         spin_unlock(cpufreq_statistic_lock);
         return 0;
@@ -114,7 +113,7 @@ int cpufreq_statistic_init(unsigned int cpuid)
         spin_unlock(cpufreq_statistic_lock);
         return -ENOMEM;
     }
-    per_cpu(cpufreq_statistic_data, cpuid) = pxpt;
+    per_cpu(cpufreq_statistic_data, cpu) = pxpt;
 
     pxpt->u.trans_pt = xzalloc_array(uint64_t, count * count);
     if (!pxpt->u.trans_pt) {
@@ -138,22 +137,21 @@ int cpufreq_statistic_init(unsigned int cpuid)
         pxpt->u.pt[i].freq = pmpt->perf.states[i].core_frequency;
 
     pxpt->prev_state_wall = NOW();
-    pxpt->prev_idle_wall = get_cpu_idle_time(cpuid);
+    pxpt->prev_idle_wall = get_cpu_idle_time(cpu);
 
     spin_unlock(cpufreq_statistic_lock);
 
     return 0;
 }
 
-void cpufreq_statistic_exit(unsigned int cpuid)
+void cpufreq_statistic_exit(unsigned int cpu)
 {
     struct pm_px *pxpt;
-    spinlock_t *cpufreq_statistic_lock = 
-               &per_cpu(cpufreq_statistic_lock, cpuid);
+    spinlock_t *cpufreq_statistic_lock = &per_cpu(cpufreq_statistic_lock, cpu);
 
     spin_lock(cpufreq_statistic_lock);
 
-    pxpt = per_cpu(cpufreq_statistic_data, cpuid);
+    pxpt = per_cpu(cpufreq_statistic_data, cpu);
     if (!pxpt) {
         spin_unlock(cpufreq_statistic_lock);
         return;
@@ -162,22 +160,21 @@ void cpufreq_statistic_exit(unsigned int cpuid)
     xfree(pxpt->u.trans_pt);
     xfree(pxpt->u.pt);
     xfree(pxpt);
-    per_cpu(cpufreq_statistic_data, cpuid) = NULL;
+    per_cpu(cpufreq_statistic_data, cpu) = NULL;
 
     spin_unlock(cpufreq_statistic_lock);
 }
 
-void cpufreq_statistic_reset(unsigned int cpuid)
+void cpufreq_statistic_reset(unsigned int cpu)
 {
     uint32_t i, j, count;
     struct pm_px *pxpt;
-    const struct processor_pminfo *pmpt = processor_pminfo[cpuid];
-    spinlock_t *cpufreq_statistic_lock = 
-               &per_cpu(cpufreq_statistic_lock, cpuid);
+    const struct processor_pminfo *pmpt = processor_pminfo[cpu];
+    spinlock_t *cpufreq_statistic_lock = &per_cpu(cpufreq_statistic_lock, cpu);
 
     spin_lock(cpufreq_statistic_lock);
 
-    pxpt = per_cpu(cpufreq_statistic_data, cpuid);
+    pxpt = per_cpu(cpufreq_statistic_data, cpu);
     if ( !pmpt || !pxpt || !pxpt->u.pt || !pxpt->u.trans_pt ) {
         spin_unlock(cpufreq_statistic_lock);
         return;
@@ -194,7 +191,7 @@ void cpufreq_statistic_reset(unsigned int cpuid)
     }
 
     pxpt->prev_state_wall = NOW();
-    pxpt->prev_idle_wall = get_cpu_idle_time(cpuid);
+    pxpt->prev_idle_wall = get_cpu_idle_time(cpu);
 
     spin_unlock(cpufreq_statistic_lock);
 }
@@ -389,7 +386,7 @@ int cpufreq_driver_getavg(unsigned int cpu, unsigned int flag)
     return policy->cur;
 }
 
-int cpufreq_update_turbo(int cpuid, int new_state)
+int cpufreq_update_turbo(unsigned int cpu, int new_state)
 {
     struct cpufreq_policy *policy;
     int curr_state;
@@ -399,7 +396,7 @@ int cpufreq_update_turbo(int cpuid, int new_state)
         new_state != CPUFREQ_TURBO_DISABLED)
         return -EINVAL;
 
-    policy = per_cpu(cpufreq_cpu_policy, cpuid);
+    policy = per_cpu(cpufreq_cpu_policy, cpu);
     if (!policy)
         return -EACCES;
 
@@ -413,7 +410,7 @@ int cpufreq_update_turbo(int cpuid, int new_state)
     policy->turbo = new_state;
     if (cpufreq_driver.update)
     {
-        ret = alternative_call(cpufreq_driver.update, cpuid, policy);
+        ret = alternative_call(cpufreq_driver.update, cpu, policy);
         if (ret)
             policy->turbo = curr_state;
     }
@@ -422,11 +419,11 @@ int cpufreq_update_turbo(int cpuid, int new_state)
 }
 
 
-int cpufreq_get_turbo_status(int cpuid)
+int cpufreq_get_turbo_status(unsigned int cpu)
 {
     struct cpufreq_policy *policy;
 
-    policy = per_cpu(cpufreq_cpu_policy, cpuid);
+    policy = per_cpu(cpufreq_cpu_policy, cpu);
     return policy && policy->turbo == CPUFREQ_TURBO_ENABLED;
 }
 
diff --git a/xen/include/acpi/cpufreq/cpufreq.h b/xen/include/acpi/cpufreq/cpufreq.h
index b4685a908599..443427153bb6 100644
--- a/xen/include/acpi/cpufreq/cpufreq.h
+++ b/xen/include/acpi/cpufreq/cpufreq.h
@@ -145,8 +145,8 @@ extern int cpufreq_driver_getavg(unsigned int cpu, unsigned int flag);
 #define CPUFREQ_TURBO_UNSUPPORTED   0
 #define CPUFREQ_TURBO_ENABLED       1
 
-extern int cpufreq_update_turbo(int cpuid, int new_state);
-extern int cpufreq_get_turbo_status(int cpuid);
+int cpufreq_update_turbo(unsigned int cpu, int new_state);
+int cpufreq_get_turbo_status(unsigned int cpu);
 
 static inline int
 __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event)
@@ -167,7 +167,7 @@ struct cpufreq_driver {
     int    (*init)(struct cpufreq_policy *policy);
     int    (*verify)(struct cpufreq_policy *policy);
     int    (*setpolicy)(struct cpufreq_policy *policy);
-    int    (*update)(int cpuid, struct cpufreq_policy *policy);
+    int    (*update)(unsigned int cpu, struct cpufreq_policy *policy);
     int    (*target)(struct cpufreq_policy *policy,
                      unsigned int target_freq,
                      unsigned int relation);
diff --git a/xen/include/acpi/cpufreq/processor_perf.h b/xen/include/acpi/cpufreq/processor_perf.h
index 7cd240061947..5f48aceadb21 100644
--- a/xen/include/acpi/cpufreq/processor_perf.h
+++ b/xen/include/acpi/cpufreq/processor_perf.h
@@ -12,9 +12,9 @@ unsigned int powernow_register_driver(void);
 unsigned int get_measured_perf(unsigned int cpu, unsigned int flag);
 void cpufreq_residency_update(unsigned int cpu, uint8_t state);
 void cpufreq_statistic_update(unsigned int cpu, uint8_t from, uint8_t to);
-int  cpufreq_statistic_init(unsigned int cpuid);
-void cpufreq_statistic_exit(unsigned int cpuid);
-void cpufreq_statistic_reset(unsigned int cpuid);
+int  cpufreq_statistic_init(unsigned int cpu);
+void cpufreq_statistic_exit(unsigned int cpu);
+void cpufreq_statistic_reset(unsigned int cpu);
 
 int  cpufreq_limit_change(unsigned int cpu);
 
@@ -59,5 +59,5 @@ struct pm_px {
 
 DECLARE_PER_CPU(struct pm_px *, cpufreq_statistic_data);
 
-int cpufreq_cpu_init(unsigned int cpuid);
+int cpufreq_cpu_init(unsigned int cpu);
 #endif /* __XEN_PROCESSOR_PM_H__ */
diff --git a/xen/include/xen/pmstat.h b/xen/include/xen/pmstat.h
index 43b826ad4d37..e6ab1423a9be 100644
--- a/xen/include/xen/pmstat.h
+++ b/xen/include/xen/pmstat.h
@@ -7,9 +7,9 @@
 
 int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf);
 long set_cx_pminfo(uint32_t acpi_id, struct xen_processor_power *power);
-uint32_t pmstat_get_cx_nr(uint32_t cpuid);
-int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat);
-int pmstat_reset_cx_stat(uint32_t cpuid);
+uint32_t pmstat_get_cx_nr(unsigned int cpu);
+int pmstat_get_cx_stat(unsigned int cpu, struct pm_cx_stat *stat);
+int pmstat_reset_cx_stat(unsigned int cpu);
 
 int do_get_pm_info(struct xen_sysctl_get_pmstat *op);
 int do_pm_op(struct xen_sysctl_pm_op *op);
-- 
2.30.2



^ permalink raw reply related	[relevance 1%]

* [GIT PULL] hardening updates for 6.10-rc1
@ 2024-05-11 19:42  1% Kees Cook
  0 siblings, 0 replies; 200+ results
From: Kees Cook @ 2024-05-11 19:42 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andy Shevchenko, Andy Shevchenko, Charles Bertsch,
	Erhard Furtner, Erick Archer, Gustavo A. R. Silva, Ivan Orlov,
	Justin Stitt, Kees Cook, kernel test robot, linux-hardening,
	Luis Chamberlain, Marco Elver, Martin K. Petersen,
	Nathan Chancellor, Sven Eckelmann, Thomas Weißschuh,
	Tycho Andersen

Hi Linus,

Please pull these hardening updates for 6.10-rc1. The bulk of the changes
here are related to refactoring and expanding the KUnit tests for string
helper and fortify behavior. Some trivial strncpy replacements in fs/
were carried in my tree. Also some fixes to SCSI string handling were
carried in my tree since the helper for those was introduce here. Beyond
that, just little fixes all around: objtool getting confused about
LKDTM+KCFI, preparing for future refactors (constification of sysctl
tables, additional __counted_by annotations), a Clang UBSAN+i386 crash
fix, and adding more options in the hardening.config Kconfig fragment.

Thanks!

-Kees

The following changes since commit 39cd87c4eb2b893354f3b850f916353f2658ae6f:

  Linux 6.9-rc2 (2024-03-31 14:32:39 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-6.10-rc1

for you to fetch changes up to 6d305cbef1aa01b9714e01e35f3d5c28544cf04d:

  uapi: stddef.h: Provide UAPI macros for __counted_by_{le, be} (2024-05-08 00:42:25 -0700)

----------------------------------------------------------------
hardening updates for 6.10-rc1

- selftests: Add str*cmp tests (Ivan Orlov)

- __counted_by: provide UAPI for _le/_be variants (Erick Archer)

- Various strncpy deprecation refactors (Justin Stitt)

- stackleak: Use a copy of soon-to-be-const sysctl table (Thomas Weißschuh)

- UBSAN: Work around i386 -regparm=3 bug with Clang prior to version 19

- Provide helper to deal with non-NUL-terminated string copying

- SCSI: Fix older string copying bugs (with new helper)

- selftests: Consolidate string helper behavioral tests

- selftests: add memcpy() fortify tests

- string: Add additional __realloc_size() annotations for "dup" helpers

- LKDTM: Fix KCFI+rodata+objtool confusion

- hardening.config: Enable KCFI

----------------------------------------------------------------
Erick Archer (1):
      uapi: stddef.h: Provide UAPI macros for __counted_by_{le, be}

Ivan Orlov (1):
      string_kunit: Add test cases for str*cmp functions

Justin Stitt (5):
      virt: acrn: replace deprecated strncpy with strscpy
      reiserfs: replace deprecated strncpy with scnprintf
      hfsplus: refactor copy_name to not use strncpy
      fs: ecryptfs: replace deprecated strncpy with strscpy
      init: replace deprecated strncpy with strscpy_pad

Kees Cook (21):
      string: Prepare to merge strscpy_kunit.c into string_kunit.c
      string: Merge strscpy KUnit tests into string_kunit.c
      string: Prepare to merge strcat KUnit tests into string_kunit.c
      string: Merge strcat KUnit tests into string_kunit.c
      string: Convert KUnit test names to standard convention
      string.h: Introduce memtostr() and memtostr_pad()
      string_kunit: Move strtomem KUnit test to string_kunit.c
      MAINTAINERS: Add ubsan.h to the UBSAN section
      ubsan: Remove 1-element array usage in debug reporting
      ubsan: Avoid i386 UBSAN handler crashes with Clang
      scsi: mptfusion: Avoid possible run-time warning with long manufacturer strings
      scsi: mpi3mr: Avoid possible run-time warning with long manufacturer strings
      scsi: qla2xxx: Avoid possible run-time warning with long model_num
      kunit/fortify: Fix mismatched kvalloc()/vfree() usage
      kunit/fortify: Rename tests to use recommended conventions
      kunit/fortify: Do not spam logs with fortify WARNs
      kunit/fortify: Add memcpy() tests
      lkdtm: Disable CFI checking for perms functions
      hardening: Enable KCFI and some other options
      kunit/fortify: Fix replaced failure path to unbreak __alloc_size
      string: Add additional __realloc_size() annotations for "dup" helpers

Thomas Weißschuh (1):
      stackleak: Use a copy of the ctl_table argument

 MAINTAINERS                            |   3 +-
 arch/arm64/configs/hardening.config    |   1 +
 arch/x86/configs/hardening.config      |   3 +
 drivers/message/fusion/mptsas.c        |  14 +-
 drivers/misc/lkdtm/Makefile            |   2 +-
 drivers/misc/lkdtm/perms.c             |   2 +-
 drivers/scsi/mpi3mr/mpi3mr_transport.c |  14 +-
 drivers/scsi/qla2xxx/qla_mr.c          |   6 +-
 drivers/virt/acrn/ioreq.c              |   2 +-
 fs/ecryptfs/crypto.c                   |   4 +-
 fs/ecryptfs/main.c                     |  26 +-
 fs/hfsplus/xattr.c                     |  22 +-
 fs/reiserfs/item_ops.c                 |  13 +-
 include/linux/fortify-string.h         |   9 +-
 include/linux/string.h                 |  62 ++++-
 include/uapi/linux/stddef.h            |   8 +
 init/do_mounts.c                       |   3 +-
 kernel/configs/hardening.config        |   8 +
 kernel/stackleak.c                     |   6 +-
 lib/Kconfig.debug                      |  10 -
 lib/Makefile                           |   2 -
 lib/fortify_kunit.c                    | 222 ++++++++++++----
 lib/memcpy_kunit.c                     |  53 ----
 lib/strcat_kunit.c                     | 104 --------
 lib/string_kunit.c                     | 461 ++++++++++++++++++++++++++++++++-
 lib/strscpy_kunit.c                    | 142 ----------
 lib/ubsan.h                            |  43 +--
 27 files changed, 768 insertions(+), 477 deletions(-)
 delete mode 100644 lib/strcat_kunit.c
 delete mode 100644 lib/strscpy_kunit.c

-- 
Kees Cook

^ permalink raw reply	[relevance 1%]

* Re: [GIT PULL] alpha: cleanups and build fixes for 6.10
  2024-05-11 18:49  0%       ` John Paul Adrian Glaubitz
@ 2024-05-11 19:37  1%         ` Paul E. McKenney
  2024-05-11 20:08  1%           ` Arnd Bergmann
  0 siblings, 1 reply; 200+ results
From: Paul E. McKenney @ 2024-05-11 19:37 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Arnd Bergmann, Linus Torvalds, linux-kernel, Linux-Arch,
	linux-alpha, Richard Henderson, Ivan Kokshaysky, Matt Turner,
	Alexander Viro

On Sat, May 11, 2024 at 08:49:08PM +0200, John Paul Adrian Glaubitz wrote:
> Hi Paul,
> 
> On Fri, 2024-05-10 at 15:28 -0700, Paul E. McKenney wrote:
> > > I'm still against dropping pre-EV56 so quickly without a proper phaseout period.
> > > Why not wait for the next LTS release? AFAIK pre-EV56 support is not broken, is
> > > it?
> > 
> > Sadly, yes, it is, and it has been broken in mainline for almost two
> > years.
> 
> Could you elaborate what exactly is broken? I'm just trying to understand the reasoning.

First, let's make sure that I completely and correctly understand the
situation.

The pre-EV56 Alphas have no byte store instruction, correct?

If that is in fact correct, what code is generated for a volatile store
to a single byte for those CPUs?  For example, for this example?

	char c;

	...

	WRITE_ONCE(c, 3);

The rumor I heard is that the compilers will generate a non-atomic
read-modify-write instruction sequence in this case, first reading the
32-bit word containing that byte into a register, then substituting the
value to be stored into corresponding byte of that register, and finally
doing a 32-bit store from that register.

Is that the case, or am I confused?

							Thanx, Paul

PS:  Or, if you prefer, this example is equivalent:

	volatile char c;

	...

	c = 3;

^ permalink raw reply	[relevance 1%]

* Re: [PATCH v2, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC
  @ 2024-05-11 19:36  1%           ` Russell King (Oracle)
  0 siblings, 0 replies; 200+ results
From: Russell King (Oracle) @ 2024-05-11 19:36 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jitendra Vegiraju, netdev, davem, edumazet, kuba, pabeni,
	bcm-kernel-feedback-list, alexandre.torgue, joabreu,
	mcoquelin.stm32, richardcochran, linux-kernel, linux-stm32,
	linux-arm-kernel

On Sat, May 11, 2024 at 07:50:03PM +0200, Andrew Lunn wrote:
> And now you mentions legacy Fixed link:
> 
> +MODULE_DESCRIPTION("Broadcom 10G Automotive Ethernet PCIe driver");
> 
> This claims it is a 10G device. You cannot represent 10G using legacy
> fixed link.

While it may be a 10G device, it seems the fixed-link specification
in the driver is set to 1G !

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[relevance 1%]

* Re: [PATCH v2, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC
@ 2024-05-11 19:36  1%           ` Russell King (Oracle)
  0 siblings, 0 replies; 200+ results
From: Russell King (Oracle) @ 2024-05-11 19:36 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jitendra Vegiraju, netdev, davem, edumazet, kuba, pabeni,
	bcm-kernel-feedback-list, alexandre.torgue, joabreu,
	mcoquelin.stm32, richardcochran, linux-kernel, linux-stm32,
	linux-arm-kernel

On Sat, May 11, 2024 at 07:50:03PM +0200, Andrew Lunn wrote:
> And now you mentions legacy Fixed link:
> 
> +MODULE_DESCRIPTION("Broadcom 10G Automotive Ethernet PCIe driver");
> 
> This claims it is a 10G device. You cannot represent 10G using legacy
> fixed link.

While it may be a 10G device, it seems the fixed-link specification
in the driver is set to 1G !

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[relevance 1%]

* [PATCH] ACPI: scan: Add missing check for kstrdup()
@ 2024-05-11 19:35  1% Jiasheng Jiang
  0 siblings, 0 replies; 200+ results
From: Jiasheng Jiang @ 2024-05-11 19:35 UTC (permalink / raw)
  To: rafael, lenb, lv.zheng, rui.zhang
  Cc: linux-acpi, linux-kernel, Jiasheng Jiang

Add check for the return value of kstrdup() in order to gurantee
the success of allocation.
Moreover, move the code forward to simplify the error handling.

Fixes: ccf78040265b ("ACPI: Add _UID support for ACPI devices.")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@outlook.com>
---
 drivers/acpi/scan.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index d1464324de95..59246757a207 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1385,6 +1385,15 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
 			return;
 		}
 
+		if (info->valid & ACPI_VALID_UID) {
+			pnp->unique_id = kstrdup(info->unique_id.string,
+							GFP_KERNEL);
+			if (!pnp->unique_id) {
+				kfree(info);
+				return;
+			}
+		}
+
 		if (info->valid & ACPI_VALID_HID) {
 			acpi_add_id(pnp, info->hardware_id.string);
 			pnp->type.platform_id = 1;
@@ -1398,9 +1407,6 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
 			pnp->bus_address = info->address;
 			pnp->type.bus_address = 1;
 		}
-		if (info->valid & ACPI_VALID_UID)
-			pnp->unique_id = kstrdup(info->unique_id.string,
-							GFP_KERNEL);
 		if (info->valid & ACPI_VALID_CLS)
 			acpi_add_id(pnp, info->class_code.string);
 
-- 
2.25.1


^ permalink raw reply related	[relevance 1%]

* [PATCH] drm/msm/adreno: request memory region
@ 2024-05-11 19:35  1% Kiarash Hajian
  2024-05-11 19:49  0% ` Dmitry Baryshkov
  0 siblings, 1 reply; 200+ results
From: Kiarash Hajian @ 2024-05-11 19:35 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	Marijn Suijten, David Airlie, Daniel Vetter
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Kiarash Hajian

The driver's memory regions are currently just ioremap()ed, but not
reserved through a request. That's not a bug, but having the request is
a little more robust.

Implement the region-request through the corresponding managed
devres-function.

Signed-off-by: Kiarash Hajian <kiarash8112hajian@gmail.com>
---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 8bea8ef26f77..aa83cb461a75 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -636,9 +636,9 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
 
 err:
 	if (!IS_ERR_OR_NULL(pdcptr))
-		iounmap(pdcptr);
+		devm_iounmap(&pdev->dev,pdcptr);
 	if (!IS_ERR_OR_NULL(seqptr))
-		iounmap(seqptr);
+		devm_iounmap(&pdev->dev,seqptr);
 }
 
 /*
@@ -1503,7 +1503,7 @@ static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev,
 		return ERR_PTR(-EINVAL);
 	}
 
-	ret = ioremap(res->start, resource_size(res));
+	ret = devm_ioremap_resource(&pdev->dev, res);
 	if (!ret) {
 		DRM_DEV_ERROR(&pdev->dev, "Unable to map the %s registers\n", name);
 		return ERR_PTR(-EINVAL);
@@ -1646,7 +1646,7 @@ int a6xx_gmu_wrapper_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
 	dev_pm_domain_detach(gmu->cxpd, false);
 
 err_mmio:
-	iounmap(gmu->mmio);
+	devm_iounmap(gmu->dev ,gmu->mmio);
 
 	/* Drop reference taken in of_find_device_by_node */
 	put_device(gmu->dev);
@@ -1825,9 +1825,9 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
 	dev_pm_domain_detach(gmu->cxpd, false);
 
 err_mmio:
-	iounmap(gmu->mmio);
+	devm_iounmap(gmu->dev ,gmu->mmio);
 	if (platform_get_resource_byname(pdev, IORESOURCE_MEM, "rscc"))
-		iounmap(gmu->rscc);
+		devm_iounmap(gmu->dev ,gmu->rscc);
 	free_irq(gmu->gmu_irq, gmu);
 	free_irq(gmu->hfi_irq, gmu);
 

---
base-commit: cf87f46fd34d6c19283d9625a7822f20d90b64a4
change-id: 20240511-msm-adreno-memory-region-2bcb1c958621

Best regards,
-- 
Kiarash Hajian <kiarash8112hajian@gmail.com>


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH v2, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC
  @ 2024-05-11 19:35  0%           ` Russell King (Oracle)
  0 siblings, 0 replies; 200+ results
From: Russell King (Oracle) @ 2024-05-11 19:35 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jitendra Vegiraju, netdev, davem, edumazet, kuba, pabeni,
	bcm-kernel-feedback-list, alexandre.torgue, joabreu,
	mcoquelin.stm32, richardcochran, linux-kernel, linux-stm32,
	linux-arm-kernel

On Sat, May 11, 2024 at 07:19:07PM +0200, Andrew Lunn wrote:
> It might be because it is a PCI device, and they are trying to avoid
> DT? Maybe because they have not figured out how to add DT properties
> to a PCI device. It is possible.

swnodes.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[relevance 0%]

* Re: [PATCH v2, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC
@ 2024-05-11 19:35  0%           ` Russell King (Oracle)
  0 siblings, 0 replies; 200+ results
From: Russell King (Oracle) @ 2024-05-11 19:35 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Jitendra Vegiraju, netdev, davem, edumazet, kuba, pabeni,
	bcm-kernel-feedback-list, alexandre.torgue, joabreu,
	mcoquelin.stm32, richardcochran, linux-kernel, linux-stm32,
	linux-arm-kernel

On Sat, May 11, 2024 at 07:19:07PM +0200, Andrew Lunn wrote:
> It might be because it is a PCI device, and they are trying to avoid
> DT? Maybe because they have not figured out how to add DT properties
> to a PCI device. It is possible.

swnodes.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[relevance 0%]

* Re: [PATCH v2, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC
  @ 2024-05-11 19:34  1%     ` Russell King (Oracle)
  2024-05-11 19:34  1%     ` Russell King (Oracle)
  1 sibling, 0 replies; 200+ results
From: Russell King (Oracle) @ 2024-05-11 19:34 UTC (permalink / raw)
  To: Jitendra Vegiraju
  Cc: netdev, davem, edumazet, kuba, pabeni, bcm-kernel-feedback-list,
	alexandre.torgue, joabreu, mcoquelin.stm32, richardcochran,
	linux-kernel, linux-stm32, linux-arm-kernel

Hi,

Thanks for the patch,. but there are things that need some improvement.

On Fri, May 10, 2024 at 06:59:24PM -0700, Jitendra Vegiraju wrote:
> +static void dwxgmac_brcm_dma_init_tx_chan(struct stmmac_priv *priv,
> +					  void __iomem *ioaddr,
> +					  struct stmmac_dma_cfg *dma_cfg,
> +					  dma_addr_t phy, u32 chan)
> +{
> +	u32 value;
> +
> +	value = readl(ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
> +	value &= ~XGMAC_TxPBL;
> +	value &= ~GENMASK(6, 4);
> +	writel(value, ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
> +
> +	writel(upper_32_bits(phy), ioaddr + XGMAC_DMA_CH_TxDESC_HADDR(chan));
> +	writel(lower_32_bits(phy), ioaddr + XGMAC_DMA_CH_TxDESC_LADDR(chan));

Please use "dma_addr" not "phy" here. "phy" could mean ethernet phy.
I personally dislike "physical address" for DMA stuff because if
there's an IOMMU or other translation layer present, what you have
here is *not* a physical address.

> +static void dwxgmac_brcm_dma_init_rx_chan(struct stmmac_priv *priv,
> +					  void __iomem *ioaddr,
> +					  struct stmmac_dma_cfg *dma_cfg,
> +					  dma_addr_t phy, u32 chan)
> +{
> +	u32 value;
> +
> +	value = readl(ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
> +	value &= ~XGMAC_RxPBL;
> +	writel(value, ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
> +
> +	writel(upper_32_bits(phy), ioaddr + XGMAC_DMA_CH_RxDESC_HADDR(chan));
> +	writel(lower_32_bits(phy), ioaddr + XGMAC_DMA_CH_RxDESC_LADDR(chan));

Ditto.

...

> +static void dwxgmac_brcm_fix_speed(void *priv, unsigned int speed,
> +				   unsigned int mode)
> +{
> +}

If this is empty, do you really need it? The method is optional.

...

> +static int dwxgmac_brcm_pci_probe(struct pci_dev *pdev,
> +				  const struct pci_device_id *id)
> +{
...
> +	/* This device interface is directly attached to the switch chip on
> +	 *  the SoC. Since no MDIO is present, register fixed_phy.
> +	 */
> +	brcm_priv->phy_dev =
> +		 fixed_phy_register(PHY_POLL,
> +				    &dwxgmac_brcm_fixed_phy_status, NULL);
> +	if (IS_ERR(brcm_priv->phy_dev)) {
> +		dev_err(&pdev->dev, "%s\tNo PHY/fixed_PHY found\n", __func__);
> +		return -ENODEV;
> +	}
> +	phy_attached_info(brcm_priv->phy_dev);

As pointed out in the other sub-thread, you don't need this. If you need
a fixed-link and you don't have a firmware description of it, you can
provide a swnode based description through plat->port_node that will be
passed to phylink. Through that, you can tell phylink to create a
fixed link.

> +	ret = stmmac_dvr_probe(&pdev->dev, plat, &res);
> +	if (ret)
> +		goto err_disable_msi;
> +
> +	/* The stmmac core driver doesn't have the infrastructure to
> +	 * support fixed-phy mdio bus for non-platform bus drivers.
> +	 * Until a better solution is implemented, initialize the
> +	 * following entries after priv structure is populated.
> +	 */
> +	ndev = dev_get_drvdata(&pdev->dev);
> +	priv = netdev_priv(ndev);
> +	priv->mii = mdio_find_bus("fixed-0");
> +
> +	ndev->hw_features &= ~NETIF_F_HW_VLAN_CTAG_RX;
> +	priv->hw->hw_vlan_en = false;

Basically... no. Do not do any setup after stmmac_dvr_probe(), because
the network device has already been registered and published to
userspace, and userspace may have already opened the network device.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[relevance 1%]

* Re: [PATCH v2, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC
@ 2024-05-11 19:34  1%     ` Russell King (Oracle)
  0 siblings, 0 replies; 200+ results
From: Russell King (Oracle) @ 2024-05-11 19:34 UTC (permalink / raw)
  To: Jitendra Vegiraju
  Cc: netdev, davem, edumazet, kuba, pabeni, bcm-kernel-feedback-list,
	alexandre.torgue, joabreu, mcoquelin.stm32, richardcochran,
	linux-kernel, linux-stm32, linux-arm-kernel

Hi,

Thanks for the patch,. but there are things that need some improvement.

On Fri, May 10, 2024 at 06:59:24PM -0700, Jitendra Vegiraju wrote:
> +static void dwxgmac_brcm_dma_init_tx_chan(struct stmmac_priv *priv,
> +					  void __iomem *ioaddr,
> +					  struct stmmac_dma_cfg *dma_cfg,
> +					  dma_addr_t phy, u32 chan)
> +{
> +	u32 value;
> +
> +	value = readl(ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
> +	value &= ~XGMAC_TxPBL;
> +	value &= ~GENMASK(6, 4);
> +	writel(value, ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
> +
> +	writel(upper_32_bits(phy), ioaddr + XGMAC_DMA_CH_TxDESC_HADDR(chan));
> +	writel(lower_32_bits(phy), ioaddr + XGMAC_DMA_CH_TxDESC_LADDR(chan));

Please use "dma_addr" not "phy" here. "phy" could mean ethernet phy.
I personally dislike "physical address" for DMA stuff because if
there's an IOMMU or other translation layer present, what you have
here is *not* a physical address.

> +static void dwxgmac_brcm_dma_init_rx_chan(struct stmmac_priv *priv,
> +					  void __iomem *ioaddr,
> +					  struct stmmac_dma_cfg *dma_cfg,
> +					  dma_addr_t phy, u32 chan)
> +{
> +	u32 value;
> +
> +	value = readl(ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
> +	value &= ~XGMAC_RxPBL;
> +	writel(value, ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
> +
> +	writel(upper_32_bits(phy), ioaddr + XGMAC_DMA_CH_RxDESC_HADDR(chan));
> +	writel(lower_32_bits(phy), ioaddr + XGMAC_DMA_CH_RxDESC_LADDR(chan));

Ditto.

...

> +static void dwxgmac_brcm_fix_speed(void *priv, unsigned int speed,
> +				   unsigned int mode)
> +{
> +}

If this is empty, do you really need it? The method is optional.

...

> +static int dwxgmac_brcm_pci_probe(struct pci_dev *pdev,
> +				  const struct pci_device_id *id)
> +{
...
> +	/* This device interface is directly attached to the switch chip on
> +	 *  the SoC. Since no MDIO is present, register fixed_phy.
> +	 */
> +	brcm_priv->phy_dev =
> +		 fixed_phy_register(PHY_POLL,
> +				    &dwxgmac_brcm_fixed_phy_status, NULL);
> +	if (IS_ERR(brcm_priv->phy_dev)) {
> +		dev_err(&pdev->dev, "%s\tNo PHY/fixed_PHY found\n", __func__);
> +		return -ENODEV;
> +	}
> +	phy_attached_info(brcm_priv->phy_dev);

As pointed out in the other sub-thread, you don't need this. If you need
a fixed-link and you don't have a firmware description of it, you can
provide a swnode based description through plat->port_node that will be
passed to phylink. Through that, you can tell phylink to create a
fixed link.

> +	ret = stmmac_dvr_probe(&pdev->dev, plat, &res);
> +	if (ret)
> +		goto err_disable_msi;
> +
> +	/* The stmmac core driver doesn't have the infrastructure to
> +	 * support fixed-phy mdio bus for non-platform bus drivers.
> +	 * Until a better solution is implemented, initialize the
> +	 * following entries after priv structure is populated.
> +	 */
> +	ndev = dev_get_drvdata(&pdev->dev);
> +	priv = netdev_priv(ndev);
> +	priv->mii = mdio_find_bus("fixed-0");
> +
> +	ndev->hw_features &= ~NETIF_F_HW_VLAN_CTAG_RX;
> +	priv->hw->hw_vlan_en = false;

Basically... no. Do not do any setup after stmmac_dvr_probe(), because
the network device has already been registered and published to
userspace, and userspace may have already opened the network device.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[relevance 1%]

* [PATCH 4/4] drm/tidss: Add OLDI bridge support
  2024-05-11 19:30 14% [PATCH 0/4] drm/tidss: Add OLDI bridge support Aradhya Bhatia
                   ` (2 preceding siblings ...)
  2024-05-11 19:30 14%   ` [PATCH 3/4] dt-bindings: display: ti, am65x-dss: " Aradhya Bhatia
@ 2024-05-11 19:30 11% ` Aradhya Bhatia
  3 siblings, 0 replies; 200+ results
From: Aradhya Bhatia @ 2024-05-11 19:30 UTC (permalink / raw)
  To: Tomi Valkeinen, Jyri Sarha, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Neil Armstrong, Laurent Pinchart,
	David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: DRI Development List, Devicetree List, Linux Kernel List,
	Nishanth Menon, Vignesh Raghavendra, Praneeth Bajjuri,
	Udit Kumar, Francesco Dolcini, Alexander Sverdlin, Randolph Sapp,
	Devarsh Thakkar, Jayesh Choudhary, Jai Luthra, Aradhya Bhatia

Up till now, the OLDI support in tidss was integrated within the tidss dispc.
This was fine till the OLDI was one-to-mapped with the DSS video-port (VP).
The AM62 and AM62P SoCs have 2 OLDI TXes that can support dual-lvds / lvds-clone
modes.

Add OLDI TXes as separate DRM bridge entities to better support the new LVDS
configurations.

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
---
Note:

The OLDI configuration should happen before the video-port configuration takes
place in tidss_crtc_atomic_enable hook. I have posted a patch allowing DRM
bridges to get enabled before the CRTC of that bridge is enabled[0]. This patch
uses the bridge hooks introduced in [0], and hence will not compile without [0].

[0]: Dependency Patch: Introduce early_enable / late_disable drm bridge APIs
https://lore.kernel.org/all/20240511153051.1355825-7-a-bhatia1@ti.com/

---
 drivers/gpu/drm/tidss/Makefile      |   3 +-
 drivers/gpu/drm/tidss/tidss_dispc.c |  11 +-
 drivers/gpu/drm/tidss/tidss_dispc.h |   4 +
 drivers/gpu/drm/tidss/tidss_drv.c   |  13 +-
 drivers/gpu/drm/tidss/tidss_drv.h   |   4 +
 drivers/gpu/drm/tidss/tidss_oldi.c  | 568 ++++++++++++++++++++++++++++
 drivers/gpu/drm/tidss/tidss_oldi.h  |  73 ++++
 7 files changed, 673 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/tidss/tidss_oldi.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_oldi.h

diff --git a/drivers/gpu/drm/tidss/Makefile b/drivers/gpu/drm/tidss/Makefile
index 312645271014..b6d6becf1683 100644
--- a/drivers/gpu/drm/tidss/Makefile
+++ b/drivers/gpu/drm/tidss/Makefile
@@ -7,6 +7,7 @@ tidss-y := tidss_crtc.o \
 	tidss_irq.o \
 	tidss_plane.o \
 	tidss_scale_coefs.o \
-	tidss_dispc.o
+	tidss_dispc.o \
+	tidss_oldi.o
 
 obj-$(CONFIG_DRM_TIDSS) += tidss.o
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
index 1ad711f8d2a8..4961da3989c0 100644
--- a/drivers/gpu/drm/tidss/tidss_dispc.c
+++ b/drivers/gpu/drm/tidss/tidss_dispc.c
@@ -466,6 +466,16 @@ static u32 dispc_vp_read(struct dispc_device *dispc, u32 hw_videoport, u16 reg)
 	return ioread32(base + reg);
 }
 
+u32 tidss_get_status(struct tidss_device *tidss)
+{
+	return dispc_read(tidss->dispc, DSS_SYSSTATUS);
+}
+
+void tidss_configure_oldi(struct tidss_device *tidss, u32 hw_videoport, u32 val)
+{
+	return dispc_vp_write(tidss->dispc, hw_videoport, DISPC_VP_DSS_OLDI_CFG, val);
+}
+
 /*
  * TRM gives bitfields as start:end, where start is the higher bit
  * number. For example 7:0
@@ -1310,7 +1320,6 @@ void dispc_vp_disable_clk(struct dispc_device *dispc, u32 hw_videoport)
  * Calculate the percentage difference between the requested pixel clock rate
  * and the effective rate resulting from calculating the clock divider value.
  */
-static
 unsigned int dispc_pclk_diff(unsigned long rate, unsigned long real_rate)
 {
 	int r = rate / 100, rr = real_rate / 100;
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.h b/drivers/gpu/drm/tidss/tidss_dispc.h
index 086327d51a90..800a73457aff 100644
--- a/drivers/gpu/drm/tidss/tidss_dispc.h
+++ b/drivers/gpu/drm/tidss/tidss_dispc.h
@@ -94,6 +94,10 @@ extern const struct dispc_features dispc_am62a7_feats;
 extern const struct dispc_features dispc_am65x_feats;
 extern const struct dispc_features dispc_j721e_feats;
 
+u32 tidss_get_status(struct tidss_device *tidss);
+void tidss_configure_oldi(struct tidss_device *tidss, u32 hw_videoport, u32 val);
+unsigned int dispc_pclk_diff(unsigned long rate, unsigned long real_rate);
+
 void dispc_set_irqenable(struct dispc_device *dispc, dispc_irq_t mask);
 dispc_irq_t dispc_read_and_clear_irqstatus(struct dispc_device *dispc);
 
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index d15f836dca95..fd90e8498cc2 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -23,6 +23,7 @@
 #include "tidss_drv.h"
 #include "tidss_kms.h"
 #include "tidss_irq.h"
+#include "tidss_oldi.h"
 
 /* Power management */
 
@@ -140,10 +141,17 @@ static int tidss_probe(struct platform_device *pdev)
 
 	spin_lock_init(&tidss->wait_lock);
 
+	ret = tidss_oldi_init(tidss);
+	if (ret) {
+		if (ret != -EPROBE_DEFER)
+			dev_err(dev, "failed to init OLDI (%d)\n", ret);
+		return ret;
+	}
+
 	ret = dispc_init(tidss);
 	if (ret) {
 		dev_err(dev, "failed to initialize dispc: %d\n", ret);
-		return ret;
+		goto err_oldi_deinit;
 	}
 
 	pm_runtime_enable(dev);
@@ -202,6 +210,9 @@ static int tidss_probe(struct platform_device *pdev)
 	pm_runtime_dont_use_autosuspend(dev);
 	pm_runtime_disable(dev);
 
+err_oldi_deinit:
+	tidss_oldi_deinit(tidss);
+
 	return ret;
 }
 
diff --git a/drivers/gpu/drm/tidss/tidss_drv.h b/drivers/gpu/drm/tidss/tidss_drv.h
index d7f27b0b0315..4ccdc177d171 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.h
+++ b/drivers/gpu/drm/tidss/tidss_drv.h
@@ -11,6 +11,7 @@
 
 #define TIDSS_MAX_PORTS 4
 #define TIDSS_MAX_PLANES 4
+#define TIDSS_MAX_OLDI_TXES 2
 
 typedef u32 dispc_irq_t;
 
@@ -27,6 +28,9 @@ struct tidss_device {
 	unsigned int num_planes;
 	struct drm_plane *planes[TIDSS_MAX_PLANES];
 
+	unsigned int num_oldis;
+	struct tidss_oldi *oldis[TIDSS_MAX_OLDI_TXES];
+
 	unsigned int irq;
 
 	spinlock_t wait_lock;	/* protects the irq masks */
diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c b/drivers/gpu/drm/tidss/tidss_oldi.c
new file mode 100644
index 000000000000..fd96ca815542
--- /dev/null
+++ b/drivers/gpu/drm/tidss/tidss_oldi.c
@@ -0,0 +1,568 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2023 - Texas Instruments Incorporated
+ *
+ * Aradhya Bhatia <a-bhati1@ti.com>
+ */
+
+#include <linux/clk.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_graph.h>
+#include <linux/mfd/syscon.h>
+#include <linux/media-bus-format.h>
+#include <linux/regmap.h>
+
+#include <drm/drm_atomic_helper.h>
+#include <drm/drm_bridge.h>
+#include <drm/drm_panel.h>
+#include <drm/drm_of.h>
+#include <drm/drm_crtc.h>
+#include <drm/drm_probe_helper.h>
+
+#include "tidss_drv.h"
+#include "tidss_oldi.h"
+
+struct tidss_oldi {
+	struct tidss_device	*tidss;
+	struct device		*dev;
+
+	struct drm_bridge	bridge;
+	struct drm_bridge	*next_bridge;
+
+	struct drm_panel *panel;
+
+	enum tidss_oldi_link_type link_type;
+	const struct oldi_bus_format *bus_format;
+	u32 oldi_instance;
+	u32 parent_vp;
+
+	struct clk *s_clk;
+	struct regmap *io_ctrl;
+};
+
+static const struct oldi_bus_format oldi_bus_formats[] = {
+	{ MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,	18, SPWG_18,	MEDIA_BUS_FMT_RGB666_1X18 },
+	{ MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,	24, SPWG_24,	MEDIA_BUS_FMT_RGB888_1X24 },
+	{ MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,	24, JEIDA_24,	MEDIA_BUS_FMT_RGB888_1X24 },
+};
+
+static inline struct tidss_oldi *
+drm_bridge_to_tidss_oldi(struct drm_bridge *bridge)
+{
+	return container_of(bridge, struct tidss_oldi, bridge);
+}
+
+static int tidss_oldi_bridge_attach(struct drm_bridge *bridge,
+				    enum drm_bridge_attach_flags flags)
+{
+	struct tidss_oldi *oldi = drm_bridge_to_tidss_oldi(bridge);
+
+	if (!oldi->next_bridge) {
+		dev_err(oldi->dev,
+			"%s: OLDI%d Failure attach next bridge\n",
+			__func__, oldi->oldi_instance);
+		return -ENODEV;
+	}
+
+	if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) {
+		dev_err(oldi->dev,
+			"%s: OLDI%d DRM_BRIDGE_ATTACH_NO_CONNECTOR is mandatory.\n",
+			__func__, oldi->oldi_instance);
+		return -EINVAL;
+	}
+
+	return drm_bridge_attach(bridge->encoder, oldi->next_bridge,
+				 bridge, flags);
+}
+
+static int
+oldi_set_serial_clk(struct tidss_oldi *oldi, unsigned long rate)
+{
+	unsigned long new_rate;
+	int ret;
+
+	ret = clk_set_rate(oldi->s_clk, rate);
+	if (ret) {
+		dev_err(oldi->dev,
+			"OLDI%d: failed to set serial clk rate to %lu Hz\n",
+			 oldi->oldi_instance, rate);
+		return ret;
+	}
+
+	new_rate = clk_get_rate(oldi->s_clk);
+
+	if (dispc_pclk_diff(rate, new_rate) > 5)
+		dev_warn(oldi->dev,
+			 "OLDI%d Clock rate %lu differs over 5%% from requested %lu\n",
+			 oldi->oldi_instance, new_rate, rate);
+
+	dev_dbg(oldi->dev, "OLDI%d: new rate %lu Hz (requested %lu Hz)\n",
+		oldi->oldi_instance, clk_get_rate(oldi->s_clk), rate);
+
+	return 0;
+}
+
+static void tidss_oldi_tx_power(struct tidss_oldi *oldi, bool power)
+{
+	u32 val = 0, mask;
+
+	if (WARN_ON(!oldi->io_ctrl))
+		return;
+
+	/*
+	 * The power control bits are Active Low, and remain powered off by
+	 * default. That is, the bits are set to 1. To power on the OLDI TXes,
+	 * the bits must be cleared to 0. Since there are cases where not all
+	 * OLDI TXes are being used, the power logic selectively powers them
+	 * on.
+	 * Setting the variable 'val' to particular bit masks, makes sure that
+	 * the unrequired OLDI TXes remain powered off.
+	 */
+
+	if (power) {
+		val = 0;
+		switch (oldi->link_type) {
+		case OLDI_MODE_SINGLE_LINK:
+			if (oldi->oldi_instance == OLDI(0))
+				mask = OLDI_PWRDN_TX(0) | OLDI_PWRDN_BG;
+			else if (oldi->oldi_instance == OLDI(1))
+				mask = OLDI_PWRDN_TX(1) | OLDI_PWRDN_BG;
+
+			break;
+		case OLDI_MODE_CLONE_SINGLE_LINK:
+		case OLDI_MODE_DUAL_LINK:
+			mask = OLDI_PWRDN_TX(0) | OLDI_PWRDN_TX(1) | OLDI_PWRDN_BG;
+			break;
+		default:
+			if (oldi->oldi_instance == OLDI(0))
+				mask = OLDI_PWRDN_TX(0);
+			else if (oldi->oldi_instance == OLDI(1))
+				mask = OLDI_PWRDN_TX(1);
+
+			val = mask;
+			break;
+		}
+	} else {
+		switch (oldi->link_type) {
+		case OLDI_MODE_CLONE_SINGLE_LINK:
+		case OLDI_MODE_DUAL_LINK:
+			mask = OLDI_PWRDN_TX(0) | OLDI_PWRDN_TX(1) | OLDI_PWRDN_BG;
+			break;
+		case OLDI_MODE_SINGLE_LINK:
+		default:
+			if (oldi->oldi_instance == OLDI(0))
+				mask = OLDI_PWRDN_TX(0);
+			else if (oldi->oldi_instance == OLDI(1))
+				mask = OLDI_PWRDN_TX(1);
+
+			break;
+		}
+		val = mask;
+	}
+
+	regmap_update_bits(oldi->io_ctrl, OLDI_PD_CTRL, mask, val);
+}
+
+static int tidss_oldi_config(struct tidss_oldi *oldi)
+{
+	const struct oldi_bus_format *bus_fmt = NULL;
+	u32 oldi_reset_bit = BIT(5);
+	int count = 0;
+	u32 oldi_cfg = 0;
+
+	bus_fmt = oldi->bus_format;
+
+	/*
+	 * MASTERSLAVE and SRC bits of OLDI Config are always set to 0.
+	 */
+
+	if (bus_fmt->data_width == 24)
+		oldi_cfg |= OLDI_MSB;
+	else if (bus_fmt->data_width != 18)
+		dev_warn(oldi->dev,
+			 "OLDI%d: DSS port width %d not supported\n",
+			 oldi->oldi_instance, bus_fmt->data_width);
+
+	oldi_cfg |= OLDI_DEPOL;
+
+	oldi_cfg = (oldi_cfg & (~OLDI_MAP)) | (bus_fmt->oldi_mode_reg_val << 1);
+
+	oldi_cfg |= OLDI_SOFTRST;
+
+	oldi_cfg |= OLDI_ENABLE;
+
+	switch (oldi->link_type) {
+	case OLDI_MODE_SINGLE_LINK:
+		/* All configuration is done for this mode.  */
+		break;
+
+	case OLDI_MODE_CLONE_SINGLE_LINK:
+		oldi_cfg |= OLDI_CLONE_MODE;
+		break;
+
+	case OLDI_MODE_DUAL_LINK:
+		/* data-mapping field also indicates dual-link mode */
+		oldi_cfg |= BIT(3);
+		oldi_cfg |= OLDI_DUALMODESYNC;
+		break;
+
+	default:
+		dev_err(oldi->dev, "OLDI%d: Unsupported mode.\n",
+			oldi->oldi_instance);
+		return -EINVAL;
+	}
+
+	tidss_configure_oldi(oldi->tidss, oldi->parent_vp, oldi_cfg);
+	while (!(oldi_reset_bit & tidss_get_status(oldi->tidss)) &&
+	       count < 10000)
+		count++;
+
+	if (!(oldi_reset_bit & tidss_get_status(oldi->tidss)))
+		dev_warn(oldi->dev, "%s: OLDI%d timeout waiting OLDI reset done\n",
+			 __func__, oldi->oldi_instance);
+
+	return 0;
+}
+
+static void tidss_oldi_atomic_early_enable(struct drm_bridge *bridge,
+					   struct drm_bridge_state *old_bridge_state)
+{
+	struct tidss_oldi *oldi = drm_bridge_to_tidss_oldi(bridge);
+	struct drm_atomic_state *state = old_bridge_state->base.state;
+	struct drm_connector *connector;
+	struct drm_connector_state *conn_state;
+	struct drm_crtc_state *crtc_state;
+	struct drm_display_mode *mode;
+
+	connector = drm_atomic_get_new_connector_for_encoder(state,
+							     bridge->encoder);
+	if (WARN_ON(!connector))
+		return;
+
+	conn_state = drm_atomic_get_new_connector_state(state, connector);
+	if (WARN_ON(!conn_state))
+		return;
+
+	crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
+	if (WARN_ON(!crtc_state))
+		return;
+
+	mode = &crtc_state->adjusted_mode;
+
+	/* Configure the OLDI params*/
+	tidss_oldi_config(oldi);
+
+	/* Enable the OLDI serial clock (7 times the pixel clock) */
+	oldi_set_serial_clk(oldi, mode->clock * 7 * 1000);
+
+	/* Enable OLDI IO power */
+	tidss_oldi_tx_power(oldi, true);
+}
+
+static void tidss_oldi_atomic_late_disable(struct drm_bridge *bridge,
+					   struct drm_bridge_state *old_bridge_state)
+{
+	struct tidss_oldi *oldi = drm_bridge_to_tidss_oldi(bridge);
+
+	/* Disable OLDI IO power */
+	tidss_oldi_tx_power(oldi, false);
+
+	/* Disable OLDI clock by setting IDLE Frequency */
+	oldi_set_serial_clk(oldi, OLDI_IDLE_CLK_HZ);
+
+	/* Clear OLDI Config */
+	tidss_configure_oldi(oldi->tidss, oldi->parent_vp, 0);
+}
+
+#define MAX_INPUT_SEL_FORMATS	1
+
+static u32 *tidss_oldi_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
+						 struct drm_bridge_state *bridge_state,
+						 struct drm_crtc_state *crtc_state,
+						 struct drm_connector_state *conn_state,
+						 u32 output_fmt,
+						 unsigned int *num_input_fmts)
+{
+	struct tidss_oldi *oldi = drm_bridge_to_tidss_oldi(bridge);
+	u32 *input_fmts;
+	int i;
+
+	*num_input_fmts = 0;
+
+	for (i = 0; i < ARRAY_SIZE(oldi_bus_formats); i++)
+		if (oldi_bus_formats[i].bus_fmt == output_fmt)
+			break;
+
+	if (i == ARRAY_SIZE(oldi_bus_formats))
+		return NULL;
+
+	input_fmts = kcalloc(MAX_INPUT_SEL_FORMATS, sizeof(*input_fmts),
+			     GFP_KERNEL);
+	if (!input_fmts)
+		return NULL;
+
+	*num_input_fmts = 1;
+	input_fmts[0] = oldi_bus_formats[i].input_bus_fmt;
+	oldi->bus_format = &oldi_bus_formats[i];
+
+	return input_fmts;
+}
+
+static int tidss_oldi_atomic_check(struct drm_bridge *bridge,
+				   struct drm_bridge_state *bridge_state,
+				   struct drm_crtc_state *crtc_state,
+				   struct drm_connector_state *conn_state)
+{
+	/*
+	 * There might be flags negotiation supported in future but
+	 * set the bus flags in atomic_check statically for now.
+	 */
+
+	/* Not sure what this is required for, at the moment */
+	bridge_state->input_bus_cfg.flags = bridge->timings->input_bus_flags;
+
+	return 0;
+}
+
+static const struct drm_bridge_funcs tidss_oldi_bridge_funcs = {
+	.attach		= tidss_oldi_bridge_attach,
+	.atomic_check	= tidss_oldi_atomic_check,
+	.atomic_early_enable = tidss_oldi_atomic_early_enable,
+	.atomic_late_disable = tidss_oldi_atomic_late_disable,
+	.atomic_get_input_bus_fmts = tidss_oldi_atomic_get_input_bus_fmts,
+	.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
+	.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
+	.atomic_reset = drm_atomic_helper_bridge_reset,
+};
+
+static int get_oldi_mode(struct device_node *oldi_tx)
+{
+	struct device_node *companion;
+	struct device_node *port0, *port1;
+	int pixel_order;
+
+	/*
+	 * Find if the OLDI is paired with another OLDI for combined OLDI
+	 * operation (dual-lvds or clone).
+	 */
+	companion = of_parse_phandle(oldi_tx, "ti,companion-oldi", 0);
+	if (!companion) {
+		if (of_property_read_bool(oldi_tx, "ti,secondary-oldi"))
+			return OLDI_MODE_SECONDARY;
+
+		/*
+		 * The OLDI TX does not have a companion, nor is it a
+		 * secondary OLDI. It will operate independently.
+		 */
+		return OLDI_MODE_SINGLE_LINK;
+	}
+
+	/*
+	 * We need to work out if the sink is expecting us to function in
+	 * dual-link mode. We do this by looking at the DT port nodes we are
+	 * connected to, if they are marked as expecting even pixels and
+	 * odd pixels than we need to enable vertical stripe output.
+	 */
+	port0 = of_graph_get_port_by_id(oldi_tx, 1);
+	port1 = of_graph_get_port_by_id(companion, 1);
+	pixel_order = drm_of_lvds_get_dual_link_pixel_order(port0, port1);
+	of_node_put(port0);
+	of_node_put(port1);
+	of_node_put(companion);
+
+	switch (pixel_order) {
+	case -EINVAL:
+		/*
+		 * The dual link properties were not found in at least
+		 * one of the sink nodes. Since 2 OLDI ports are present
+		 * in the DT, it can be safely assumed that the required
+		 * configuration is Clone Mode.
+		 */
+		return OLDI_MODE_CLONE_SINGLE_LINK;
+
+	case DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS:
+		return OLDI_MODE_DUAL_LINK;
+
+	/* Unsupported OLDI Modes */
+	case DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS:
+	default:
+		return OLDI_MODE_UNSUPPORTED;
+	}
+}
+
+static u32 get_parent_dss_vp(struct device_node *oldi_tx, u32 *parent_vp)
+{
+	struct device_node *ep, *dss_port;
+	int ret = 0;
+
+	ep = of_graph_get_endpoint_by_regs(oldi_tx, OLDI_INPUT_PORT, -1);
+	if (ep) {
+		dss_port = of_graph_get_remote_port(ep);
+		if (!dss_port) {
+			ret = -ENODEV;
+			goto err_return_ep_port;
+		}
+
+		ret = of_property_read_u32(dss_port, "reg", parent_vp);
+
+		of_node_put(dss_port);
+err_return_ep_port:
+		of_node_put(ep);
+		return ret;
+	}
+
+	return -ENODEV;
+}
+
+static const struct drm_bridge_timings default_tidss_oldi_timings = {
+	.input_bus_flags = DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE
+			 | DRM_BUS_FLAG_DE_HIGH,
+};
+
+void tidss_oldi_deinit(struct tidss_device *tidss)
+{
+	for (int i = 0; i < tidss->num_oldis; i++) {
+		if (tidss->oldis[i]) {
+			drm_bridge_remove(&tidss->oldis[i]->bridge);
+			tidss->oldis[i] = NULL;
+		}
+	}
+}
+
+int tidss_oldi_init(struct tidss_device *tidss)
+{
+	struct tidss_oldi *oldi;
+	struct device_node *child;
+	struct drm_bridge *bridge;
+	struct drm_panel *panel;
+	u32 parent_vp, oldi_instance;
+	enum tidss_oldi_link_type link_type = OLDI_MODE_UNSUPPORTED;
+	struct device_node *oldi_parent;
+	int ret = 0;
+
+	tidss->num_oldis = 0;
+
+	oldi_parent = of_get_child_by_name(tidss->dev->of_node, "oldi-txes");
+	if (!oldi_parent)
+		/* Return gracefully */
+		return 0;
+
+	for_each_child_of_node(oldi_parent, child) {
+		ret = get_parent_dss_vp(child, &parent_vp);
+		if (ret) {
+			if (ret == -ENODEV) {
+				/*
+				 * ENODEV means that this particular OLDI node
+				 * is not connected with the DSS, which is not
+				 * a harmful case. There could be another OLDI
+				 * which may still be connected.
+				 * Continue to search for that.
+				 */
+				ret = 0;
+				continue;
+			}
+			goto err_put_node;
+		}
+
+		ret = of_property_read_u32(child, "reg", &oldi_instance);
+		if (ret)
+			goto err_put_node;
+
+		/*
+		 * Now that its confirmed that OLDI is connected with DSS, let's
+		 * continue getting the OLDI sinks ahead and other OLDI
+		 * properties.
+		 */
+		ret = drm_of_find_panel_or_bridge(child, OLDI_OURPUT_PORT, -1,
+						  &panel, &bridge);
+		if (ret) {
+			/*
+			 * Either there was no OLDI sink in the devicetree, or
+			 * the OLDI sink has not been added yet. In any case,
+			 * return.
+			 * We don't want to have an OLDI node connected to DSS
+			 * but not to any sink.
+			 */
+			if (ret != -EPROBE_DEFER)
+				dev_err(tidss->dev,
+					"no panel/bridge for OLDI%d. Error %d\n",
+					oldi_instance, ret);
+			goto err_put_node;
+		}
+
+		if (panel) {
+			bridge = devm_drm_panel_bridge_add(tidss->dev, panel);
+			if (IS_ERR(bridge)) {
+				ret = PTR_ERR(bridge);
+				goto err_put_node;
+			}
+		}
+
+		link_type = get_oldi_mode(child);
+		if (link_type == OLDI_MODE_UNSUPPORTED) {
+			dev_err(tidss->dev,
+				"OLDI%d: Unsupported OLDI connection.\n",
+				oldi_instance);
+			ret = -EINVAL;
+			goto err_put_node;
+		} else if (link_type == OLDI_MODE_SECONDARY) {
+			/*
+			 * This is the secondary OLDI node, which serves as a
+			 * companinon to the primary OLDI, when it is configured
+			 * for the dual-lvds mode. Since the primary OLDI will
+			 * be a part of bridge chain, no need to put this one
+			 * too. Continue onto the next OLDI node.
+			 */
+			continue;
+		}
+
+		oldi = devm_kzalloc(tidss->dev, sizeof(*oldi), GFP_KERNEL);
+		if (!oldi) {
+			ret = -ENOMEM;
+			goto err_put_node;
+		}
+
+		oldi->link_type = link_type;
+		oldi->oldi_instance = oldi_instance;
+		oldi->dev = tidss->dev;
+		oldi->next_bridge = bridge;
+		oldi->panel = panel;
+
+		oldi->io_ctrl = syscon_regmap_lookup_by_phandle(child,
+								"ti,oldi-io-ctrl");
+		if (IS_ERR(oldi->io_ctrl)) {
+			dev_err(oldi->dev,
+				"%s: oldi%d syscon_regmap_lookup_by_phandle failed %ld\n",
+			       __func__, oldi_instance, PTR_ERR(oldi->io_ctrl));
+			ret = PTR_ERR(oldi->io_ctrl);
+			goto err_put_node;
+		}
+
+		oldi->s_clk = of_clk_get_by_name(child, "s_clk");
+		if (IS_ERR(oldi->s_clk)) {
+			dev_err(oldi->dev,
+				"%s: oldi%d Failed to get s_clk: %ld\n",
+				__func__, oldi_instance, PTR_ERR(oldi->s_clk));
+			ret = PTR_ERR(oldi->s_clk);
+			goto err_put_node;
+		}
+
+		/* Register the bridge. */
+		oldi->bridge.of_node = child;
+		oldi->bridge.driver_private = oldi;
+		oldi->bridge.funcs = &tidss_oldi_bridge_funcs;
+		oldi->bridge.timings = &default_tidss_oldi_timings;
+
+		tidss->oldis[tidss->num_oldis++] = oldi;
+		oldi->tidss = tidss;
+
+		drm_bridge_add(&oldi->bridge);
+	}
+
+err_put_node:
+	of_node_put(child);
+	of_node_put(oldi_parent);
+	return ret;
+}
diff --git a/drivers/gpu/drm/tidss/tidss_oldi.h b/drivers/gpu/drm/tidss/tidss_oldi.h
new file mode 100644
index 000000000000..5ad02ddea11a
--- /dev/null
+++ b/drivers/gpu/drm/tidss/tidss_oldi.h
@@ -0,0 +1,73 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2023 - Texas Instruments Incorporated
+ *
+ * Aradhya Bhatia <a-bhati1@ti.com>
+ */
+
+#ifndef __TIDSS_OLDI_H__
+#define __TIDSS_OLDI_H__
+
+#include <linux/media-bus-format.h>
+
+#include "tidss_drv.h"
+#include "tidss_dispc.h"
+
+struct tidss_oldi;
+
+/* OLDI Instances */
+#define OLDI(n)		n
+
+/* OLDI PORTS */
+#define OLDI_INPUT_PORT		0
+#define OLDI_OURPUT_PORT	1
+
+/* OLDI Config Bits */
+#define OLDI_ENABLE		BIT(0)
+#define OLDI_MAP		(BIT(1) | BIT(2) | BIT(3))
+#define OLDI_SRC		BIT(4)
+#define OLDI_CLONE_MODE		BIT(5)
+#define OLDI_MASTERSLAVE	BIT(6)
+#define OLDI_DEPOL		BIT(7)
+#define OLDI_MSB		BIT(8)
+#define OLDI_LBEN		BIT(9)
+#define OLDI_LBDATA		BIT(10)
+#define OLDI_DUALMODESYNC	BIT(11)
+#define OLDI_SOFTRST		BIT(12)
+#define OLDI_TPATCFG		BIT(13)
+
+/* Control MMR Register */
+
+/* Register offsets */
+#define OLDI_PD_CTRL            0x100
+#define OLDI_LB_CTRL            0x104
+
+/* Power control bits */
+#define OLDI_PWRDN_TX(n)	BIT(n)
+
+/* LVDS Bandgap reference Enable/Disable */
+#define OLDI_PWRDN_BG		BIT(8)
+
+#define OLDI_IDLE_CLK_HZ	25000000 /*25 MHz */
+
+enum tidss_oldi_link_type {
+	OLDI_MODE_UNSUPPORTED,
+	OLDI_MODE_SINGLE_LINK,
+	OLDI_MODE_CLONE_SINGLE_LINK,
+	OLDI_MODE_DUAL_LINK,
+	OLDI_MODE_SECONDARY,
+};
+
+enum oldi_mode_reg_val { SPWG_18 = 0, JEIDA_24 = 1, SPWG_24 = 2 };
+
+struct oldi_bus_format {
+	u32 bus_fmt;
+	u32 data_width;
+	enum oldi_mode_reg_val oldi_mode_reg_val;
+	u32 input_bus_fmt;
+};
+
+int tidss_oldi_init(struct tidss_device *tidss);
+void tidss_oldi_deinit(struct tidss_device *tidss);
+
+#endif /* __TIDSS_OLDI_H__ */
-- 
2.34.1


^ permalink raw reply related	[relevance 11%]

* [PATCH 1/4] dt-bindings: display: ti,am65x-dss: Minor Cleanup
  2024-05-11 19:30 14% [PATCH 0/4] drm/tidss: Add OLDI bridge support Aradhya Bhatia
@ 2024-05-11 19:30 15% ` Aradhya Bhatia
  2024-05-11 19:30 16% ` [PATCH 2/4] dt-bindings: display: ti: Add schema for AM625 OLDI Transmitter Aradhya Bhatia
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 200+ results
From: Aradhya Bhatia @ 2024-05-11 19:30 UTC (permalink / raw)
  To: Tomi Valkeinen, Jyri Sarha, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Neil Armstrong, Laurent Pinchart,
	David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: DRI Development List, Devicetree List, Linux Kernel List,
	Nishanth Menon, Vignesh Raghavendra, Praneeth Bajjuri,
	Udit Kumar, Francesco Dolcini, Alexander Sverdlin, Randolph Sapp,
	Devarsh Thakkar, Jayesh Choudhary, Jai Luthra, Aradhya Bhatia

Reduce tab size from 8 spaces to 4 spaces to make the bindings
consistent, and easy to expand.

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
---
 .../bindings/display/ti/ti,am65x-dss.yaml     | 54 +++++++++----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
index 55e3e490d0e6..399d68986326 100644
--- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
+++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
@@ -142,32 +142,32 @@ examples:
     #include <dt-bindings/soc/ti,sci_pm_domain.h>
 
     dss: dss@4a00000 {
-            compatible = "ti,am65x-dss";
-            reg =   <0x04a00000 0x1000>, /* common */
-                    <0x04a02000 0x1000>, /* vidl1 */
-                    <0x04a06000 0x1000>, /* vid */
-                    <0x04a07000 0x1000>, /* ovr1 */
-                    <0x04a08000 0x1000>, /* ovr2 */
-                    <0x04a0a000 0x1000>, /* vp1 */
-                    <0x04a0b000 0x1000>, /* vp2 */
-                    <0x04a01000 0x1000>; /* common1 */
-            reg-names = "common", "vidl1", "vid",
-                    "ovr1", "ovr2", "vp1", "vp2", "common1";
-            ti,am65x-oldi-io-ctrl = <&dss_oldi_io_ctrl>;
-            power-domains = <&k3_pds 67 TI_SCI_PD_EXCLUSIVE>;
-            clocks =        <&k3_clks 67 1>,
-                            <&k3_clks 216 1>,
-                            <&k3_clks 67 2>;
-            clock-names = "fck", "vp1", "vp2";
-            interrupts = <GIC_SPI 166 IRQ_TYPE_EDGE_RISING>;
-            ports {
-                    #address-cells = <1>;
-                    #size-cells = <0>;
-                    port@0 {
-                            reg = <0>;
-                            oldi_out0: endpoint {
-                                    remote-endpoint = <&lcd_in0>;
-                            };
-                    };
+        compatible = "ti,am65x-dss";
+        reg = <0x04a00000 0x1000>, /* common */
+              <0x04a02000 0x1000>, /* vidl1 */
+              <0x04a06000 0x1000>, /* vid */
+              <0x04a07000 0x1000>, /* ovr1 */
+              <0x04a08000 0x1000>, /* ovr2 */
+              <0x04a0a000 0x1000>, /* vp1 */
+              <0x04a0b000 0x1000>, /* vp2 */
+              <0x04a01000 0x1000>; /* common1 */
+        reg-names = "common", "vidl1", "vid",
+                "ovr1", "ovr2", "vp1", "vp2", "common1";
+        ti,am65x-oldi-io-ctrl = <&dss_oldi_io_ctrl>;
+        power-domains = <&k3_pds 67 TI_SCI_PD_EXCLUSIVE>;
+        clocks =        <&k3_clks 67 1>,
+                        <&k3_clks 216 1>,
+                        <&k3_clks 67 2>;
+        clock-names = "fck", "vp1", "vp2";
+        interrupts = <GIC_SPI 166 IRQ_TYPE_EDGE_RISING>;
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+            port@0 {
+                reg = <0>;
+                oldi_out0: endpoint {
+                    remote-endpoint = <&lcd_in0>;
+                };
             };
+        };
     };
-- 
2.34.1


^ permalink raw reply related	[relevance 15%]

* [PATCH 0/4] drm/tidss: Add OLDI bridge support
@ 2024-05-11 19:30 14% Aradhya Bhatia
  2024-05-11 19:30 15% ` [PATCH 1/4] dt-bindings: display: ti,am65x-dss: Minor Cleanup Aradhya Bhatia
                   ` (3 more replies)
  0 siblings, 4 replies; 200+ results
From: Aradhya Bhatia @ 2024-05-11 19:30 UTC (permalink / raw)
  To: Tomi Valkeinen, Jyri Sarha, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Neil Armstrong, Laurent Pinchart,
	David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: DRI Development List, Devicetree List, Linux Kernel List,
	Nishanth Menon, Vignesh Raghavendra, Praneeth Bajjuri,
	Udit Kumar, Francesco Dolcini, Alexander Sverdlin, Randolph Sapp,
	Devarsh Thakkar, Jayesh Choudhary, Jai Luthra, Aradhya Bhatia

Hello all,

This patch series add support for the dual OLDI TXes supported in Texas
Instruments' AM62x and AM62Px family of SoCs. The OLDI TXes support single-lvds,
lvds-clone, and dual-lvds modes. These have now been represented through DRM
bridges within TI-DSS.

The OLDI configuration should happen before the video-port configuration takes
place in tidss_crtc_atomic_enable hook. I have posted a patch allowing DRM
bridges to get enabled before the CRTC of that bridge is enabled[0]. The patch
4/4 of this series uses the bridge hooks introduced in [0], and hence will not
compile without [0].

This patch series is a complete re-vamp from the previously posted series[1] and
hence, the version index has been reset to v1. The OLDI support from that series
was dropped and only the base support for AM625 DSS was kept (and eventually
merged)[2].

These patches have been tested on AM625 based platforms, SK-AM625 EVM with a
Microptis dual-lvds panel (SK-LCD1), and Beagleplay with a Lincolntech dual-lvds
panel (LCD-185T). The patches with complete support including the expected
devicetree configuration of the OLDI TXes can be found in the
"next_oldi_finals-v1-tests" branch of my github fork[3].

Thanks,
Aradhya

[0]: Dependency Patch: Introduce early_enable / late_disable drm bridge APIs
https://lore.kernel.org/all/20240511153051.1355825-7-a-bhatia1@ti.com/

[1]: AM62 OLDI Series - v7
https://lore.kernel.org/all/20230125113529.13952-1-a-bhatia1@ti.com/

[2]: AM62 DSS Series - v9
https://lore.kernel.org/all/20230616150900.6617-1-a-bhatia1@ti.com/

[3]: GitHub Fork for OLDI tests
https://github.com/aradhya07/linux-ab/tree/next_oldi_finals-v1-tests


Aradhya Bhatia (4):
  dt-bindings: display: ti,am65x-dss: Minor Cleanup
  dt-bindings: display: ti: Add schema for AM625 OLDI Transmitter
  dt-bindings: display: ti,am65x-dss: Add OLDI properties for AM625 DSS
  drm/tidss: Add OLDI bridge support

 .../bindings/display/ti/ti,am625-oldi.yaml    | 153 +++++
 .../bindings/display/ti/ti,am65x-dss.yaml     | 178 +++++-
 MAINTAINERS                                   |   1 +
 drivers/gpu/drm/tidss/Makefile                |   3 +-
 drivers/gpu/drm/tidss/tidss_dispc.c           |  11 +-
 drivers/gpu/drm/tidss/tidss_dispc.h           |   4 +
 drivers/gpu/drm/tidss/tidss_drv.c             |  13 +-
 drivers/gpu/drm/tidss/tidss_drv.h             |   4 +
 drivers/gpu/drm/tidss/tidss_oldi.c            | 568 ++++++++++++++++++
 drivers/gpu/drm/tidss/tidss_oldi.h            |  73 +++
 10 files changed, 983 insertions(+), 25 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml
 create mode 100644 drivers/gpu/drm/tidss/tidss_oldi.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_oldi.h


base-commit: 75fa778d74b786a1608d55d655d42b480a6fa8bd
-- 
2.34.1


^ permalink raw reply	[relevance 14%]

* [PATCH 2/4] dt-bindings: display: ti: Add schema for AM625 OLDI Transmitter
  2024-05-11 19:30 14% [PATCH 0/4] drm/tidss: Add OLDI bridge support Aradhya Bhatia
  2024-05-11 19:30 15% ` [PATCH 1/4] dt-bindings: display: ti,am65x-dss: Minor Cleanup Aradhya Bhatia
@ 2024-05-11 19:30 16% ` Aradhya Bhatia
  2024-05-11 19:30 14%   ` [PATCH 3/4] dt-bindings: display: ti, am65x-dss: " Aradhya Bhatia
  2024-05-11 19:30 11% ` [PATCH 4/4] drm/tidss: Add OLDI bridge support Aradhya Bhatia
  3 siblings, 0 replies; 200+ results
From: Aradhya Bhatia @ 2024-05-11 19:30 UTC (permalink / raw)
  To: Tomi Valkeinen, Jyri Sarha, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Neil Armstrong, Laurent Pinchart,
	David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: DRI Development List, Devicetree List, Linux Kernel List,
	Nishanth Menon, Vignesh Raghavendra, Praneeth Bajjuri,
	Udit Kumar, Francesco Dolcini, Alexander Sverdlin, Randolph Sapp,
	Devarsh Thakkar, Jayesh Choudhary, Jai Luthra, Aradhya Bhatia

Add devicetree binding schema for AM625 OLDI Transmitters.

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
---
 .../bindings/display/ti/ti,am625-oldi.yaml    | 153 ++++++++++++++++++
 MAINTAINERS                                   |   1 +
 2 files changed, 154 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml

diff --git a/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml b/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml
new file mode 100644
index 000000000000..0a96e600bc0b
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml
@@ -0,0 +1,153 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/ti/ti,am625-oldi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments AM625 OLDI Transmitter
+
+maintainers:
+  - Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
+  - Aradhya Bhatia <a-bhatia1@ti.com>
+
+description: |
+  The AM625 TI Keystone OpenLDI transmitter (OLDI TX) supports serialized RGB
+  pixel data transmission between host and flat panel display over LVDS (Low
+  Voltage Differential Sampling) interface. The OLDI TX consists of 7-to-1 data
+  serializers, and 4-data and 1-clock LVDS outputs. It supports the LVDS output
+  formats "jeida-18", "jeida-24" and "vesa-18", and can accept 24-bit RGB or
+  padded and un-padded 18-bit RGB bus formats as input.
+
+properties:
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+    description: serial clock input for the OLDI transmitters
+
+  clock-names:
+    const: s_clk
+
+  ti,companion-oldi:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to companion OLDI transmitter. This property is mandatory for the
+      primarty OLDI TX if the OLDI TXes are expected to work either in dual-lvds
+      mode or in clone mode. This property should point to the secondary OLDI
+      TX.
+
+  ti,secondary-oldi:
+    type: boolean
+    description: Boolean property to mark an OLDI TX as secondary node.
+
+  ti,oldi-io-ctrl:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to syscon device node mapping OLDI IO_CTRL registers found in the
+      control MMR region. This property is needed for OLDI interface to work.
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: Parallel RGB input port
+
+      port@1:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: LVDS output port
+
+    required:
+      - port@0
+      - port@1
+
+allOf:
+  - if:
+      properties:
+        ti,secondary-oldi: true
+    then:
+      properties:
+        ti,companion-oldi: false
+        ti,oldi-io-ctrl: false
+        clocks: false
+        clock-names: false
+
+    else:
+      required:
+        - ti,oldi-io-ctrl
+        - clocks
+        - clock-names
+
+required:
+  - reg
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+    oldi_txes {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        oldi: oldi@0 {
+            reg = <0>;
+            clocks = <&k3_clks 186 0>;
+            clock-names = "s_clk";
+            ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                port@0 {
+                    reg = <0>;
+                    oldi_in: endpoint {
+                        remote-endpoint = <&dpi0_out>;
+                    };
+                };
+            };
+        };
+    };
+
+  - |
+    #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+    oldi_txes {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        oldi0: oldi@0 {
+            reg = <0>;
+            clocks = <&k3_clks 186 0>;
+            clock-names = "s_clk";
+            ti,companion-oldi = <&oldi1>;
+            ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                port@0 {
+                    reg = <0>;
+                    oldi0_in: endpoint {
+                        remote-endpoint = <&dpi0_out0>;
+                    };
+                };
+            };
+        };
+        oldi1: oldi@1 {
+            reg = <1>;
+            ti,secondary-oldi;
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                port@0 {
+                    reg = <0>;
+                    oldi1_in: endpoint {
+                        remote-endpoint = <&dpi0_out1>;
+                    };
+                };
+            };
+        };
+    };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index c675fc296b19..4426c4d41a7f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7480,6 +7480,7 @@ M:	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
 L:	dri-devel@lists.freedesktop.org
 S:	Maintained
 T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
+F:	Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml
 F:	Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
 F:	Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
 F:	Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
-- 
2.34.1


^ permalink raw reply related	[relevance 16%]

* [PATCH 3/4] dt-bindings: display: ti,am65x-dss: Add OLDI properties for AM625 DSS
  2024-05-11 19:30 14% [PATCH 0/4] drm/tidss: Add OLDI bridge support Aradhya Bhatia
@ 2024-05-11 19:30 14%   ` Aradhya Bhatia
  2024-05-11 19:30 16% ` [PATCH 2/4] dt-bindings: display: ti: Add schema for AM625 OLDI Transmitter Aradhya Bhatia
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 200+ results
From: Aradhya Bhatia @ 2024-05-11 19:30 UTC (permalink / raw)
  To: Tomi Valkeinen, Jyri Sarha, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Neil Armstrong, Laurent Pinchart,
	David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: DRI Development List, Devicetree List, Linux Kernel List,
	Nishanth Menon, Vignesh Raghavendra, Praneeth Bajjuri,
	Udit Kumar, Francesco Dolcini, Alexander Sverdlin, Randolph Sapp,
	Devarsh Thakkar, Jayesh Choudhary, Jai Luthra, Aradhya Bhatia

The DSS in AM625 SoC has 2 OLDI TXes. Refer the OLDI schema to add the
properties.

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
---
 .../bindings/display/ti/ti,am65x-dss.yaml     | 136 +++++++++++++++++-
 1 file changed, 135 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
index 399d68986326..4aa2de59b32b 100644
--- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
+++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
@@ -85,12 +85,30 @@ properties:
 
     properties:
       port@0:
-        $ref: /schemas/graph.yaml#/properties/port
+        $ref: /schemas/graph.yaml#/$defs/port-base
         description:
           For AM65x DSS, the OLDI output port node from video port 1.
           For AM625 DSS, the internal DPI output port node from video
           port 1.
           For AM62A7 DSS, the port is tied off inside the SoC.
+        properties:
+          endpoint@0:
+            $ref: /schemas/graph.yaml#/properties/endpoint
+            description:
+              For AM625 DSS, VP Connection to OLDI0.
+              For AM65X DSS, OLDI output from the SoC.
+
+          endpoint@1:
+            $ref: /schemas/graph.yaml#/properties/endpoint
+            description:
+              For AM625 DSS, VP Connection to OLDI1.
+
+        anyOf:
+          - required:
+              - endpoint
+          - required:
+              - endpoint@0
+              - endpoint@1
 
       port@1:
         $ref: /schemas/graph.yaml#/properties/port
@@ -112,6 +130,22 @@ properties:
       Input memory (from main memory to dispc) bandwidth limit in
       bytes per second
 
+  oldi-txes:
+    type: object
+    properties:
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 0
+
+    patternProperties:
+      '^oldi_tx@[0-1]$':
+        type: object
+        $ref: ti,am625-oldi.yaml#
+        unevaluatedProperties: false
+        description: OLDI transmitters connected to the DSS VPs
+
 allOf:
   - if:
       properties:
@@ -123,6 +157,19 @@ allOf:
         ports:
           properties:
             port@0: false
+            oldi_txes: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ti,am65x-dss
+    then:
+      properties:
+        oldi_txes: false
+        port@0:
+          properties:
+            endpoint@1: false
 
 required:
   - compatible
@@ -171,3 +218,90 @@ examples:
             };
         };
     };
+
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+    bus {
+        #address-cells = <2>;
+        #size-cells = <2>;
+        dss1: dss@30200000 {
+            compatible = "ti,am625-dss";
+            reg = <0x00 0x30200000 0x00 0x1000>, /* common */
+                  <0x00 0x30202000 0x00 0x1000>, /* vidl1 */
+                  <0x00 0x30206000 0x00 0x1000>, /* vid */
+                  <0x00 0x30207000 0x00 0x1000>, /* ovr1 */
+                  <0x00 0x30208000 0x00 0x1000>, /* ovr2 */
+                  <0x00 0x3020a000 0x00 0x1000>, /* vp1 */
+                  <0x00 0x3020b000 0x00 0x1000>, /* vp2 */
+                  <0x00 0x30201000 0x00 0x1000>; /* common1 */
+            reg-names = "common", "vidl1", "vid",
+                        "ovr1", "ovr2", "vp1", "vp2", "common1";
+            power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>;
+            clocks =        <&k3_clks 186 6>,
+                            <&vp1_clock>,
+                            <&k3_clks 186 2>;
+            clock-names = "fck", "vp1", "vp2";
+            interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+            oldi-txes {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                oldi0: oldi@0 {
+                    reg = <0>;
+                    clocks = <&k3_clks 186 0>;
+                    clock-names = "s_clk";
+                    ti,companion-oldi = <&oldi1>;
+                    ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
+                    ports {
+                        #address-cells = <1>;
+                        #size-cells = <0>;
+                        port@0 {
+                            reg = <0>;
+                            oldi0_in: endpoint {
+                                remote-endpoint = <&dpi0_out0>;
+                            };
+                        };
+                    };
+                };
+                oldi1: oldi@1 {
+                    reg = <1>;
+                    ti,secondary-oldi;
+                    ports {
+                        #address-cells = <1>;
+                        #size-cells = <0>;
+                        port@0 {
+                            reg = <0>;
+                            oldi1_in: endpoint {
+                                remote-endpoint = <&dpi0_out1>;
+                            };
+                        };
+                    };
+                };
+            };
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                port@0 {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+                    reg = <0>;
+                    dpi0_out0: endpoint@0 {
+                        reg = <0>;
+                        remote-endpoint = <&oldi0_in>;
+                    };
+                    dpi0_out1: endpoint@1 {
+                        reg = <1>;
+                        remote-endpoint = <&oldi1_in>;
+                    };
+                };
+                port@1 {
+                    reg = <1>;
+                    dpi1_out: endpoint {
+                        remote-endpoint = <&hdmi_bridge>;
+                    };
+                };
+            };
+        };
+    };
-- 
2.34.1


^ permalink raw reply related	[relevance 13%]

* [PATCH 3/4] dt-bindings: display: ti, am65x-dss: Add OLDI properties for AM625 DSS
@ 2024-05-11 19:30 14%   ` Aradhya Bhatia
  0 siblings, 0 replies; 200+ results
From: Aradhya Bhatia @ 2024-05-11 19:30 UTC (permalink / raw)
  To: Tomi Valkeinen, Jyri Sarha, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Neil Armstrong, Laurent Pinchart,
	David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: DRI Development List, Devicetree List, Linux Kernel List,
	Nishanth Menon, Vignesh Raghavendra, Praneeth Bajjuri,
	Udit Kumar, Francesco Dolcini, Alexander Sverdlin, Randolph Sapp,
	Devarsh Thakkar, Jayesh Choudhary, Jai Luthra, Aradhya Bhatia

The DSS in AM625 SoC has 2 OLDI TXes. Refer the OLDI schema to add the
properties.

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
---
 .../bindings/display/ti/ti,am65x-dss.yaml     | 136 +++++++++++++++++-
 1 file changed, 135 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
index 399d68986326..4aa2de59b32b 100644
--- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
+++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
@@ -85,12 +85,30 @@ properties:
 
     properties:
       port@0:
-        $ref: /schemas/graph.yaml#/properties/port
+        $ref: /schemas/graph.yaml#/$defs/port-base
         description:
           For AM65x DSS, the OLDI output port node from video port 1.
           For AM625 DSS, the internal DPI output port node from video
           port 1.
           For AM62A7 DSS, the port is tied off inside the SoC.
+        properties:
+          endpoint@0:
+            $ref: /schemas/graph.yaml#/properties/endpoint
+            description:
+              For AM625 DSS, VP Connection to OLDI0.
+              For AM65X DSS, OLDI output from the SoC.
+
+          endpoint@1:
+            $ref: /schemas/graph.yaml#/properties/endpoint
+            description:
+              For AM625 DSS, VP Connection to OLDI1.
+
+        anyOf:
+          - required:
+              - endpoint
+          - required:
+              - endpoint@0
+              - endpoint@1
 
       port@1:
         $ref: /schemas/graph.yaml#/properties/port
@@ -112,6 +130,22 @@ properties:
       Input memory (from main memory to dispc) bandwidth limit in
       bytes per second
 
+  oldi-txes:
+    type: object
+    properties:
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 0
+
+    patternProperties:
+      '^oldi_tx@[0-1]$':
+        type: object
+        $ref: ti,am625-oldi.yaml#
+        unevaluatedProperties: false
+        description: OLDI transmitters connected to the DSS VPs
+
 allOf:
   - if:
       properties:
@@ -123,6 +157,19 @@ allOf:
         ports:
           properties:
             port@0: false
+            oldi_txes: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ti,am65x-dss
+    then:
+      properties:
+        oldi_txes: false
+        port@0:
+          properties:
+            endpoint@1: false
 
 required:
   - compatible
@@ -171,3 +218,90 @@ examples:
             };
         };
     };
+
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+    bus {
+        #address-cells = <2>;
+        #size-cells = <2>;
+        dss1: dss@30200000 {
+            compatible = "ti,am625-dss";
+            reg = <0x00 0x30200000 0x00 0x1000>, /* common */
+                  <0x00 0x30202000 0x00 0x1000>, /* vidl1 */
+                  <0x00 0x30206000 0x00 0x1000>, /* vid */
+                  <0x00 0x30207000 0x00 0x1000>, /* ovr1 */
+                  <0x00 0x30208000 0x00 0x1000>, /* ovr2 */
+                  <0x00 0x3020a000 0x00 0x1000>, /* vp1 */
+                  <0x00 0x3020b000 0x00 0x1000>, /* vp2 */
+                  <0x00 0x30201000 0x00 0x1000>; /* common1 */
+            reg-names = "common", "vidl1", "vid",
+                        "ovr1", "ovr2", "vp1", "vp2", "common1";
+            power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>;
+            clocks =        <&k3_clks 186 6>,
+                            <&vp1_clock>,
+                            <&k3_clks 186 2>;
+            clock-names = "fck", "vp1", "vp2";
+            interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+            oldi-txes {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                oldi0: oldi@0 {
+                    reg = <0>;
+                    clocks = <&k3_clks 186 0>;
+                    clock-names = "s_clk";
+                    ti,companion-oldi = <&oldi1>;
+                    ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
+                    ports {
+                        #address-cells = <1>;
+                        #size-cells = <0>;
+                        port@0 {
+                            reg = <0>;
+                            oldi0_in: endpoint {
+                                remote-endpoint = <&dpi0_out0>;
+                            };
+                        };
+                    };
+                };
+                oldi1: oldi@1 {
+                    reg = <1>;
+                    ti,secondary-oldi;
+                    ports {
+                        #address-cells = <1>;
+                        #size-cells = <0>;
+                        port@0 {
+                            reg = <0>;
+                            oldi1_in: endpoint {
+                                remote-endpoint = <&dpi0_out1>;
+                            };
+                        };
+                    };
+                };
+            };
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                port@0 {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+                    reg = <0>;
+                    dpi0_out0: endpoint@0 {
+                        reg = <0>;
+                        remote-endpoint = <&oldi0_in>;
+                    };
+                    dpi0_out1: endpoint@1 {
+                        reg = <1>;
+                        remote-endpoint = <&oldi1_in>;
+                    };
+                };
+                port@1 {
+                    reg = <1>;
+                    dpi1_out: endpoint {
+                        remote-endpoint = <&hdmi_bridge>;
+                    };
+                };
+            };
+        };
+    };
-- 
2.34.1


^ permalink raw reply related	[relevance 14%]

* Re: [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing
  2024-05-11 19:16  1% ` [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing Artur Rojek
@ 2024-05-11 19:30  0%   ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 200+ results
From: John Paul Adrian Glaubitz @ 2024-05-11 19:30 UTC (permalink / raw)
  To: Artur Rojek, Yoshinori Sato, Rich Felker, Paul Cercueil
  Cc: linux-sh, linux-kernel

Hi,

On Sat, 2024-05-11 at 21:16 +0200, Artur Rojek wrote:
> The G2-to-PCI bridge chip found in SEGA Dreamcast assumes P2 area
> relative addresses.
> 
> Set the appropriate IOPORT base offset.
> 
> Tested-by: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
> ---
>  arch/sh/Kconfig                       | 3 ++-
>  arch/sh/boards/mach-dreamcast/setup.c | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index 217bdc4d0201..f723e2256c9c 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -126,7 +126,8 @@ config ARCH_HAS_ILOG2_U64
>  
>  config NO_IOPORT_MAP
>  	def_bool !PCI
> -	depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE
> +	depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE && \
> +		   !SH_DREAMCAST
>  
>  config IO_TRAPPED
>  	bool
> diff --git a/arch/sh/boards/mach-dreamcast/setup.c b/arch/sh/boards/mach-dreamcast/setup.c
> index 2d966c1c2cc1..daa8455549fa 100644
> --- a/arch/sh/boards/mach-dreamcast/setup.c
> +++ b/arch/sh/boards/mach-dreamcast/setup.c
> @@ -25,10 +25,13 @@
>  #include <asm/irq.h>
>  #include <asm/rtc.h>
>  #include <asm/machvec.h>
> +#include <cpu/addrspace.h>
>  #include <mach/sysasic.h>
>  
>  static void __init dreamcast_setup(char **cmdline_p)
>  {
> +	/* GAPS PCI bridge assumes P2 area relative addresses. */
> +	__set_io_port_base(P2SEG);
>  }
>  
>  static struct sh_machine_vector mv_dreamcast __initmv = {

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[relevance 0%]

* Re: [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  2024-05-11 18:42  1%   ` Linus Torvalds
@ 2024-05-11 19:28  1%     ` Al Viro
  2024-05-11 19:55  1%       ` Linus Torvalds
  2024-05-11 20:02  7%     ` [PATCH v2] " Linus Torvalds
  1 sibling, 1 reply; 200+ results
From: Al Viro @ 2024-05-11 19:28 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, walters,
	wangkai86, willy

On Sat, May 11, 2024 at 11:42:34AM -0700, Linus Torvalds wrote:

> so we have another level of locking going on, and my patch only moved
> the dcache pruning outside the lock of the directory we're removing
> (not outside the lock of the directory that contains the removed
> directory).
> 
> And that outside lock is the much more important one, I bet.

... and _that_ is where taking d_delete outside of the lock might
take an unpleasant analysis of a lot of code.

We have places where we assume that holding the parent locked
will prevent ->d_inode changes of children.  It might be possible
to get rid of that, but it will take a non-trivial amount of work.

In any case, I think the original poster said that parent directories
were not removed, so I doubt that rmdir() behaviour is relevant for
their load.

^ permalink raw reply	[relevance 1%]

* [PATCH] ucounts: constify usage of ctl_table_header::ctl_table_arg
@ 2024-05-11 19:28  1% Thomas Weißschuh
  0 siblings, 0 replies; 200+ results
From: Thomas Weißschuh @ 2024-05-11 19:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Weißschuh, Joel Granados, Luis Chamberlain,
	Eric W. Biederman

The sysctl core is preparing to only expose instances of
struct ctl_table as "const".
This will also affect the member
ctl_table_header::ctl_table_arg.

Prepare for that change to "struct ctl_table_header",
and already constify the usage of ctl_table_arg.

No functional change.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Motivation
==========

Moving structures containing function pointers into unmodifiable .rodata
prevents attackers or bugs from corrupting and diverting those pointers.

Also the "struct ctl_table" exposed by the sysctl core were never meant
to be mutated by users.

Process
=======

* Drop ctl_table modifications from the sysctl core ([0], in -next)
* Constify arguments to ctl_table_root::{set_ownership,permissions}
  ([1], in -next)
* Migrate users of "ctl_table_header::ctl_table_arg" to "const".
  (in progress, this patch)
* Afterwards convert "ctl_table_header::ctl_table_arg" itself to const.
  (to be done)
* Prepare helpers used to implement proc_handlers throughout the tree to
  use "const struct ctl_table *". ([2], in progress)
* Afterwards switch over all proc_handlers callbacks to use
  "const struct ctl_table *" in one commit. ([2], in progress)
  Only custom handlers will be affected, the big commit avoids a
  disruptive and messy transition phase.
* Switch over the internals of the sysctl core to "const struct ctl_table *" (to be done)
* Switch include/linux/sysctl.h to "const struct ctl_table *" (to be done)
* Transition instances of "struct ctl_table" through the tree to const (to be done)

A work-in-progress view containging all the outlined changes can be found at
https://git.sr.ht/~t-8ch/linux sysctl-constfy

[0] https://lore.kernel.org/lkml/20240322-sysctl-empty-dir-v2-0-e559cf8ec7c0@weissschuh.net/
[1] https://lore.kernel.org/lkml/20240315-sysctl-const-ownership-v3-0-b86680eae02e@weissschuh.net/
[2] https://lore.kernel.org/lkml/20240423-sysctl-const-handler-v3-0-e0beccb836e2@weissschuh.net/

Cc: Joel Granados <j.granados@samsung.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
---
 kernel/ucount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/ucount.c b/kernel/ucount.c
index 4aa6166cb856..d9e283600f5c 100644
--- a/kernel/ucount.c
+++ b/kernel/ucount.c
@@ -119,7 +119,7 @@ bool setup_userns_sysctls(struct user_namespace *ns)
 void retire_userns_sysctls(struct user_namespace *ns)
 {
 #ifdef CONFIG_SYSCTL
-	struct ctl_table *tbl;
+	const struct ctl_table *tbl;
 
 	tbl = ns->sysctls->ctl_table_arg;
 	unregister_sysctl_table(ns->sysctls);

---
base-commit: cf87f46fd34d6c19283d9625a7822f20d90b64a4
change-id: 20240511-sysctl-const-table-arg-ucount-75027ec3fbf4

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply related	[relevance 1%]

* Re: linux-next: manual merge of the refactor-heap tree with the block tree
  @ 2024-05-11 19:24  1%             ` Kuan-Wei Chiu
  0 siblings, 0 replies; 200+ results
From: Kuan-Wei Chiu @ 2024-05-11 19:24 UTC (permalink / raw)
  To: Matthew Mirvish
  Cc: Kent Overstreet, Coly Li, Linux Kernel Mailing List,
	Linux Next Mailing List

On Fri, May 10, 2024 at 05:11:02PM +0800, Kuan-Wei Chiu wrote:
> On Thu, May 09, 2024 at 11:46:18PM -0400, Matthew Mirvish wrote:
> > On Fri, May 10, 2024 at 11:07:11AM +0800, Kuan-Wei Chiu wrote:
> > > On Thu, May 09, 2024 at 07:16:31PM -0400, Kent Overstreet wrote:
> > > > On Fri, May 10, 2024 at 06:44:29AM +0800, Kuan-Wei Chiu wrote:
> > > > > On Thu, May 09, 2024 at 03:58:57PM -0400, Kent Overstreet wrote:
> > > > > > On Thu, May 09, 2024 at 03:27:45PM +1000, Stephen Rothwell wrote:
> > > > > > > Hi all,
> > > > > > > 
> > > > > > > Today's linux-next merge of the refactor-heap tree got conflicts in:
> > > > > > > 
> > > > > > >   drivers/md/bcache/bset.c
> > > > > > >   drivers/md/bcache/bset.h
> > > > > > >   drivers/md/bcache/btree.c
> > > > > > >   drivers/md/bcache/writeback.c
> > > > > > > 
> > > > > > > between commit:
> > > > > > > 
> > > > > > >   3a861560ccb3 ("bcache: fix variable length array abuse in btree_iter")
> > > > > > > 
> > > > > > > from the block tree and commit:
> > > > > > > 
> > > > > > >   afa5721abaaa ("bcache: Remove heap-related macros and switch to generic min_heap")
> > > > > > > 
> > > > > > > from the refactor-heap tree.
> > > > > > > 
> > > > > > > Ok, these conflicts are too extensive, so I am dropping the refactor-heap
> > > > > > > tree for today.  I suggest you all get together and sort something out.
> > > > > > 
> > > > > > Coli and Kuan, you guys will need to get this sorted out quick if we
> > > > > > want refactor-heap to make the merge window
> > > > > 
> > > > > Hi Coli and Kent,
> > > > > 
> > > > > If I understand correctly, the reported bug is because we attempted to
> > > > > point (heap)->data to a dynamically allocated memory , but at that time
> > > > > (heap)->data was not a regular pointer but a fixed size array with a
> > > > > length of MAX_BSETS.
> > > > > 
> > > > > In my refactor heap patch series, I introduced a preallocated array and
> > > > > decided in min_heap_init() whether the data pointer should point to an
> > > > > incoming pointer or to the preallocated array. Therefore, I am
> > > > > wondering if my patch might have unintentionally fixed this bug?
> > > > > 
> > > > > I am unsure how to reproduce the reported issue. Could you assist me in
> > > > > verifying whether my assumption is correct?
> > > > 
> > > > This is a merge conflict, not a runtime. Can you rebase onto Coli's
> > > > tree? We'll have to retest.
> > > 
> > > Oh, sorry for the misunderstanding I caused. When I mentioned "bug" [1]
> > > earlier, I was referring to the bug addressed in
> > > 3a861560ccb3 ("bcache: fix variable length array abuse in btree_iter"),
> > > not a merge conflict.
> > > 
> > > Here are the results after the rebase:
> > > https://github.com/visitorckw/linux.git refactor-heap
> > > 
> > > [1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2039368
> > 
> > The ubuntu kernels build with UBSAN now, and the bug reported is just a
> > UBSAN warning. The original implementation's iterator has a fixed size
> > sets array that is indexed out of bounds when the iterator is allocated
> > on the heap with more space -- the patch restructures it a bit to have a
> > single iterator type with a flexible array and then a larger "stack"
> > type which embeds the iterator along with the preallocated region.
> > 
> > I took a brief look at the refactor-heap branch but I'm not entirely
> > sure what's going on with the new min heaps: in the one place where the
> > larger iterators are used (in bch_btree_node_read_done) it doesn't look
> > like the heap is ever initialized (perhaps since the old iter_init
> > wasn't used here because of the special case it got missed in the
> > refactor?) With the new heaps it should be fairly easy to fix though;
> > just change the fill_iter mempool to be allocating only the minheap data
> > arrays and setup iter->heap.data properly with that instead.
> 
> Thank you, Matthew.
> Not initializing the heap's data pointer was indeed my mistake.
> Following your advice, I made the following modifications to the code
> on the refactor-heap branch in my github repo. I hope this time it
> works well.
>
Should I resend it as a patch series?

> 
> diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
> index a2bb86d52ad4..ce9d729bc8ff 100644
> --- a/drivers/md/bcache/btree.c
> +++ b/drivers/md/bcache/btree.c
> @@ -149,19 +149,19 @@ void bch_btree_node_read_done(struct btree *b)
>  {
>  	const char *err = "bad btree header";
>  	struct bset *i = btree_bset_first(b);
> -	struct btree_iter *iter;
> +	struct btree_iter iter;
> 
>  	/*
>  	 * c->fill_iter can allocate an iterator with more memory space
>  	 * than static MAX_BSETS.
>  	 * See the comment arount cache_set->fill_iter.
>  	 */
> -	iter = mempool_alloc(&b->c->fill_iter, GFP_NOIO);
> -	iter->heap.size = b->c->cache->sb.bucket_size / b->c->cache->sb.block_size;
> -	iter->heap.nr = 0;
> +	iter.heap.data = mempool_alloc(&b->c->fill_iter, GFP_NOIO);
> +	iter.heap.size = b->c->cache->sb.bucket_size / b->c->cache->sb.block_size;
> +	iter.heap.nr = 0;
> 
>  #ifdef CONFIG_BCACHE_DEBUG
> -	iter->b = &b->keys;
> +	iter.b = &b->keys;
>  #endif
> 
>  	if (!i->seq)
> @@ -199,7 +199,7 @@ void bch_btree_node_read_done(struct btree *b)
>  		if (i != b->keys.set[0].data && !i->keys)
>  			goto err;
> 
> -		bch_btree_iter_push(iter, i->start, bset_bkey_last(i));
> +		bch_btree_iter_push(&iter, i->start, bset_bkey_last(i));
> 
>  		b->written += set_blocks(i, block_bytes(b->c->cache));
>  	}
> @@ -211,7 +211,7 @@ void bch_btree_node_read_done(struct btree *b)
>  		if (i->seq == b->keys.set[0].data->seq)
>  			goto err;
> 
> -	bch_btree_sort_and_fix_extents(&b->keys, iter, &b->c->sort);
> +	bch_btree_sort_and_fix_extents(&b->keys, &iter, &b->c->sort);
> 
>  	i = b->keys.set[0].data;
>  	err = "short btree key";
> @@ -223,7 +223,7 @@ void bch_btree_node_read_done(struct btree *b)
>  		bch_bset_init_next(&b->keys, write_block(b),
>  				   bset_magic(&b->c->cache->sb));
>  out:
> -	mempool_free(iter, &b->c->fill_iter);
> +	mempool_free(iter.heap.data, &b->c->fill_iter);
>  	return;
>  err:
>  	set_btree_node_io_error(b);
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index cba09660148a..c6f5592996a8 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -1914,8 +1914,7 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)
>  	INIT_LIST_HEAD(&c->btree_cache_freed);
>  	INIT_LIST_HEAD(&c->data_buckets);
> 
> -	iter_size = sizeof(struct btree_iter) +
> -		    ((meta_bucket_pages(sb) * PAGE_SECTORS) / sb->block_size) *
> +	iter_size = ((meta_bucket_pages(sb) * PAGE_SECTORS) / sb->block_size) *
>  			    sizeof(struct btree_iter_set);
> 
>  	c->devices = kcalloc(c->nr_uuids, sizeof(void *), GFP_KERNEL);
> 

^ permalink raw reply	[relevance 1%]

* [GIT PULL] execve updates for 6.10-rc1
@ 2024-05-11 19:24  1% Kees Cook
  0 siblings, 0 replies; 200+ results
From: Kees Cook @ 2024-05-11 19:24 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Allen Pais, Jini Susan George, Kees Cook,
	Marco Elver, Masami Hiramatsu, Max Filippov, Michael Ellerman,
	Steven Rostedt, Vignesh Balasubramanian, Vijay Nag, y0un9n132

Hi Linus,

Please pull this handful of execve updates for 6.10-rc1.

Thanks!

-Kees

The following changes since commit 39cd87c4eb2b893354f3b850f916353f2658ae6f:

  Linux 6.9-rc2 (2024-03-31 14:32:39 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/execve-6.10-rc1

for you to fetch changes up to 4bbf9c3b53e637eb3a14ee27b996300ce88e752a:

  fs/coredump: Enable dynamic configuration of max file note size (2024-05-08 09:53:00 -0700)

----------------------------------------------------------------
execve updates for 6.10-rc1

- Provide knob to change (previously fixed) coredump NOTES size (Allen Pais)

- Add sched_prepare_exec tracepoint (Marco Elver)

- Make /proc/$pid/auxv work under binfmt_elf_fdpic (Max Filippov)

- Convert ARCH_HAVE_EXTRA_ELF_NOTES to proper Kconfig (Vignesh Balasubramanian)

- Leave a gap between .bss and brk

----------------------------------------------------------------
Allen Pais (1):
      fs/coredump: Enable dynamic configuration of max file note size

Kees Cook (1):
      binfmt_elf: Leave a gap between .bss and brk

Marco Elver (1):
      tracing: Add sched_prepare_exec tracepoint

Max Filippov (1):
      binfmt_elf_fdpic: fix /proc/<pid>/auxv

Vignesh Balasubramanian (1):
      Replace macro "ARCH_HAVE_EXTRA_ELF_NOTES" with kconfig

 arch/Kconfig                   |  9 +++++
 arch/powerpc/Kconfig           |  1 +
 arch/powerpc/include/asm/elf.h |  2 -
 fs/binfmt_elf.c                | 10 ++++-
 fs/binfmt_elf_fdpic.c          | 85 +++++++++++++++++++-----------------------
 fs/coredump.c                  | 17 +++++++++
 fs/exec.c                      |  8 ++++
 include/linux/coredump.h       |  2 +
 include/linux/elf.h            |  2 +-
 include/trace/events/sched.h   | 35 +++++++++++++++++
 10 files changed, 120 insertions(+), 51 deletions(-)

-- 
Kees Cook

^ permalink raw reply	[relevance 1%]

* Re: [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  2024-05-11 18:26  1% ` [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()' Linus Torvalds
  2024-05-11 18:42  1%   ` Linus Torvalds
@ 2024-05-11 19:24  0%   ` Al Viro
  1 sibling, 0 replies; 200+ results
From: Al Viro @ 2024-05-11 19:24 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, walters,
	wangkai86, willy

On Sat, May 11, 2024 at 11:26:26AM -0700, Linus Torvalds wrote:
> Yafang Shao reports that he has seen loads that generate billions of
> negative dentries in a directory, which then when the directory is
> removed causes excessive latencies for other users because the dentry
> shrinking is done under the directory inode lock.
> 
> There seems to be no actual reason for holding the inode lock any more
> by the time we get rid of the now uninteresting negative dentries, and
> it's an effect of just code layout (the shared error path).
> 
> Reorganize the code trivially to just have a separate success path,
> which simplifies the code (since 'd_delete_notify()' is only called in
> the success path anyway) and makes it trivial to just move the dentry
> shrinking outside the inode lock.

Wait, I thought he had confirmed that in the setup in question directories
were *not* removed, hadn't he?

I've no objections against that patch, but if the above is accurate it's
not going to help...

^ permalink raw reply	[relevance 0%]

* Re: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
    2024-05-11 18:36  1% ` kernel test robot
@ 2024-05-11 19:18  1% ` kernel test robot
  2024-05-11 19:18  1% ` kernel test robot
  2024-05-11 22:14  1% ` kernel test robot
  3 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 19:18 UTC (permalink / raw)
  To: Yasin Lee, jic23
  Cc: llvm, oe-kbuild-all, lars, swboyd, nuno.a, andy.shevchenko,
	u.kleine-koenig, linux-iio, linux-kernel, yasin.lee.x,
	yasin.lee.x

Hi Yasin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.9-rc7 next-20240510]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yasin-Lee/iio-proximity-hx9031as-Add-TYHX-HX9031AS-HX9023S-sensor-driver/20240510-173839
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/SN7PR12MB8101EDFA7F91A59761095A28A4E72%40SN7PR12MB8101.namprd12.prod.outlook.com
patch subject: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240512/202405120331.GAhwezaB-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project b910bebc300dafb30569cecc3017b446ea8eafa0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120331.GAhwezaB-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120331.GAhwezaB-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/iio/proximity/hx9031as.c:12:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     560 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from drivers/iio/proximity/hx9031as.c:12:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from drivers/iio/proximity/hx9031as.c:12:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     594 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   In file included from drivers/iio/proximity/hx9031as.c:12:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/iio/proximity/hx9031as.c:1478:16: warning: stack frame size (1072) exceeds limit (1024) in 'hx9031as_dump_show' [-Wframe-larger-than]
    1478 | static ssize_t hx9031as_dump_show(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)
         |                ^
   8 warnings generated.


vim +/hx9031as_dump_show +1478 drivers/iio/proximity/hx9031as.c

  1477	
> 1478	static ssize_t hx9031as_dump_show(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)
  1479	{
  1480		int ret = -1;
  1481		uint8_t rx_buf[1] = {0};
  1482		char buf[BUF_SIZE * 2] = {0};
  1483		char *p = buf;
  1484		int ii = 0;
  1485	
  1486		for (ii = 0; ii < ARRAY_SIZE(hx9031as_reg_init_list); ii++) {
  1487			ret = hx9031as_read(hx9031as_reg_init_list[ii].addr, rx_buf, 1);
  1488			if (ret != 0)
  1489				PRINT_ERR("hx9031as_read failed\n");
  1490			PRINT_INF("0x%02X=0x%02X\n", hx9031as_reg_init_list[ii].addr, rx_buf[0]);
  1491			p += snprintf(p, PAGE_SIZE, "0x%02X=0x%02X\n", hx9031as_reg_init_list[ii].addr, rx_buf[0]);
  1492		}
  1493	
  1494		p += snprintf(p, PAGE_SIZE, "driver version:%s\n", HX9031AS_DRIVER_VER);
  1495	
  1496		return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));
  1497	}
  1498	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* Re: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
    2024-05-11 18:36  1% ` kernel test robot
  2024-05-11 19:18  1% ` kernel test robot
@ 2024-05-11 19:18  1% ` kernel test robot
  2024-05-11 22:14  1% ` kernel test robot
  3 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 19:18 UTC (permalink / raw)
  To: Yasin Lee, jic23
  Cc: oe-kbuild-all, lars, swboyd, nuno.a, andy.shevchenko,
	u.kleine-koenig, linux-iio, linux-kernel, yasin.lee.x,
	yasin.lee.x

Hi Yasin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.9-rc7 next-20240510]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yasin-Lee/iio-proximity-hx9031as-Add-TYHX-HX9031AS-HX9023S-sensor-driver/20240510-173839
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/SN7PR12MB8101EDFA7F91A59761095A28A4E72%40SN7PR12MB8101.namprd12.prod.outlook.com
patch subject: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
config: arc-randconfig-r133-20240512 (https://download.01.org/0day-ci/archive/20240512/202405120334.eHnXGJwn-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240512/202405120334.eHnXGJwn-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120334.eHnXGJwn-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/proximity/hx9031as.c:1919:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] val @@     got signed int @@
   drivers/iio/proximity/hx9031as.c:1919:21: sparse:     expected restricted __be16 [usertype] val
   drivers/iio/proximity/hx9031as.c:1919:21: sparse:     got signed int
   drivers/iio/proximity/hx9031as.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
   include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
   include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false

vim +1919 drivers/iio/proximity/hx9031as.c

  1902	
  1903	static irqreturn_t hx9031as_trigger_handler(int irq, void *private)
  1904	{
  1905		struct iio_poll_func *pf = private;
  1906		struct iio_dev *indio_dev = pf->indio_dev;
  1907		struct hx9031as_data *data = iio_priv(indio_dev);
  1908		__be16 val;
  1909		int bit = 0;
  1910		int ii = 0;
  1911	
  1912		ENTER;
  1913		mutex_lock(&data->mutex);
  1914	
  1915		hx9031as_sample();
  1916		hx9031as_get_prox_state();
  1917	
  1918		for_each_set_bit(bit, indio_dev->active_scan_mask, indio_dev->masklength) {
> 1919			val = hx9031as_pdata.diff[indio_dev->channels[bit].channel];
  1920			data->buffer.channels[ii++] = val;
  1921			PRINT_INF("bit=%d, ii=%d, val=%d\n", bit, ii - 1, val);
  1922		}
  1923	
  1924		iio_push_to_buffers_with_timestamp(indio_dev, &data->buffer, pf->timestamp);
  1925		mutex_unlock(&data->mutex);
  1926	
  1927		iio_trigger_notify_done(indio_dev->trig);
  1928		return IRQ_HANDLED;
  1929	}
  1930	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* [PATCH 0/1] Fix Dreamcast GAPS PCI bridge
@ 2024-05-11 19:16  1% Artur Rojek
  2024-05-11 19:16  1% ` [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing Artur Rojek
  0 siblings, 1 reply; 200+ results
From: Artur Rojek @ 2024-05-11 19:16 UTC (permalink / raw)
  To: Yoshinori Sato, Rich Felker, John Paul Adrian Glaubitz, Paul Cercueil
  Cc: linux-sh, linux-kernel, Artur Rojek

Hi all,

this patch fixes the G2-to-PCI bridge found in the SEGA Dreamcast
hardware, by setting the appropriate IOPORT base offset.

While being just a simple change, it's notable to mention that, when
combined with the DMAC fixes from e82e47584847, it allows Linux to boot
on the SEGA Dreamcast again, probably for the first time in a long
while.

Artur Rojek (1):
  sh: dreamcast: Fix GAPS PCI bridge addressing

 arch/sh/Kconfig                       | 3 ++-
 arch/sh/boards/mach-dreamcast/setup.c | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.45.0


^ permalink raw reply	[relevance 1%]

* [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing
  2024-05-11 19:16  1% [PATCH 0/1] Fix Dreamcast GAPS PCI bridge Artur Rojek
@ 2024-05-11 19:16  1% ` Artur Rojek
  2024-05-11 19:30  0%   ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 200+ results
From: Artur Rojek @ 2024-05-11 19:16 UTC (permalink / raw)
  To: Yoshinori Sato, Rich Felker, John Paul Adrian Glaubitz, Paul Cercueil
  Cc: linux-sh, linux-kernel, Artur Rojek

The G2-to-PCI bridge chip found in SEGA Dreamcast assumes P2 area
relative addresses.

Set the appropriate IOPORT base offset.

Tested-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
---
 arch/sh/Kconfig                       | 3 ++-
 arch/sh/boards/mach-dreamcast/setup.c | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 217bdc4d0201..f723e2256c9c 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -126,7 +126,8 @@ config ARCH_HAS_ILOG2_U64
 
 config NO_IOPORT_MAP
 	def_bool !PCI
-	depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE
+	depends on !SH_SHMIN && !SH_HP6XX && !SH_SOLUTION_ENGINE && \
+		   !SH_DREAMCAST
 
 config IO_TRAPPED
 	bool
diff --git a/arch/sh/boards/mach-dreamcast/setup.c b/arch/sh/boards/mach-dreamcast/setup.c
index 2d966c1c2cc1..daa8455549fa 100644
--- a/arch/sh/boards/mach-dreamcast/setup.c
+++ b/arch/sh/boards/mach-dreamcast/setup.c
@@ -25,10 +25,13 @@
 #include <asm/irq.h>
 #include <asm/rtc.h>
 #include <asm/machvec.h>
+#include <cpu/addrspace.h>
 #include <mach/sysasic.h>
 
 static void __init dreamcast_setup(char **cmdline_p)
 {
+	/* GAPS PCI bridge assumes P2 area relative addresses. */
+	__set_io_port_base(P2SEG);
 }
 
 static struct sh_machine_vector mv_dreamcast __initmv = {
-- 
2.45.0


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH] media: i2c: hi846: Fix V4L2_SUBDEV_FORMAT_TRY get_selection()
  @ 2024-05-11 19:09  0%     ` Laurent Pinchart
  0 siblings, 0 replies; 200+ results
From: Laurent Pinchart @ 2024-05-11 19:09 UTC (permalink / raw)
  To: Ricardo Ribalda
  Cc: Sakari Ailus, Martin Kepplinger, Mauro Carvalho Chehab,
	Pavel Machek, Mauro Carvalho Chehab, linux-media, linux-kernel

Hi Ricardo,

On Sat, May 11, 2024 at 09:47:47AM +0200, Ricardo Ribalda wrote:
> On Thu, 9 May 2024 at 21:39, Laurent Pinchart wrote:
> > On Thu, May 09, 2024 at 05:05:55PM +0000, Ricardo Ribalda wrote:
> > > The current code does not return anything to the user.
> > >
> > > Although the code looks a bit dangerous (using a pointer without
> > > checking if it is valid), it should be fine. The code validates that
> >
> > I think you meant s/code/core/
> 
> Yes, sorry, fatty fingers :)
> 
> If you are planning to send a v5 of this
> https://patchwork.linuxtv.org/project/linux-media/patch/20240508214045.24716-4-laurent.pinchart+renesas@ideasonboard.com/
> 
> Maybe you could include this patch there?

Yes, I've already taken the patch in my tree. If Hans merges it to the
stage tree I'll drop it, otherwise I'll include it in the pull request
to avoid breaking CI.

> I found the issue when the CI tested your series (eventhough it is not
> caused by your series)
> 
> > > sel->pad has a valid value.
> > >
> > > Fix the following smatch error:
> > > drivers/media/i2c/hi846.c:1854 hi846_get_selection() warn: statement has no effect 31
> > >
> > > Fixes: e8c0882685f9 ("media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera")
> > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >
> > > ---
> > > While running media-ci on the last patches there was a new sparse
> > > warning:
> > > https://gitlab.freedesktop.org/linux-media/users/patchwork/-/jobs/58524338/artifacts/external_file/junit/test-smatch.log.txt
> > > ---
> > >  drivers/media/i2c/hi846.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/i2c/hi846.c b/drivers/media/i2c/hi846.c
> > > index 9c565ec033d4..52d9ca68a86c 100644
> > > --- a/drivers/media/i2c/hi846.c
> > > +++ b/drivers/media/i2c/hi846.c
> > > @@ -1851,7 +1851,7 @@ static int hi846_get_selection(struct v4l2_subdev *sd,
> > >               mutex_lock(&hi846->mutex);
> > >               switch (sel->which) {
> > >               case V4L2_SUBDEV_FORMAT_TRY:
> > > -                     v4l2_subdev_state_get_crop(sd_state, sel->pad);
> > > +                     sel->r = *v4l2_subdev_state_get_crop(sd_state, sel->pad);
> > >                       break;
> > >               case V4L2_SUBDEV_FORMAT_ACTIVE:
> > >                       sel->r = hi846->cur_mode->crop;
> > >
> > > ---
> > > base-commit: 48259b90973718d2277db27b5e510f0fe957eaa0
> > > change-id: 20240509-fix-hi846-c3d77768622e

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[relevance 0%]

* [PATCH] Documentation: security-bugs Korean translation
@ 2024-05-11 19:06  1% yskelg
  0 siblings, 0 replies; 200+ results
From: yskelg @ 2024-05-11 19:06 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Austin Kim, shjy180909, workflows, linux-doc, linux-kernel, Yunseong Kim

From: Yunseong Kim <yskelg@gmail.com>

This is a Documentation/process/security-bugs korean version.

Signed-off-by: Yunseong Kim <yskelg@gmail.com>
---
 .../ko_KR/process/security-bugs.rst           | 96 +++++++++++++++++++
 1 file changed, 96 insertions(+)
 create mode 100644 Documentation/translations/ko_KR/process/security-bugs.rst

diff --git a/Documentation/translations/ko_KR/process/security-bugs.rst b/Documentation/translations/ko_KR/process/security-bugs.rst
new file mode 100644
index 000000000000..b8f16fe846ac
--- /dev/null
+++ b/Documentation/translations/ko_KR/process/security-bugs.rst
@@ -0,0 +1,96 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+:Original: Documentation/process/security-bugs.rst
+:Translator: Yunseong Kim <yskelg@gmail.com>
+
+보안 버그
+=========
+
+Linux 커널 개발자는 보안을 매우 중요하게 생각합니다.
+따라서 보안 버그를 발견하면 가능한 한 빨리 수정하고 공개할 수 있도록
+알려주시기 바랍니다. 보안 버그를 Linux 커널 보안 팀에 신고해 주세요.
+
+제보하기
+--------
+
+Linux 커널 보안팀은 <security@kernel.org> 이메일로 연락할 수 있습니다.
+버그 신고를 확인하고 수정 사항을 개발 및 릴리스하는 데 도움을 줄 보안 담당자의
+비공개 목록입니다. 이미 수정 사항이 있는 경우 신고에 포함하면 처리 속도가
+상당히 빨라질 수 있습니다. 보안팀이 보안 취약점을 파악하고 수정하기 위해
+영역 관리자의 도움을 추가로 받을 수도 있습니다.
+
+모든 버그가 그렇듯이 더 많은 정보를 제공할수록 진단과 수정이 더 쉬워집니다.
+어떤 정보가 도움이 될지 잘 모르겠다면
+'Documentation/admin-guide/reporting-issues.rst'에
+나와있는 문제 신고하기 절차를 검토해 주세요. 모든 보안 취약점 공격 코드는
+매우 유용하며 이미 공개되어 있지 않은 한 신고자의 동의 없이 공개되지 않습니다.
+
+가능한 경우 첨부 파일 없이 일반 텍스트 이메일을 보내주세요.
+첨부 파일에 모든 세부 사항이 숨겨져 있으면 복잡한 문제에 대해 맥락에 맞는
+토론을 하기가 훨씬 더 어렵습니다. (아직 패치가 없는 경우라도) :doc:`일반적인
+패치 제출<../../../process/submitting-patches>`과 마찬가지로 문제와 영향을
+설명하고, 재현 단계를 나열하고, 제안된 수정 사항을 모두 일반 텍스트로
+작성하세요.
+
+공개 및 엠바고 정보
+-------------------
+
+보안 목록은 공개 채널이 아닙니다. 이에 대해서는 아래의 조정 사항을 참조하세요.
+강력한 수정이 개발되면 릴리스 프로세스가 시작됩니다. 공개적으로 알려진 버그에
+대한 수정 사항은 즉시 릴리스됩니다.
+
+공개적으로 알려지지 않은 버그에 대한 수정 사항이 제공되는 즉시 공개하는 것을
+선호하지만, 신고자 또는 영향을 받는 당사자의 요청에 따라 공개 프로세스
+시작일로부터 최대 7일 동안 연기될 수 있으며, 버그의 중요도에 따라 시간이 더
+필요하다는 데 동의하는 경우 예외적으로 14일까지 연장될 수 있습니다.
+수정 사항 공개를 연기할 수 있는 유일한 유효한 이유는 릴리스 조율이 필요한 QA
+및 대규모 롤아웃의 복잡한 실행 계획을 수용하기 위해서입니다.
+
+엠바고된 정보는 수정 개발을 위해 신뢰할 수 있는 개인과 공유할 수 있지만,
+신고자의 허가 없이 수정 사항과 함께 또는 다른 공개 채널에 게시할 수 없습니다.
+여기에는 원래의 버그 보고서와 후속 논의(있는 경우), 보안 취약점 공격 코드,
+CVE 정보 또는 신고자의 신원이 포함되지만 이에 국한되지 않습니다.
+
+다시 말해, 저희의 유일한 관심사는 버그 수정입니다. 보안 목록에 제출된 기타
+모든 정보와 보고에 대한 후속 논의는 엠바고가 해제된 후에도 영구적으로 기밀로
+취급됩니다.
+
+다른 그룹과의 협력
+------------------
+
+커널 보안팀은 버그 수정에만 집중하는 반면, 다른 그룹은 배포판의 문제를
+해결하고 운영 체제 공급업체 간의 공개를 조율하는 데 중점을 둡니다.
+조율은 일반적으로 "리눅스 배포판" 메일링 리스트에서 처리하고 공개는
+공공의 "oss-security" 메일링 리스트에서 처리하며, 이 둘은 서로 밀접하게
+관련되어 있으며 리눅스 배포판 위키에 제시되어 있습니다:
+<https://oss-security.openwall.org/wiki/mailing-lists/distros>
+
+세 가지 목록들이 추구하는 목표가 다르기 때문에 각각의 정책과 규칙이 다르다는
+점에 유의하세요. 커널 보안 팀과 다른 팀 간의 조율이 어려운 이유는
+커널 보안 팀의 경우 간혹 엠바고(최대 허용 일수에 따라)는 수정이 가능한
+시점부터 시작하지만, "리눅스 배포판"의 경우 수정 가능 여부와 관계없이 초기
+게시물부터 목록에 올라오기 때문입니다.
+
+따라서 커널 보안팀은 잠재적인 보안 문제를 신고하는 경우 해당 코드의
+메인테이너가 수정 사항을 수락하고 위의 배포판 위키 페이지를 읽었으며
+"리눅스 배포판" 메일링 리스트에 연락하는 것이 자신과 커널 커뮤니티에 부과되는
+요구 사항임을 완벽히 이해할 때까지 "리눅스 배포판"에 연락하지 않을 것을
+강력히 권장합니다. 이는 또한 일반적으로 수락된 수정 사항이 아직 병합되지 않은
+상태에서 조정을 위한 경우를 제외하고는 두 목록을 한 번에 참조하는 것이
+합리적이지 않다는 것을 의미합니다. 즉, 수정 사항이 수락될 때까지는
+"리눅스 배포판"을 메일에 참조하지 말고, 병합된 후에는 커널 보안 팀을 메일에
+참조하지 마세요.
+
+CVE 할당
+--------
+
+보안팀은 불필요하게 프로세스를 복잡하게 만들고 버그 처리를 지연시킬 수
+있으므로 보고나 수정에 대해 CVE를 할당하지 않으며, 이를 요구하지도 않습니다.
+보고자가 확인된 문제에 대해 CVE 식별자를 할당받고자 하는 경우 :doc:`커널 CVE
+할당팀<../../../process/cve>`에 연락하여 할당받을 수 있습니다.
+
+비공개 계약서
+-------------
+
+Linux 커널 보안 팀은 공식적인 기관이 아니므로 기밀 유지 계약을 체결할 수
+없습니다.
-- 
2.34.1


^ permalink raw reply related	[relevance 1%]

* [xen-unstable test] 185980: tolerable FAIL - PUSHED
@ 2024-05-11 19:02  1% osstest service owner
  0 siblings, 0 replies; 200+ results
From: osstest service owner @ 2024-05-11 19:02 UTC (permalink / raw)
  To: xen-devel

flight 185980 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/185980/

Failures :-/ but no regressions.

Tests which did not succeed, but are not blocking:
 test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stop            fail like 185975
 test-amd64-amd64-xl-qemuu-ws16-amd64 19 guest-stop            fail like 185975
 test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stop            fail like 185975
 test-armhf-armhf-libvirt     16 saverestore-support-check    fail  like 185975
 test-amd64-amd64-xl-qemut-ws16-amd64 19 guest-stop            fail like 185975
 test-amd64-amd64-qemuu-nested-amd 20 debian-hvm-install/l1/l2 fail like 185975
 test-amd64-amd64-libvirt     15 migrate-support-check        fail   never pass
 test-amd64-amd64-libvirt-xsm 15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl          15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl          16 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl-thunderx 15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-xsm      15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-thunderx 16 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl-xsm      16 saverestore-support-check    fail   never pass
 test-arm64-arm64-libvirt-xsm 15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-credit1  15 migrate-support-check        fail   never pass
 test-arm64-arm64-libvirt-xsm 16 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl-credit1  16 saverestore-support-check    fail   never pass
 test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 13 migrate-support-check fail never pass
 test-arm64-arm64-xl-credit2  15 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-credit2  16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl          15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl          16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-arndale  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-arndale  16 saverestore-support-check    fail   never pass
 test-amd64-amd64-libvirt-qcow2 14 migrate-support-check        fail never pass
 test-amd64-amd64-libvirt-raw 14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-rtds     15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-rtds     16 saverestore-support-check    fail   never pass
 test-amd64-amd64-libvirt-vhd 14 migrate-support-check        fail   never pass
 test-arm64-arm64-libvirt-raw 14 migrate-support-check        fail   never pass
 test-arm64-arm64-libvirt-raw 15 saverestore-support-check    fail   never pass
 test-arm64-arm64-xl-vhd      14 migrate-support-check        fail   never pass
 test-arm64-arm64-xl-vhd      15 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-qcow2    14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-qcow2    15 saverestore-support-check    fail   never pass
 test-armhf-armhf-libvirt     15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-raw      14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-raw      15 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-multivcpu 15 migrate-support-check        fail  never pass
 test-armhf-armhf-xl-multivcpu 16 saverestore-support-check    fail  never pass
 test-armhf-armhf-xl-credit2  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit2  16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-credit1  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit1  16 saverestore-support-check    fail   never pass
 test-armhf-armhf-libvirt-vhd 14 migrate-support-check        fail   never pass
 test-armhf-armhf-libvirt-vhd 15 saverestore-support-check    fail   never pass

version targeted for testing:
 xen                  46aa3031ae89ac1771f4159972edab65710e7349
baseline version:
 xen                  996576b965ccdf0de17aafa14282925e408e1200

Last test of basis   185975  2024-05-11 01:37:06 Z    0 days
Testing same since   185980  2024-05-11 10:13:22 Z    0 days    1 attempts

------------------------------------------------------------
People who touched revisions under test:
  Andrew Cooper <andrew.cooper3@citrix.com>
  Daniel P. Smith <dpsmith@apertussolutions.com>
  Demi Marie Obenour <demi@invisiblethingslab.com>
  Leigh Brown <leigh@solinno.co.uk>
  Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
  Nicola Vetrini <nicola.vetrini@bugseng.com>
  Roger Pau Monne <roger.pau@citrix.com>
  Roger Pau Monné <roger.pau@citrix.com>
  Stefano Stabellini <sstabellini@kernel.org>
  Stefano Stabellini <stefano.stabellini@amd.com>

jobs:
 build-amd64-xsm                                              pass    
 build-arm64-xsm                                              pass    
 build-i386-xsm                                               pass    
 build-amd64-xtf                                              pass    
 build-amd64                                                  pass    
 build-arm64                                                  pass    
 build-armhf                                                  pass    
 build-i386                                                   pass    
 build-amd64-libvirt                                          pass    
 build-arm64-libvirt                                          pass    
 build-armhf-libvirt                                          pass    
 build-i386-libvirt                                           pass    
 build-amd64-prev                                             pass    
 build-i386-prev                                              pass    
 build-amd64-pvops                                            pass    
 build-arm64-pvops                                            pass    
 build-armhf-pvops                                            pass    
 build-i386-pvops                                             pass    
 test-xtf-amd64-amd64-1                                       pass    
 test-xtf-amd64-amd64-2                                       pass    
 test-xtf-amd64-amd64-3                                       pass    
 test-xtf-amd64-amd64-4                                       pass    
 test-xtf-amd64-amd64-5                                       pass    
 test-amd64-amd64-xl                                          pass    
 test-amd64-coresched-amd64-xl                                pass    
 test-arm64-arm64-xl                                          pass    
 test-armhf-armhf-xl                                          pass    
 test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm           pass    
 test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm        pass    
 test-amd64-amd64-xl-qemut-debianhvm-i386-xsm                 pass    
 test-amd64-amd64-xl-qemuu-debianhvm-i386-xsm                 pass    
 test-amd64-amd64-libvirt-xsm                                 pass    
 test-arm64-arm64-libvirt-xsm                                 pass    
 test-amd64-amd64-xl-xsm                                      pass    
 test-arm64-arm64-xl-xsm                                      pass    
 test-amd64-amd64-qemuu-nested-amd                            fail    
 test-amd64-amd64-xl-pvhv2-amd                                pass    
 test-amd64-amd64-dom0pvh-xl-amd                              pass    
 test-amd64-amd64-xl-qemut-debianhvm-amd64                    pass    
 test-amd64-amd64-xl-qemuu-debianhvm-amd64                    pass    
 test-amd64-amd64-qemuu-freebsd11-amd64                       pass    
 test-amd64-amd64-qemuu-freebsd12-amd64                       pass    
 test-amd64-amd64-xl-qemuu-ovmf-amd64                         pass    
 test-amd64-amd64-xl-qemut-win7-amd64                         fail    
 test-amd64-amd64-xl-qemuu-win7-amd64                         fail    
 test-amd64-amd64-xl-qemut-ws16-amd64                         fail    
 test-amd64-amd64-xl-qemuu-ws16-amd64                         fail    
 test-armhf-armhf-xl-arndale                                  pass    
 test-amd64-amd64-examine-bios                                pass    
 test-amd64-amd64-xl-credit1                                  pass    
 test-arm64-arm64-xl-credit1                                  pass    
 test-armhf-armhf-xl-credit1                                  pass    
 test-amd64-amd64-xl-credit2                                  pass    
 test-arm64-arm64-xl-credit2                                  pass    
 test-armhf-armhf-xl-credit2                                  pass    
 test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict        pass    
 test-amd64-amd64-examine                                     pass    
 test-arm64-arm64-examine                                     pass    
 test-armhf-armhf-examine                                     pass    
 test-amd64-amd64-qemuu-nested-intel                          pass    
 test-amd64-amd64-xl-pvhv2-intel                              pass    
 test-amd64-amd64-dom0pvh-xl-intel                            pass    
 test-amd64-amd64-libvirt                                     pass    
 test-armhf-armhf-libvirt                                     pass    
 test-amd64-amd64-livepatch                                   pass    
 test-amd64-amd64-migrupgrade                                 pass    
 test-amd64-amd64-xl-multivcpu                                pass    
 test-armhf-armhf-xl-multivcpu                                pass    
 test-amd64-amd64-pair                                        pass    
 test-amd64-amd64-libvirt-pair                                pass    
 test-amd64-amd64-xl-pvshim                                   pass    
 test-amd64-amd64-pygrub                                      pass    
 test-amd64-amd64-libvirt-qcow2                               pass    
 test-amd64-amd64-xl-qcow2                                    pass    
 test-armhf-armhf-xl-qcow2                                    pass    
 test-amd64-amd64-libvirt-raw                                 pass    
 test-arm64-arm64-libvirt-raw                                 pass    
 test-amd64-amd64-xl-raw                                      pass    
 test-armhf-armhf-xl-raw                                      pass    
 test-amd64-amd64-xl-rtds                                     pass    
 test-armhf-armhf-xl-rtds                                     pass    
 test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow             pass    
 test-amd64-amd64-xl-shadow                                   pass    
 test-arm64-arm64-xl-thunderx                                 pass    
 test-amd64-amd64-examine-uefi                                pass    
 test-amd64-amd64-libvirt-vhd                                 pass    
 test-armhf-armhf-libvirt-vhd                                 pass    
 test-amd64-amd64-xl-vhd                                      pass    
 test-arm64-arm64-xl-vhd                                      pass    


------------------------------------------------------------
sg-report-flight on osstest.test-lab.xenproject.org
logs: /home/logs/logs
images: /home/logs/images

Logs, config files, etc. are available at
    http://logs.test-lab.xenproject.org/osstest/logs

Explanation of these reports, and of osstest in general, is at
    http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README.email;hb=master
    http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README;hb=master

Test harness code can be found at
    http://xenbits.xen.org/gitweb?p=osstest.git;a=summary


Pushing revision :

To xenbits.xen.org:/home/xen/git/xen.git
   996576b965..46aa3031ae  46aa3031ae89ac1771f4159972edab65710e7349 -> master


^ permalink raw reply	[relevance 1%]

* subscribe
@ 2024-05-11 19:00  7% A. F. Cano
  0 siblings, 0 replies; 200+ results
From: A. F. Cano @ 2024-05-11 19:00 UTC (permalink / raw)
  To: linux-media

subscribe

^ permalink raw reply	[relevance 7%]

* Re: [PATCH 0/9] drm/i915: Plane fb refactoring
  @ 2024-05-11 19:00  0%   ` Lucas De Marchi
  0 siblings, 0 replies; 200+ results
From: Lucas De Marchi @ 2024-05-11 19:00 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, intel-xe

On Fri, May 10, 2024 at 07:55:15PM GMT, Ville Syrjälä wrote:
>On Mon, May 06, 2024 at 03:57:09PM +0300, Ville Syrjala wrote:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> A bit of cleanup/refactoring around plane fb stuff.
>> This is mainly prep work for a slightly bigger rework
>> of alignment handling.
>>
>> Ville Syrjälä (9):
>>   drm/i915: Split gen2 vs. gen3 .max_stride()
>>   drm/i915: Clean up skl+ plane stride limits
>>   drm/i915: Drop 'uses_fence' parameter from intel_pin_fb_obj_dpt()
>>   drm/i915: Extract intel_plane_needs_physical()
>>   drm/i915: Polish types in fb calculations
>
>Pushed up to here. Thanks for the review.
>
>>   drm/i915: Constify 'fb' in during pinning
>>   drm/i915: Change intel_fbdev_fb_alloc() reuturn type
>>   drm/i915: Cleanup fbdev fb setup
>>   drm/i915: Rename the fb pinning functions to indicate the address
>>     space
>
>Some of the rest touch xe as well.
>
>Lucas, can you toss me an ack to merge via drm-intel-next?



Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>

thanks
Lucas De Marchi

^ permalink raw reply	[relevance 0%]

* Re: [PATCH 0/8] Update lpfc to revision 14.4.0.2
  @ 2024-05-11 18:39  1% ` Martin K. Petersen
  0 siblings, 0 replies; 200+ results
From: Martin K. Petersen @ 2024-05-11 18:39 UTC (permalink / raw)
  To: linux-scsi, Justin Tee; +Cc: Martin K . Petersen, jsmart2021, justin.tee

On Mon, 29 Apr 2024 15:15:39 -0700, Justin Tee wrote:

> Update lpfc to revision 14.4.0.2
> 
> This patch set contains updates to log messaging, a bug fix related to
> unloading of the driver, clean up patches regarding the abuse of a global
> spinlock, and support for 32 byte CDBs.
> 
> The patches were cut against Martin's 6.10/scsi-queue tree.
> 
> [...]

Applied to 6.10/scsi-queue, thanks!

[1/8] lpfc: Change default logging level for unsolicited CT MIB commands
      https://git.kernel.org/mkp/scsi/c/1db60fa05929
[2/8] lpfc: Update logging of protection type for T10 DIF I/O
      https://git.kernel.org/mkp/scsi/c/18f7761d5c6f
[3/8] lpfc: Clear deferred RSCN processing flag when driver is unloading
      https://git.kernel.org/mkp/scsi/c/bf81e9cd1767
[4/8] lpfc: Introduce rrq_list_lock to protect active_rrq_list
      https://git.kernel.org/mkp/scsi/c/5f800d72762a
[5/8] lpfc: Change lpfc_hba hba_flag member into a bitmask
      https://git.kernel.org/mkp/scsi/c/e780c9423b10
[6/8] lpfc: Add support for 32 byte CDBs
      https://git.kernel.org/mkp/scsi/c/af20bb73ac25
[7/8] lpfc: Update lpfc version to 14.4.0.2
      https://git.kernel.org/mkp/scsi/c/37a8001d7b9f
[8/8] lpfc: Copyright updates for 14.4.0.2 patches
      https://git.kernel.org/mkp/scsi/c/3f1d179f8f47

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[relevance 1%]

* Re: [regression] suspend stress test stalls within 30 minutes
  @ 2024-05-11 18:48  1% ` Borislav Petkov
  0 siblings, 0 replies; 200+ results
From: Borislav Petkov @ 2024-05-11 18:48 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Thomas Gleixner, Ingo Molnar, Dave Hansen, Rafael J. Wysocki,
	x86, linux-pm, linux-kernel, regressions, Jeff Johnson

On Sat, May 11, 2024 at 09:22:43PM +0300, Kalle Valo wrote:
> Here's the diff between broken and working .config:
> 
> $ diffconfig broken.config works.config 
> -CALL_PADDING y
> -CALL_THUNKS y
> -CALL_THUNKS_DEBUG n
> -HAVE_CALL_THUNKS y
> -MITIGATION_CALL_DEPTH_TRACKING y
> -MITIGATION_GDS_FORCE y
> -MITIGATION_IBPB_ENTRY y
> -MITIGATION_IBRS_ENTRY y
> -MITIGATION_PAGE_TABLE_ISOLATION y
> -MITIGATION_RETHUNK y
> -MITIGATION_RETPOLINE y
> -MITIGATION_RFDS y
> -MITIGATION_SLS y
> -MITIGATION_SPECTRE_BHI y
> -MITIGATION_SRSO y
> -MITIGATION_UNRET_ENTRY y
> -PREFIX_SYMBOLS y
>  CPU_MITIGATIONS y -> n

You could start turning them off one-by-one, and each time run the
reproducer and see where there's a difference.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[relevance 1%]

* Re: [GIT PULL] alpha: cleanups and build fixes for 6.10
  @ 2024-05-11 18:49  0%       ` John Paul Adrian Glaubitz
  2024-05-11 19:37  1%         ` Paul E. McKenney
  0 siblings, 1 reply; 200+ results
From: John Paul Adrian Glaubitz @ 2024-05-11 18:49 UTC (permalink / raw)
  To: paulmck
  Cc: Arnd Bergmann, Linus Torvalds, linux-kernel, Linux-Arch,
	linux-alpha, Richard Henderson, Ivan Kokshaysky, Matt Turner,
	Alexander Viro

Hi Paul,

On Fri, 2024-05-10 at 15:28 -0700, Paul E. McKenney wrote:
> > I'm still against dropping pre-EV56 so quickly without a proper phaseout period.
> > Why not wait for the next LTS release? AFAIK pre-EV56 support is not broken, is
> > it?
> 
> Sadly, yes, it is, and it has been broken in mainline for almost two
> years.

Could you elaborate what exactly is broken? I'm just trying to understand the reasoning.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[relevance 0%]

* Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround
  @ 2024-05-11 18:47  1%   ` Jonas Karlman
  2024-05-11 19:57  0%     ` Mark Kettenis
  0 siblings, 1 reply; 200+ results
From: Jonas Karlman @ 2024-05-11 18:47 UTC (permalink / raw)
  To: Alex Bee
  Cc: Kever Yang, Simon Glass, Philipp Tomsich, Tom Rini, Johan Jonker, u-boot

Hi Alex,

On 2024-05-11 19:44, Alex Bee wrote:
> Hi Jonas,
> 
> Am 11.05.24 um 13:28 schrieb Jonas Karlman:
>> This series add gpio request() and pinctrl gpio_request_enable() ops so
>> that a gpio requested pin automatically use gpio pinmux and U-Boot
>> behaves more similar to Linux kernel.
> 
> I'm not sure that's a good idea.
> While linux does it the same way, we really shouldn't expect every 
> software/os/ … which uses DT (now or in future) to implicitly switch the 
> pin function when using a pin as gpio. So the real fix would probably be 
> to add the the correct pinctrl settings to the upstream DT of those 
> boards and sync it later on (not sure those if those SoCs already using 
> OF_UPSTREAM) and leave the -u-boot.dtsi-"hack" alone for now.

I fully agree that the pinctrl for the problematic boards should be
corrected in upstream DT, but that is a separate issue and should not
block adding support for the request()/gpio_request_enable() ops.

While the pcie reset-gpios full board freeze that was my driving factor
to fully implement the gpio request() ops it is not the only use case,
using the gpio cmd on a pin that use a non-gpio pinmux is another.

Or do you see any technical issue with having the gpio request() ops
implemented and having it ensure gpio pinmux is used on a gpio requested
pin? Similar to how gpio/pinctrl is behaving in Linux and on some other
platforms in U-Boot?

Regards,
Jonas

> 
> Alex
>>
>> With the gpio and pinctrl ops implemented this series also remove a PCIe
>> reset-gpios related device lock-up workaround from board u-boot.dtsi.
>>
>> PX30, RK3066, RK3188, RK356x and RK3588 are the only SoCs that currently
>> define gpio-ranges props and is affected by this series.
>>
>> A follow up series adding support for the pinmux status cmd will also
>> add gpio-ranges props for remaining RK SoCs.
>>
>> Jonas Karlman (4):
>>    pinctrl: rockchip: Add gpio_request_enable() ops
>>    gpio: rockchip: Add request() ops
>>    rockchip: rk3568-rock-3a: Drop PCIe reset-gpios workaround
>>    rockchip: rk3568-radxa-e25: Drop PCIe reset-gpios workaround
>>
>>   arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi     | 12 -------
>>   arch/arm/dts/rk3568-rock-3a-u-boot.dtsi       | 12 -------
>>   drivers/gpio/rk_gpio.c                        | 10 ++++++
>>   .../pinctrl/rockchip/pinctrl-rockchip-core.c  | 31 +++++++++++++++++++
>>   4 files changed, 41 insertions(+), 24 deletions(-)
>>
> 


^ permalink raw reply	[relevance 1%]

* Re: [PATCH 1/2] dt-bindings: iio: dac: add docs for ad8460
  @ 2024-05-11 18:47  1%       ` David Lechner
  0 siblings, 0 replies; 200+ results
From: David Lechner @ 2024-05-11 18:47 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Mariel Tinaco, linux-iio, devicetree, linux-kernel,
	Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Liam Girdwood, Mark Brown, Michael Hennerich,
	Marcelo Schmitt, Dimitri Fedrau, Guenter Roeck

On Sat, May 11, 2024 at 11:25 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Fri, 10 May 2024 12:28:19 -0500
> David Lechner <dlechner@baylibre.com> wrote:
>
> > On Fri, May 10, 2024 at 1:42 AM Mariel Tinaco <Mariel.Tinaco@analog.com> wrote:
> > >
> > > This adds the bindings documentation for the 14-bit
> > > High Voltage, High Current, Waveform Generator
> > > Digital-to-Analog converter.
> > >
> > > Signed-off-by: Mariel Tinaco <Mariel.Tinaco@analog.com>
> > > ---
> > >  .../bindings/iio/dac/adi,ad8460.yaml          | 67 +++++++++++++++++++
> > >  MAINTAINERS                                   |  7 ++
> > >  2 files changed, 74 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad8460.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad8460.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad8460.yaml
> > > new file mode 100644
> > > index 000000000..924f76209
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad8460.yaml
> > > @@ -0,0 +1,67 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +# Copyright 2024 Analog Devices Inc.
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/dac/adi,ad8460.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Analog Devices AD8460 DAC
> > > +
> > > +maintainers:
> > > +  - Mariel Tinaco <mariel.tinaco@analog.com>
> > > +
> > > +description: |
> > > +  Analog Devices AD8460 110 V High Voltage, 1 A High Current,
> > > +  Arbitrary Waveform Generator with Integrated 14-Bit High Speed DAC
> > > +  https://www.analog.com/media/en/technical-documentation/data-sheets/ad8460.pdf
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - adi,ad8460
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  spi-max-frequency:
> > > +    maximum: 20000000
> > > +
> > > +  vref-supply:
> >
> > It would be nice to make the property name match the pin name since
> > there is more than one reference voltage input.
> >
> > refio-1p2v-supply:
> >
> > > +    description: Drive voltage in the range of 1.2V maximum to as low as
> > > +      low as 0.12V through the REF_IO pin to adjust full scale output span
> >
> > I don't seen anything in the datasheet named REF_IO. Is this a typo
> > and it should be REFIO_1P2V?
> >
> > > +
> > > +  clocks:
> > > +    description: The clock for the DAC. This is the sync clock
> > > +
> > > +  adi,rset-ohms:
> > > +    description: Specify value of external resistor connected to FS_ADJ pin
> > > +      to establish internal HVDAC's reference current I_REF
> > > +    minimum: 2000
> > > +    maximum: 20000
> > > +
> >
> > I see lots more pins on the datasheet, many of which should be trivial
> > to add bindings for (we prefer to have the bindings as complete as
> > possible even if the driver doesn't implement everything). Potential
> > candidates:
> >
> > sdn-reset-gpios: (active high)
> > reset-gpios: (active low)
> > sdn-io-gpios: (active high)
> >
> > hvcc-supply:
> > hvee-supply:
> > vcc-5v-supply:
> > vref-5v-supply:
> > dvdd-3p3v-supply:
> > avdd-3p3v-supply:
> >
> > It also looks like there is a parallel interface for data, so I would
> > expect to see an io-backends property that links to the PHY used for
> > handling that.
> >
> Ultimately yes, but the parallel interface might require some decisions on
> binding that are non obvious until it's actually implemented. So maybe
> don't need that bit from the start.  The rest I agree should be here.
>
>

Since the driver patch uses a DMA channel that isn't documented here,
I am assuming that the parallel interface is being used so we do need
to consider it now. :-)

^ permalink raw reply	[relevance 1%]

* Re: [PATCH v5 2/2] riscv: dts: starfive: visionfive-2: Fix lower rate of CPUfreq by setting PLL0 rate to 1.5GHz
  @ 2024-05-11 18:47  0%     ` Samuel Holland
  0 siblings, 0 replies; 200+ results
From: Samuel Holland @ 2024-05-11 18:47 UTC (permalink / raw)
  To: Xingyu Wu, Michael Turquette, Stephen Boyd, Conor Dooley,
	Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Hal Feng, linux-kernel,
	linux-clk, linux-riscv, devicetree

On 2024-05-07 1:53 AM, Xingyu Wu wrote:
> CPUfreq supports 4 cpu frequency loads on 375/500/750/1500MHz.
> But now PLL0 rate is 1GHz and the cpu frequency loads become
> 333/500/500/1000MHz in fact.
> 
> The PLL0 rate should be default set to 1.5GHz and set the
> cpu_core rate to 500MHz in safe.

Can this be accomplished by instead setting the CLK_SET_RATE_PARENT flag on the
CPU_CORE clock? That way PLL0 is automatically set when cpufreq tries to change
the CPU core frequency. Then there is no DT change and no compatibility issue.

Regards,
Samuel

> Fixes: e2c510d6d630 ("riscv: dts: starfive: Add cpu scaling for JH7110 SoC")
> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
> ---
>  .../boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi     | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> index 45b58b6f3df8..28981b267de4 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> @@ -390,6 +390,12 @@ spi_dev0: spi@0 {
>  	};
>  };
>  
> +&syscrg {
> +	assigned-clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>,
> +			  <&pllclk JH7110_PLLCLK_PLL0_OUT>;
> +	assigned-clock-rates = <500000000>, <1500000000>;
> +};
> +
>  &sysgpio {
>  	i2c0_pins: i2c0-0 {
>  		i2c-pins {


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[relevance 0%]

* Re: [PATCH v5 2/2] riscv: dts: starfive: visionfive-2: Fix lower rate of CPUfreq by setting PLL0 rate to 1.5GHz
@ 2024-05-11 18:47  0%     ` Samuel Holland
  0 siblings, 0 replies; 200+ results
From: Samuel Holland @ 2024-05-11 18:47 UTC (permalink / raw)
  To: Xingyu Wu, Michael Turquette, Stephen Boyd, Conor Dooley,
	Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Hal Feng, linux-kernel,
	linux-clk, linux-riscv, devicetree

On 2024-05-07 1:53 AM, Xingyu Wu wrote:
> CPUfreq supports 4 cpu frequency loads on 375/500/750/1500MHz.
> But now PLL0 rate is 1GHz and the cpu frequency loads become
> 333/500/500/1000MHz in fact.
> 
> The PLL0 rate should be default set to 1.5GHz and set the
> cpu_core rate to 500MHz in safe.

Can this be accomplished by instead setting the CLK_SET_RATE_PARENT flag on the
CPU_CORE clock? That way PLL0 is automatically set when cpufreq tries to change
the CPU core frequency. Then there is no DT change and no compatibility issue.

Regards,
Samuel

> Fixes: e2c510d6d630 ("riscv: dts: starfive: Add cpu scaling for JH7110 SoC")
> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
> ---
>  .../boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi     | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> index 45b58b6f3df8..28981b267de4 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> @@ -390,6 +390,12 @@ spi_dev0: spi@0 {
>  	};
>  };
>  
> +&syscrg {
> +	assigned-clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>,
> +			  <&pllclk JH7110_PLLCLK_PLL0_OUT>;
> +	assigned-clock-rates = <500000000>, <1500000000>;
> +};
> +
>  &sysgpio {
>  	i2c0_pins: i2c0-0 {
>  		i2c-pins {


^ permalink raw reply	[relevance 0%]

* [PATCH] ASoC: intel: Constify struct snd_soc_ops
@ 2024-05-11 18:42  1% Christophe JAILLET
  0 siblings, 0 replies; 200+ results
From: Christophe JAILLET @ 2024-05-11 18:42 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, alsa-devel,
	linux-sound

Constifying "struct snd_soc_ops" moves some data to a read-only section, so
increase overall security.

This structure is also part of scripts/const_structs.checkpatch.

As an example, on a x86_64, with allmodconfig:
Before:
   text	   data	    bss	    dec	    hex	filename
   6315	   3696	      0	  10011	   271b	sound/soc/intel/boards/ehl_rt5660.o

After:
   text	   data	    bss	    dec	    hex	filename
   6379	   3648	      0	  10027	   272b	sound/soc/intel/boards/ehl_rt5660.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.

I hope that it can be applied with this single patch because all files are
in sound/soc/intel/boards/
---
 sound/soc/intel/boards/bdw-rt5650.c                 | 2 +-
 sound/soc/intel/boards/ehl_rt5660.c                 | 2 +-
 sound/soc/intel/boards/kbl_da7219_max98357a.c       | 4 ++--
 sound/soc/intel/boards/kbl_da7219_max98927.c        | 6 +++---
 sound/soc/intel/boards/kbl_rt5660.c                 | 2 +-
 sound/soc/intel/boards/kbl_rt5663_max98927.c        | 8 ++++----
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 6 +++---
 sound/soc/intel/boards/sof_es8336.c                 | 2 +-
 sound/soc/intel/boards/sof_maxim_common.c           | 2 +-
 sound/soc/intel/boards/sof_maxim_common.h           | 2 +-
 sound/soc/intel/boards/sof_nau8825.c                | 2 +-
 sound/soc/intel/boards/sof_realtek_common.c         | 2 +-
 sound/soc/intel/boards/sof_rt5682.c                 | 2 +-
 sound/soc/intel/boards/sof_sdw_common.h             | 2 +-
 sound/soc/intel/boards/sof_sdw_rt_amp.c             | 2 +-
 sound/soc/intel/boards/sof_wm8804.c                 | 2 +-
 16 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/sound/soc/intel/boards/bdw-rt5650.c b/sound/soc/intel/boards/bdw-rt5650.c
index 3ae26f21458f..3c7cee03a02e 100644
--- a/sound/soc/intel/boards/bdw-rt5650.c
+++ b/sound/soc/intel/boards/bdw-rt5650.c
@@ -131,7 +131,7 @@ static int bdw_rt5650_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops bdw_rt5650_ops = {
+static const struct snd_soc_ops bdw_rt5650_ops = {
 	.hw_params = bdw_rt5650_hw_params,
 };
 
diff --git a/sound/soc/intel/boards/ehl_rt5660.c b/sound/soc/intel/boards/ehl_rt5660.c
index 686e60321224..26289e8fdd87 100644
--- a/sound/soc/intel/boards/ehl_rt5660.c
+++ b/sound/soc/intel/boards/ehl_rt5660.c
@@ -132,7 +132,7 @@ static int rt5660_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops rt5660_ops = {
+static const struct snd_soc_ops rt5660_ops = {
 	.hw_params = rt5660_hw_params,
 };
 
diff --git a/sound/soc/intel/boards/kbl_da7219_max98357a.c b/sound/soc/intel/boards/kbl_da7219_max98357a.c
index 9dbc15f9d1c9..154f6a74ed15 100644
--- a/sound/soc/intel/boards/kbl_da7219_max98357a.c
+++ b/sound/soc/intel/boards/kbl_da7219_max98357a.c
@@ -354,7 +354,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
 			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
 }
 
-static struct snd_soc_ops kabylake_dmic_ops = {
+static const struct snd_soc_ops kabylake_dmic_ops = {
 	.startup = kabylake_dmic_startup,
 };
 
@@ -388,7 +388,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
 					&constraints_16000);
 }
 
-static struct snd_soc_ops skylake_refcap_ops = {
+static const struct snd_soc_ops skylake_refcap_ops = {
 	.startup = kabylake_refcap_startup,
 };
 
diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c
index e662da5af83b..02ed77a07e23 100644
--- a/sound/soc/intel/boards/kbl_da7219_max98927.c
+++ b/sound/soc/intel/boards/kbl_da7219_max98927.c
@@ -288,7 +288,7 @@ static int kabylake_ssp0_trigger(struct snd_pcm_substream *substream, int cmd)
 	return 0;
 }
 
-static struct snd_soc_ops kabylake_ssp0_ops = {
+static const struct snd_soc_ops kabylake_ssp0_ops = {
 	.hw_params = kabylake_ssp0_hw_params,
 	.trigger = kabylake_ssp0_trigger,
 };
@@ -535,7 +535,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
 			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
 }
 
-static struct snd_soc_ops kabylake_dmic_ops = {
+static const struct snd_soc_ops kabylake_dmic_ops = {
 	.startup = kabylake_dmic_startup,
 };
 
@@ -569,7 +569,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
 }
 
 
-static struct snd_soc_ops skylake_refcap_ops = {
+static const struct snd_soc_ops skylake_refcap_ops = {
 	.startup = kabylake_refcap_startup,
 };
 
diff --git a/sound/soc/intel/boards/kbl_rt5660.c b/sound/soc/intel/boards/kbl_rt5660.c
index 894d127c482a..66885cb36f24 100644
--- a/sound/soc/intel/boards/kbl_rt5660.c
+++ b/sound/soc/intel/boards/kbl_rt5660.c
@@ -277,7 +277,7 @@ static int kabylake_rt5660_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops kabylake_rt5660_ops = {
+static const struct snd_soc_ops kabylake_rt5660_ops = {
 	.hw_params = kabylake_rt5660_hw_params,
 };
 
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index e16c42e81eca..9da89436a917 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -489,7 +489,7 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops kabylake_rt5663_ops = {
+static const struct snd_soc_ops kabylake_rt5663_ops = {
 	.hw_params = kabylake_rt5663_hw_params,
 };
 
@@ -539,7 +539,7 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops kabylake_ssp0_ops = {
+static const struct snd_soc_ops kabylake_ssp0_ops = {
 	.hw_params = kabylake_ssp0_hw_params,
 };
 
@@ -575,7 +575,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
 			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
 }
 
-static struct snd_soc_ops kabylake_dmic_ops = {
+static const struct snd_soc_ops kabylake_dmic_ops = {
 	.startup = kabylake_dmic_startup,
 };
 
@@ -609,7 +609,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
 				&constraints_16000);
 }
 
-static struct snd_soc_ops skylake_refcap_ops = {
+static const struct snd_soc_ops skylake_refcap_ops = {
 	.startup = kabylake_refcap_startup,
 };
 
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index a9501cd106ff..a32ce8f972f3 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -424,7 +424,7 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops kabylake_rt5663_ops = {
+static const struct snd_soc_ops kabylake_rt5663_ops = {
 	.hw_params = kabylake_rt5663_hw_params,
 };
 
@@ -469,7 +469,7 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops kabylake_ssp0_ops = {
+static const struct snd_soc_ops kabylake_ssp0_ops = {
 	.hw_params = kabylake_ssp0_hw_params,
 };
 
@@ -508,7 +508,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
 			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
 }
 
-static struct snd_soc_ops kabylake_dmic_ops = {
+static const struct snd_soc_ops kabylake_dmic_ops = {
 	.startup = kabylake_dmic_startup,
 };
 
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index c1fcc156a575..2a88efaa6d26 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -371,7 +371,7 @@ static int sof_es8336_hw_params(struct snd_pcm_substream *substream,
 }
 
 /* machine stream operations */
-static struct snd_soc_ops sof_es8336_ops = {
+static const struct snd_soc_ops sof_es8336_ops = {
 	.hw_params = sof_es8336_hw_params,
 	.trigger = sof_8336_trigger,
 };
diff --git a/sound/soc/intel/boards/sof_maxim_common.c b/sound/soc/intel/boards/sof_maxim_common.c
index 7e1f485dce7a..f49354193f13 100644
--- a/sound/soc/intel/boards/sof_maxim_common.c
+++ b/sound/soc/intel/boards/sof_maxim_common.c
@@ -141,7 +141,7 @@ int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
 }
 EXPORT_SYMBOL_NS(max_98373_trigger, SND_SOC_INTEL_SOF_MAXIM_COMMON);
 
-struct snd_soc_ops max_98373_ops = {
+const struct snd_soc_ops max_98373_ops = {
 	.hw_params = max_98373_hw_params,
 	.trigger = max_98373_trigger,
 };
diff --git a/sound/soc/intel/boards/sof_maxim_common.h b/sound/soc/intel/boards/sof_maxim_common.h
index 8886f985de68..638fba0b43bc 100644
--- a/sound/soc/intel/boards/sof_maxim_common.h
+++ b/sound/soc/intel/boards/sof_maxim_common.h
@@ -21,7 +21,7 @@
 #define MAX_98373_DEV1_NAME	"i2c-" MAX_98373_ACPI_HID ":01"
 
 extern struct snd_soc_dai_link_component max_98373_components[2];
-extern struct snd_soc_ops max_98373_ops;
+extern const struct snd_soc_ops max_98373_ops;
 extern const struct snd_soc_dapm_route max_98373_dapm_routes[];
 
 int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
diff --git a/sound/soc/intel/boards/sof_nau8825.c b/sound/soc/intel/boards/sof_nau8825.c
index dd4dc4ec4255..5e781c45d51a 100644
--- a/sound/soc/intel/boards/sof_nau8825.c
+++ b/sound/soc/intel/boards/sof_nau8825.c
@@ -115,7 +115,7 @@ static int sof_nau8825_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops sof_nau8825_ops = {
+static const struct snd_soc_ops sof_nau8825_ops = {
 	.hw_params = sof_nau8825_hw_params,
 };
 
diff --git a/sound/soc/intel/boards/sof_realtek_common.c b/sound/soc/intel/boards/sof_realtek_common.c
index 6915ff8b8716..af1654f6d551 100644
--- a/sound/soc/intel/boards/sof_realtek_common.c
+++ b/sound/soc/intel/boards/sof_realtek_common.c
@@ -499,7 +499,7 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops rt1015_ops = {
+static const struct snd_soc_ops rt1015_ops = {
 	.hw_params = rt1015_hw_params,
 };
 
diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index e3a2ec6b4c7c..ced5661d882a 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -406,7 +406,7 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static struct snd_soc_ops sof_rt5682_ops = {
+static const struct snd_soc_ops sof_rt5682_ops = {
 	.hw_params = sof_rt5682_hw_params,
 };
 
diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h
index 94657dd210f5..cc749c8becc0 100644
--- a/sound/soc/intel/boards/sof_sdw_common.h
+++ b/sound/soc/intel/boards/sof_sdw_common.h
@@ -165,7 +165,7 @@ int sof_sdw_rt_sdca_jack_init(struct snd_soc_card *card,
 int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);
 
 /* RT1308 I2S support */
-extern struct snd_soc_ops sof_sdw_rt1308_i2s_ops;
+extern const struct snd_soc_ops sof_sdw_rt1308_i2s_ops;
 
 /* generic amp support */
 int sof_sdw_rt_amp_init(struct snd_soc_card *card,
diff --git a/sound/soc/intel/boards/sof_sdw_rt_amp.c b/sound/soc/intel/boards/sof_sdw_rt_amp.c
index 1b415708500e..434e59624f69 100644
--- a/sound/soc/intel/boards/sof_sdw_rt_amp.c
+++ b/sound/soc/intel/boards/sof_sdw_rt_amp.c
@@ -259,7 +259,7 @@ static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream,
 }
 
 /* machine stream operations */
-struct snd_soc_ops sof_sdw_rt1308_i2s_ops = {
+const struct snd_soc_ops sof_sdw_rt1308_i2s_ops = {
 	.hw_params = rt1308_i2s_hw_params,
 };
 
diff --git a/sound/soc/intel/boards/sof_wm8804.c b/sound/soc/intel/boards/sof_wm8804.c
index 4cb0d463bf40..b2d02cc92a6a 100644
--- a/sound/soc/intel/boards/sof_wm8804.c
+++ b/sound/soc/intel/boards/sof_wm8804.c
@@ -148,7 +148,7 @@ static int sof_wm8804_hw_params(struct snd_pcm_substream *substream,
 }
 
 /* machine stream operations */
-static struct snd_soc_ops sof_wm8804_ops = {
+static const struct snd_soc_ops sof_wm8804_ops = {
 	.hw_params = sof_wm8804_hw_params,
 };
 
-- 
2.45.0


^ permalink raw reply related	[relevance 1%]

* Re: [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  2024-05-11 18:26  1% ` [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()' Linus Torvalds
@ 2024-05-11 18:42  1%   ` Linus Torvalds
  2024-05-11 19:28  1%     ` Al Viro
  2024-05-11 20:02  7%     ` [PATCH v2] " Linus Torvalds
  2024-05-11 19:24  0%   ` [PATCH] " Al Viro
  1 sibling, 2 replies; 200+ results
From: Linus Torvalds @ 2024-05-11 18:42 UTC (permalink / raw)
  To: torvalds
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, viro, walters,
	wangkai86, willy

On Sat, 11 May 2024 at 11:29, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Reorganize the code trivially to just have a separate success path,
> which simplifies the code (since 'd_delete_notify()' is only called in
> the success path anyway) and makes it trivial to just move the dentry
> shrinking outside the inode lock.

Bah.

I think this might need more work.

The *caller* of vfs_rmdir() also holds a lock, ie we have do_rmdir() doing

        inode_lock_nested(path.dentry->d_inode, I_MUTEX_PARENT);
        dentry = lookup_one_qstr_excl(&last, path.dentry, lookup_flags);
        ...
        error = vfs_rmdir(mnt_idmap(path.mnt), path.dentry->d_inode, dentry);
        dput(dentry);
        inode_unlock(path.dentry->d_inode);

so we have another level of locking going on, and my patch only moved
the dcache pruning outside the lock of the directory we're removing
(not outside the lock of the directory that contains the removed
directory).

And that outside lock is the much more important one, I bet.

So I still think this approach may be the right one, but that patch of
mine didn't go far enough.

Sadly, while do_rmdir() itself is trivial to fix up to do this, we
have several other users of vfs_rmdir() (ecryptfs, devtmpfs, overlayfs
in addition to nfsd and ksmbd), so the more complete patch would be
noticeably bigger.

My bad.

                  Linus

^ permalink raw reply	[relevance 1%]

* Re: [PATCH RFC v2 8/8] iio: adc: ad7944: add support for SPI offload
  @ 2024-05-11 18:41  1%     ` David Lechner
  0 siblings, 0 replies; 200+ results
From: David Lechner @ 2024-05-11 18:41 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Nuno Sá,
	Michael Hennerich, Lars-Peter Clausen, David Jander,
	Martin Sperl, linux-spi, devicetree, linux-kernel, linux-iio

On Sat, May 11, 2024 at 11:58 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Fri, 10 May 2024 19:44:31 -0500
> David Lechner <dlechner@baylibre.com> wrote:
>
> > This adds support for SPI offload to the ad7944 driver. This allows
> > reading data at the max sample rate of 2.5 MSPS.
> >
> > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > ---
> >
> > v2 changes:
> >
> > In the previous version, there was a new separate driver for the PWM
> > trigger and DMA hardware buffer. This was deemed too complex so they
> > are moved into the ad7944 driver.
> >
> > It has also been reworked to accommodate for the changes described in
> > the other patches.
> >
> > RFC: This isn't very polished yet, just FYI. A few things to sort out:
> >
> > Rather than making the buffer either triggered buffer or hardware buffer,
> > I'm considering allowing both, e.g. buffer0 will always be the triggered
> > buffer and buffer1 will will be the hardware buffer if connected to a SPI
> > controller with offload support, otherwise buffer1 is absent. But since
> > multiple buffers haven't been used much so far, more investigation is
> > needed to see how that would work in practice. If we do that though, then
> > we would always have the sampling_frequency attribute though even though
> > it only applies to one buffer.
>
> Why would someone who has this nice IP in the path want the conventional
> triggered buffer?  I'm not against the two buffer option, but I'd like to know
> the reasoning not to just provide the hardware buffer if this SPI offload
> is available.
>
> I can conjecture reasons but would like you to write them out for me :)
> This feels like if someone has paid for the expensive hardware they probably
> only want the best performance.
>

For me, it was more of a question of if we need to keep the userspace
interface consistent between both with or without offload support. But
if you are happy with it this way where we have only one or the other,
it is less work for me. :-)

^ permalink raw reply	[relevance 1%]

* Re: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
  @ 2024-05-11 18:36  1% ` kernel test robot
  2024-05-11 19:18  1% ` kernel test robot
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 200+ results
From: kernel test robot @ 2024-05-11 18:36 UTC (permalink / raw)
  To: Yasin Lee, jic23
  Cc: oe-kbuild-all, lars, swboyd, nuno.a, andy.shevchenko,
	u.kleine-koenig, linux-iio, linux-kernel, yasin.lee.x,
	yasin.lee.x

Hi Yasin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.9-rc7 next-20240510]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yasin-Lee/iio-proximity-hx9031as-Add-TYHX-HX9031AS-HX9023S-sensor-driver/20240510-173839
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/SN7PR12MB8101EDFA7F91A59761095A28A4E72%40SN7PR12MB8101.namprd12.prod.outlook.com
patch subject: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver
config: openrisc-allmodconfig (https://download.01.org/0day-ci/archive/20240512/202405120249.yMpobA26-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120249.yMpobA26-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120249.yMpobA26-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/iio/proximity/hx9031as.c: In function 'hx9031as_dump_show':
>> drivers/iio/proximity/hx9031as.c:1497:1: warning: the frame size of 1044 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    1497 | }
         | ^


vim +1497 drivers/iio/proximity/hx9031as.c

  1477	
  1478	static ssize_t hx9031as_dump_show(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)
  1479	{
  1480		int ret = -1;
  1481		uint8_t rx_buf[1] = {0};
  1482		char buf[BUF_SIZE * 2] = {0};
  1483		char *p = buf;
  1484		int ii = 0;
  1485	
  1486		for (ii = 0; ii < ARRAY_SIZE(hx9031as_reg_init_list); ii++) {
  1487			ret = hx9031as_read(hx9031as_reg_init_list[ii].addr, rx_buf, 1);
  1488			if (ret != 0)
  1489				PRINT_ERR("hx9031as_read failed\n");
  1490			PRINT_INF("0x%02X=0x%02X\n", hx9031as_reg_init_list[ii].addr, rx_buf[0]);
  1491			p += snprintf(p, PAGE_SIZE, "0x%02X=0x%02X\n", hx9031as_reg_init_list[ii].addr, rx_buf[0]);
  1492		}
  1493	
  1494		p += snprintf(p, PAGE_SIZE, "driver version:%s\n", HX9031AS_DRIVER_VER);
  1495	
  1496		return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));
> 1497	}
  1498	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[relevance 1%]

* Re: [Buildroot] [PATCH v2 00/20] package/kodi: bump version to 21.0-Omega
  @ 2024-05-11 18:30  1% ` Yann E. MORIN
  0 siblings, 0 replies; 200+ results
From: Yann E. MORIN @ 2024-05-11 18:30 UTC (permalink / raw)
  To: Bernd Kuhls
  Cc: Mahyar Koshkouei, Romain Naour, Samuel Martin, Woodrow Douglass,
	Julien Corjon, buildroot, Giulio Benetti, Fabrice Fontaine

Bernd, All,

On 2024-04-07 13:44 +0200, Bernd Kuhls spake thusly:
> this is v2 of the patch series to bump Kodi to its latest version.
[--SNIP--]

While testing the udfread fixup patch, I stumbled on another build
error:

    $ cat defconfig
    BR2_aarch64=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
    BR2_PER_PACKAGE_DIRECTORIES=y
    BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
    BR2_PACKAGE_KODI=y
    BR2_PACKAGE_MESA3D=y
    BR2_PACKAGE_MESA3D_OSMESA_GALLIUM=y
    BR2_PACKAGE_MESA3D_OPENGL_EGL=y
    BR2_PACKAGE_MESA3D_OPENGL_ES=y
    BR2_PACKAGE_PYTHON3=y
    BR2_PACKAGE_PYTHON3_PY_PYC=y

    $ make kodi
    [--SNIP--]
      CCLD     libdvdread.la
    libtool: warning: library '/home/ymorin/dev/buildroot/O/master/per-package/kodi/host/opt/ext-toolchain/aarch64-buildroot-linux-gnu/lib64/libatomic.la' was moved.
    /usr/bin/grep: /builds/buildroot.org/toolchains-builder/build/aarch64--glibc--bleeding-edge-2024.02-1/aarch64-buildroot-linux-gnu/lib/../lib64/libatomic.la: No such file or directory
    /usr/bin/sed: can't read /builds/buildroot.org/toolchains-builder/build/aarch64--glibc--bleeding-edge-2024.02-1/aarch64-buildroot-linux-gnu/lib/../lib64/libatomic.la: No such file or directory
    libtool:   error: '/builds/buildroot.org/toolchains-builder/build/aarch64--glibc--bleeding-edge-2024.02-1/aarch64-buildroot-linux-gnu/lib/../lib64/libatomic.la' is not a valid libtool archive
    make[6]: *** [Makefile:533: libdvdread.la] Error 1
    make[5]: *** [Makefile:422: all] Error 2
    make[4]: *** [CMakeFiles/libdvdread.dir/build.make:86: build/libdvdread/src/libdvdread-stamp/libdvdread-build] Error 2
    make[3]: *** [CMakeFiles/Makefile2:4641: CMakeFiles/libdvdread.dir/all] Error 2
    make[2]: *** [Makefile:136: all] Error 2
    make[1]: *** [package/pkg-generic.mk:283: /home/ymorin/dev/buildroot/O/master/build/kodi-21.0-Omega/.stamp_built] Error 2
    make: *** [Makefile:23: _all] Error 2

Could you also look at this, please?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[relevance 1%]

* [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
  @ 2024-05-11 18:26  1% ` Linus Torvalds
  2024-05-11 18:42  1%   ` Linus Torvalds
  2024-05-11 19:24  0%   ` [PATCH] " Al Viro
  0 siblings, 2 replies; 200+ results
From: Linus Torvalds @ 2024-05-11 18:26 UTC (permalink / raw)
  To: torvalds
  Cc: brauner, jack, laoar.shao, linux-fsdevel, longman, viro, walters,
	wangkai86, willy

Yafang Shao reports that he has seen loads that generate billions of
negative dentries in a directory, which then when the directory is
removed causes excessive latencies for other users because the dentry
shrinking is done under the directory inode lock.

There seems to be no actual reason for holding the inode lock any more
by the time we get rid of the now uninteresting negative dentries, and
it's an effect of just code layout (the shared error path).

Reorganize the code trivially to just have a separate success path,
which simplifies the code (since 'd_delete_notify()' is only called in
the success path anyway) and makes it trivial to just move the dentry
shrinking outside the inode lock.

Reported-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/all/20240511022729.35144-1-laoar.shao@gmail.com/
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Waiman Long <longman@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

Ok, this is the same patch, just with a commit message.  And I actually
am running a kernel with that patch, so it compiles and boots.

Very limited testing: I created a directory with ten million negative
dentries, and then did a "rmdir" in one terminal window while doing a
"ls" inside that directory in another to kind of reproduce (on a smaller
scale) what Yafang was reporting. 

The "ls" was not affected at all.  But honestly, this was *ONE* single
trivial test, so it's almost completely worthless. 

 fs/namei.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 28e62238346e..474b1ee3266d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4217,16 +4217,19 @@ int vfs_rmdir(struct mnt_idmap *idmap, struct inode *dir,
 	if (error)
 		goto out;
 
-	shrink_dcache_parent(dentry);
 	dentry->d_inode->i_flags |= S_DEAD;
 	dont_mount(dentry);
 	detach_mounts(dentry);
+	inode_unlock(dentry->d_inode);
+
+	shrink_dcache_parent(dentry);
+	dput(dentry);
+	d_delete_notify(dir, dentry);
+	return 0;
 
 out:
 	inode_unlock(dentry->d_inode);
 	dput(dentry);
-	if (!error)
-		d_delete_notify(dir, dentry);
 	return error;
 }
 EXPORT_SYMBOL(vfs_rmdir);
-- 
2.44.0.330.g4d18c88175


^ permalink raw reply related	[relevance 1%]

* [PATCH v11 04/10] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
                   ` (2 preceding siblings ...)
  2024-05-11 18:22  1% ` [PATCH v11 03/10] virtio-gpu: Support context-init feature with virglrenderer Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 05/10] virtio-gpu: Add virgl resource management Dmitry Osipenko
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

The udmabuf usage is mandatory when virgl is disabled and blobs feature
enabled in the Qemu machine configuration. If virgl and blobs are enabled,
then udmabuf requirement is optional. Since udmabuf isn't widely supported
by a popular Linux distros today, let's relax the udmabuf requirement for
blobs=on,virgl=on. Now, a full-featured virtio-gpu acceleration is
available to Qemu users without a need to have udmabuf available in the
system.

Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Antonio Caggiano <quic_acaggian@quicinc.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index ae831b6b3e3e..dac272ecadb1 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1472,6 +1472,7 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp)
 
     if (virtio_gpu_blob_enabled(g->parent_obj.conf)) {
         if (!virtio_gpu_rutabaga_enabled(g->parent_obj.conf) &&
+            !virtio_gpu_virgl_enabled(g->parent_obj.conf) &&
             !virtio_gpu_have_udmabuf()) {
             error_setg(errp, "need rutabaga or udmabuf for blob resources");
             return;
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 02/10] virtio-gpu: Use pkgconfig version to decide which virgl features are available
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 01/10] virtio-gpu: Unrealize GL device Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 03/10] virtio-gpu: Support context-init feature with virglrenderer Dmitry Osipenko
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

New virglrerenderer features were stabilized with release of v1.0.0.
Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility
with pre-release development versions of libvirglerender. Use virglrenderer
version to decide reliably which virgl features are available.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 meson.build | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index 83ae4347c7f9..ca2798dbac37 100644
--- a/meson.build
+++ b/meson.build
@@ -2286,11 +2286,8 @@ config_host_data.set('CONFIG_PNG', png.found())
 config_host_data.set('CONFIG_VNC', vnc.found())
 config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
 config_host_data.set('CONFIG_VNC_SASL', sasl.found())
-if virgl.found()
-  config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT',
-                       cc.has_member('struct virgl_renderer_resource_info_ext', 'd3d_tex2d',
-                                     prefix: '#include <virglrenderer.h>',
-                                     dependencies: virgl))
+if virgl.version().version_compare('>=1.0.0')
+  config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', 1)
 endif
 config_host_data.set('CONFIG_VIRTFS', have_virtfs)
 config_host_data.set('CONFIG_VTE', vte.found())
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 06/10] virtio-gpu: Support blob scanout using dmabuf fd
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
                   ` (4 preceding siblings ...)
  2024-05-11 18:22  1% ` [PATCH v11 05/10] virtio-gpu: Add virgl resource management Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 07/10] virtio-gpu: Support suspension of commands processing Dmitry Osipenko
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

From: Robert Beckett <bob.beckett@collabora.com>

Support displaying blob resources by handling SET_SCANOUT_BLOB
command.

Signed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Antonio Caggiano <quic_acaggian@quicinc.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu-virgl.c  | 109 +++++++++++++++++++++++++++++++++
 hw/display/virtio-gpu.c        |  12 ++--
 include/hw/virtio/virtio-gpu.h |   7 +++
 meson.build                    |   1 +
 4 files changed, 123 insertions(+), 6 deletions(-)

diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index c6c63ca1c373..524f15220b7f 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -17,6 +17,8 @@
 #include "trace.h"
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-gpu.h"
+#include "hw/virtio/virtio-gpu-bswap.h"
+#include "hw/virtio/virtio-gpu-pixman.h"
 
 #include "ui/egl-helpers.h"
 
@@ -78,6 +80,7 @@ static void virgl_cmd_create_resource_2d(VirtIOGPU *g,
     res->base.height = c2d.height;
     res->base.format = c2d.format;
     res->base.resource_id = c2d.resource_id;
+    res->base.dmabuf_fd = -1;
     QTAILQ_INSERT_HEAD(&g->reslist, &res->base, next);
 
     args.handle = c2d.resource_id;
@@ -125,6 +128,7 @@ static void virgl_cmd_create_resource_3d(VirtIOGPU *g,
     res->base.height = c3d.height;
     res->base.format = c3d.format;
     res->base.resource_id = c3d.resource_id;
+    res->base.dmabuf_fd = -1;
     QTAILQ_INSERT_HEAD(&g->reslist, &res->base, next);
 
     args.handle = c3d.resource_id;
@@ -509,6 +513,106 @@ static void virgl_cmd_get_capset(VirtIOGPU *g,
     g_free(resp);
 }
 
+#ifdef HAVE_VIRGL_RESOURCE_BLOB
+static void virgl_cmd_set_scanout_blob(VirtIOGPU *g,
+                                       struct virtio_gpu_ctrl_command *cmd)
+{
+    struct virtio_gpu_framebuffer fb = { 0 };
+    struct virgl_renderer_resource_info info;
+    struct virtio_gpu_virgl_resource *res;
+    struct virtio_gpu_set_scanout_blob ss;
+    uint64_t fbend;
+
+    VIRTIO_GPU_FILL_CMD(ss);
+    virtio_gpu_scanout_blob_bswap(&ss);
+    trace_virtio_gpu_cmd_set_scanout_blob(ss.scanout_id, ss.resource_id,
+                                          ss.r.width, ss.r.height, ss.r.x,
+                                          ss.r.y);
+
+    if (ss.scanout_id >= g->parent_obj.conf.max_outputs) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: illegal scanout id specified %d",
+                      __func__, ss.scanout_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID;
+        return;
+    }
+
+    if (ss.resource_id == 0) {
+        virtio_gpu_disable_scanout(g, ss.scanout_id);
+        return;
+    }
+
+    if (ss.width < 16 ||
+        ss.height < 16 ||
+        ss.r.x + ss.r.width > ss.width ||
+        ss.r.y + ss.r.height > ss.height) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: illegal scanout %d bounds for"
+                      " resource %d, rect (%d,%d)+%d,%d, fb %d %d\n",
+                      __func__, ss.scanout_id, ss.resource_id,
+                      ss.r.x, ss.r.y, ss.r.width, ss.r.height,
+                      ss.width, ss.height);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
+        return;
+    }
+
+    res = virtio_gpu_virgl_find_resource(g, ss.resource_id);
+    if (!res) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource does not exist %d\n",
+                      __func__, ss.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+    if (virgl_renderer_resource_get_info(ss.resource_id, &info)) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource does not have info %d\n",
+                      __func__, ss.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+    if (res->base.dmabuf_fd < 0) {
+        res->base.dmabuf_fd = info.fd;
+    }
+    if (res->base.dmabuf_fd < 0) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource not backed by dmabuf %d\n",
+                      __func__, ss.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    fb.format = virtio_gpu_get_pixman_format(ss.format);
+    if (!fb.format) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: pixel format not supported %d\n",
+                      __func__, ss.format);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
+        return;
+    }
+
+    fb.bytes_pp = DIV_ROUND_UP(PIXMAN_FORMAT_BPP(fb.format), 8);
+    fb.width = ss.width;
+    fb.height = ss.height;
+    fb.stride = ss.strides[0];
+    fb.offset = ss.offsets[0] + ss.r.x * fb.bytes_pp + ss.r.y * fb.stride;
+
+    fbend = fb.offset;
+    fbend += fb.stride * (ss.r.height - 1);
+    fbend += fb.bytes_pp * ss.r.width;
+    if (fbend > res->base.blob_size) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: fb end out of range\n",
+                      __func__);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
+        return;
+    }
+
+    g->parent_obj.enable = 1;
+    if (virtio_gpu_update_dmabuf(g, ss.scanout_id, &res->base, &fb, &ss.r)) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: failed to update dmabuf\n",
+                      __func__);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
+        return;
+    }
+
+    virtio_gpu_update_scanout(g, ss.scanout_id, &res->base, &fb, &ss.r);
+}
+#endif /* HAVE_VIRGL_RESOURCE_BLOB */
+
 void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
                                       struct virtio_gpu_ctrl_command *cmd)
 {
@@ -575,6 +679,11 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
     case VIRTIO_GPU_CMD_GET_EDID:
         virtio_gpu_get_edid(g, cmd);
         break;
+#ifdef HAVE_VIRGL_RESOURCE_BLOB
+    case VIRTIO_GPU_CMD_SET_SCANOUT_BLOB:
+        virgl_cmd_set_scanout_blob(g, cmd);
+        break;
+#endif /* HAVE_VIRGL_RESOURCE_BLOB */
     default:
         cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
         break;
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index dac272ecadb1..1e57a53d346c 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -380,7 +380,7 @@ static void virtio_gpu_resource_create_blob(VirtIOGPU *g,
     QTAILQ_INSERT_HEAD(&g->reslist, res, next);
 }
 
-static void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id)
+void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id)
 {
     struct virtio_gpu_scanout *scanout = &g->parent_obj.scanout[scanout_id];
     struct virtio_gpu_simple_resource *res;
@@ -597,11 +597,11 @@ static void virtio_unref_resource(pixman_image_t *image, void *data)
     pixman_image_unref(data);
 }
 
-static void virtio_gpu_update_scanout(VirtIOGPU *g,
-                                      uint32_t scanout_id,
-                                      struct virtio_gpu_simple_resource *res,
-                                      struct virtio_gpu_framebuffer *fb,
-                                      struct virtio_gpu_rect *r)
+void virtio_gpu_update_scanout(VirtIOGPU *g,
+                               uint32_t scanout_id,
+                               struct virtio_gpu_simple_resource *res,
+                               struct virtio_gpu_framebuffer *fb,
+                               struct virtio_gpu_rect *r)
 {
     struct virtio_gpu_simple_resource *ores;
     struct virtio_gpu_scanout *scanout;
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index b657187159d9..ba36497c477f 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -329,6 +329,13 @@ int virtio_gpu_update_dmabuf(VirtIOGPU *g,
                              struct virtio_gpu_framebuffer *fb,
                              struct virtio_gpu_rect *r);
 
+void virtio_gpu_update_scanout(VirtIOGPU *g,
+                               uint32_t scanout_id,
+                               struct virtio_gpu_simple_resource *res,
+                               struct virtio_gpu_framebuffer *fb,
+                               struct virtio_gpu_rect *r);
+void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id);
+
 /* virtio-gpu-3d.c */
 void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
                                   struct virtio_gpu_ctrl_command *cmd);
diff --git a/meson.build b/meson.build
index 5448eb17f39b..0433ea200dd7 100644
--- a/meson.build
+++ b/meson.build
@@ -2289,6 +2289,7 @@ config_host_data.set('CONFIG_VNC_SASL', sasl.found())
 if virgl.version().version_compare('>=1.0.0')
   config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', 1)
   config_host_data.set('HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS', 1)
+  config_host_data.set('HAVE_VIRGL_RESOURCE_BLOB', 1)
 endif
 config_host_data.set('CONFIG_VIRTFS', have_virtfs)
 config_host_data.set('CONFIG_VTE', vte.found())
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 07/10] virtio-gpu: Support suspension of commands processing
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
                   ` (5 preceding siblings ...)
  2024-05-11 18:22  1% ` [PATCH v11 06/10] virtio-gpu: Support blob scanout using dmabuf fd Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 08/10] virtio-gpu: Handle resource blob commands Dmitry Osipenko
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

Check whether command processing has been finished; otherwise, stop
processing commands and retry the command again next time. This allows
us to support asynchronous execution of non-fenced commands needed for
unmapping host blobs safely.

Suggested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 1e57a53d346c..6c8c7213bafa 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1054,6 +1054,11 @@ void virtio_gpu_process_cmdq(VirtIOGPU *g)
         /* process command */
         vgc->process_cmd(g, cmd);
 
+        /* command suspended */
+        if (!cmd->finished && !(cmd->cmd_hdr.flags & VIRTIO_GPU_FLAG_FENCE)) {
+            break;
+        }
+
         QTAILQ_REMOVE(&g->cmdq, cmd, next);
         if (virtio_gpu_stats_enabled(g->parent_obj.conf)) {
             g->stats.requests++;
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 09/10] virtio-gpu: Register capsets dynamically
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
                   ` (7 preceding siblings ...)
  2024-05-11 18:22  1% ` [PATCH v11 08/10] virtio-gpu: Handle resource blob commands Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 10/10] virtio-gpu: Support Venus context Dmitry Osipenko
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>

virtio_gpu_virgl_get_num_capsets will return "num_capsets", but we can't
assume that capset_index 1 is always VIRGL2 once we'll support more capsets,
like Venus and DRM capsets. Register capsets dynamically to avoid that problem.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu-gl.c     |  6 ++++--
 hw/display/virtio-gpu-virgl.c  | 33 +++++++++++++++++++++------------
 include/hw/virtio/virtio-gpu.h |  4 +++-
 3 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index 95806999189e..431fc2881a00 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -124,8 +124,8 @@ static void virtio_gpu_gl_device_realize(DeviceState *qdev, Error **errp)
     }
 
     g->parent_obj.conf.flags |= (1 << VIRTIO_GPU_FLAG_VIRGL_ENABLED);
-    VIRTIO_GPU_BASE(g)->virtio_config.num_capsets =
-        virtio_gpu_virgl_get_num_capsets(g);
+    g->capset_ids = virtio_gpu_virgl_get_capsets(g);
+    VIRTIO_GPU_BASE(g)->virtio_config.num_capsets = g->capset_ids->len;
 
 #ifdef HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS
     g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED;
@@ -148,6 +148,8 @@ static void virtio_gpu_gl_device_unrealize(DeviceState *qdev)
     if (gl->renderer_inited) {
         virtio_gpu_virgl_deinit(g);
     }
+
+    g_array_unref(g->capset_ids);
 }
 
 static void virtio_gpu_gl_class_init(ObjectClass *klass, void *data)
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 3f2e406be3a4..135974431492 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -590,19 +590,13 @@ static void virgl_cmd_get_capset_info(VirtIOGPU *g,
     VIRTIO_GPU_FILL_CMD(info);
 
     memset(&resp, 0, sizeof(resp));
-    if (info.capset_index == 0) {
-        resp.capset_id = VIRTIO_GPU_CAPSET_VIRGL;
-        virgl_renderer_get_cap_set(resp.capset_id,
-                                   &resp.capset_max_version,
-                                   &resp.capset_max_size);
-    } else if (info.capset_index == 1) {
-        resp.capset_id = VIRTIO_GPU_CAPSET_VIRGL2;
+
+    if (info.capset_index < g->capset_ids->len) {
+        resp.capset_id = g_array_index(g->capset_ids, uint32_t,
+                                       info.capset_index);
         virgl_renderer_get_cap_set(resp.capset_id,
                                    &resp.capset_max_version,
                                    &resp.capset_max_size);
-    } else {
-        resp.capset_max_version = 0;
-        resp.capset_max_size = 0;
     }
     resp.hdr.type = VIRTIO_GPU_RESP_OK_CAPSET_INFO;
     virtio_gpu_ctrl_response(g, cmd, &resp.hdr, sizeof(resp));
@@ -1123,14 +1117,29 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
     return 0;
 }
 
-int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
+static void virtio_gpu_virgl_add_capset(GArray *capset_ids, uint32_t capset_id)
+{
+    g_array_append_val(capset_ids, capset_id);
+}
+
+GArray *virtio_gpu_virgl_get_capsets(VirtIOGPU *g)
 {
     uint32_t capset2_max_ver, capset2_max_size;
+    GArray *capset_ids;
+
+    capset_ids = g_array_new(false, false, sizeof(uint32_t));
+
+    /* VIRGL is always supported. */
+    virtio_gpu_virgl_add_capset(capset_ids, VIRTIO_GPU_CAPSET_VIRGL);
+
     virgl_renderer_get_cap_set(VIRTIO_GPU_CAPSET_VIRGL2,
                               &capset2_max_ver,
                               &capset2_max_size);
+    if (capset2_max_ver) {
+        virtio_gpu_virgl_add_capset(capset_ids, VIRTIO_GPU_CAPSET_VIRGL2);
+    }
 
-    return capset2_max_ver ? 2 : 1;
+    return capset_ids;
 }
 
 void virtio_gpu_virgl_deinit(VirtIOGPU *g)
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index c0b0b0eac08b..7bbc6ef268eb 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -212,6 +212,8 @@ struct VirtIOGPU {
     } dmabuf;
 
     QEMUBH *cmdq_resume_bh;
+
+    GArray *capset_ids;
 };
 
 struct VirtIOGPUClass {
@@ -346,6 +348,6 @@ void virtio_gpu_virgl_reset_scanout(VirtIOGPU *g);
 void virtio_gpu_virgl_reset(VirtIOGPU *g);
 int virtio_gpu_virgl_init(VirtIOGPU *g);
 void virtio_gpu_virgl_deinit(VirtIOGPU *g);
-int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g);
+GArray *virtio_gpu_virgl_get_capsets(VirtIOGPU *g);
 
 #endif
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 08/10] virtio-gpu: Handle resource blob commands
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
                   ` (6 preceding siblings ...)
  2024-05-11 18:22  1% ` [PATCH v11 07/10] virtio-gpu: Support suspension of commands processing Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 09/10] virtio-gpu: Register capsets dynamically Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 10/10] virtio-gpu: Support Venus context Dmitry Osipenko
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

From: Antonio Caggiano <antonio.caggiano@collabora.com>

Support BLOB resources creation, mapping and unmapping by calling the
new stable virglrenderer 0.10 interface. Only enabled when available and
via the blob config. E.g. -device virtio-vga-gl,blob=true

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Xenia Ragiadakou <xenia.ragiadakou@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu-virgl.c  | 274 ++++++++++++++++++++++++++++++++-
 hw/display/virtio-gpu.c        |   4 +-
 include/hw/virtio/virtio-gpu.h |   2 +
 3 files changed, 277 insertions(+), 3 deletions(-)

diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 524f15220b7f..3f2e406be3a4 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -26,6 +26,7 @@
 
 struct virtio_gpu_virgl_resource {
     struct virtio_gpu_simple_resource base;
+    MemoryRegion *mr;
 };
 
 static struct virtio_gpu_virgl_resource *
@@ -49,6 +50,117 @@ virgl_get_egl_display(G_GNUC_UNUSED void *cookie)
 }
 #endif
 
+#ifdef HAVE_VIRGL_RESOURCE_BLOB
+struct virtio_gpu_virgl_hostmem_region {
+    MemoryRegion mr;
+    struct VirtIOGPU *g;
+    struct virtio_gpu_virgl_resource *res;
+};
+
+static void virtio_gpu_virgl_resume_cmdq_bh(void *opaque)
+{
+    VirtIOGPU *g = opaque;
+
+    virtio_gpu_process_cmdq(g);
+}
+
+static void virtio_gpu_virgl_hostmem_region_free(void *obj)
+{
+    MemoryRegion *mr = MEMORY_REGION(obj);
+    struct virtio_gpu_virgl_hostmem_region *vmr;
+    VirtIOGPUBase *b;
+
+    vmr = container_of(mr, struct virtio_gpu_virgl_hostmem_region, mr);
+    vmr->res->mr = NULL;
+
+    b = VIRTIO_GPU_BASE(vmr->g);
+    b->renderer_blocked--;
+
+    /*
+     * memory_region_unref() is executed from RCU thread context, while
+     * virglrenderer works only on the main-loop thread that's holding GL
+     * context.
+     */
+    qemu_bh_schedule(vmr->g->cmdq_resume_bh);
+    g_free(vmr);
+}
+
+static int
+virtio_gpu_virgl_map_resource_blob(VirtIOGPU *g,
+                                   struct virtio_gpu_virgl_resource *res,
+                                   uint64_t offset)
+{
+    struct virtio_gpu_virgl_hostmem_region *vmr;
+    VirtIOGPUBase *b = VIRTIO_GPU_BASE(g);
+    MemoryRegion *mr;
+    uint64_t size;
+    void *data;
+    int ret;
+
+    if (!virtio_gpu_hostmem_enabled(b->conf)) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: hostmem disabled\n", __func__);
+        return -EOPNOTSUPP;
+    }
+
+    ret = virgl_renderer_resource_map(res->base.resource_id, &data, &size);
+    if (ret) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: failed to map virgl resource: %s\n",
+                      __func__, strerror(-ret));
+        return ret;
+    }
+
+    vmr = g_new0(struct virtio_gpu_virgl_hostmem_region, 1);
+    vmr->res = res;
+    vmr->g = g;
+
+    mr = &vmr->mr;
+    memory_region_init_ram_ptr(mr, OBJECT(mr), "blob", size, data);
+    memory_region_add_subregion(&b->hostmem, offset, mr);
+    memory_region_set_enabled(mr, true);
+
+    /*
+     * MR could outlive the resource if MR's reference is held outside of
+     * virtio-gpu. In order to prevent unmapping resource while MR is alive,
+     * and thus, making the data pointer invalid, we will block virtio-gpu
+     * command processing until MR is fully unreferenced and freed.
+     */
+    OBJECT(mr)->free = virtio_gpu_virgl_hostmem_region_free;
+
+    res->mr = mr;
+
+    return 0;
+}
+
+static int
+virtio_gpu_virgl_async_unmap_resource_blob(VirtIOGPU *g,
+                                           struct virtio_gpu_virgl_resource *res)
+{
+    VirtIOGPUBase *b = VIRTIO_GPU_BASE(g);
+    MemoryRegion *mr = res->mr;
+    int ret;
+
+    if (mr) {
+        /* render will be unblocked once MR is freed */
+        b->renderer_blocked++;
+
+        /* memory region owns self res->mr object and frees it by itself */
+        memory_region_set_enabled(mr, false);
+        memory_region_del_subregion(&b->hostmem, mr);
+        object_unparent(OBJECT(mr));
+    } else {
+        ret = virgl_renderer_resource_unmap(res->base.resource_id);
+        if (ret) {
+            qemu_log_mask(LOG_GUEST_ERROR,
+                          "%s: failed to unmap virgl resource: %s\n",
+                          __func__, strerror(-ret));
+            return ret;
+        }
+    }
+
+    return 0;
+}
+#endif /* HAVE_VIRGL_RESOURCE_BLOB */
+
 static void virgl_cmd_create_resource_2d(VirtIOGPU *g,
                                          struct virtio_gpu_ctrl_command *cmd)
 {
@@ -146,7 +258,8 @@ static void virgl_cmd_create_resource_3d(VirtIOGPU *g,
 }
 
 static void virgl_cmd_resource_unref(VirtIOGPU *g,
-                                     struct virtio_gpu_ctrl_command *cmd)
+                                     struct virtio_gpu_ctrl_command *cmd,
+                                     bool *cmd_suspended)
 {
     struct virtio_gpu_resource_unref unref;
     struct virtio_gpu_virgl_resource *res;
@@ -164,6 +277,12 @@ static void virgl_cmd_resource_unref(VirtIOGPU *g,
         return;
     }
 
+    if (res->mr) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource is mapped\n", __func__);
+        cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
+        return;
+    }
+
     virgl_renderer_resource_detach_iov(unref.resource_id,
                                        &res_iovs,
                                        &num_iovs);
@@ -514,6 +633,134 @@ static void virgl_cmd_get_capset(VirtIOGPU *g,
 }
 
 #ifdef HAVE_VIRGL_RESOURCE_BLOB
+static void virgl_cmd_resource_create_blob(VirtIOGPU *g,
+                                           struct virtio_gpu_ctrl_command *cmd)
+{
+    struct virgl_renderer_resource_create_blob_args virgl_args = { 0 };
+    struct virtio_gpu_resource_create_blob cblob;
+    struct virtio_gpu_virgl_resource *res;
+    int ret;
+
+    if (!virtio_gpu_blob_enabled(g->parent_obj.conf)) {
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
+        return;
+    }
+
+    VIRTIO_GPU_FILL_CMD(cblob);
+    virtio_gpu_create_blob_bswap(&cblob);
+    trace_virtio_gpu_cmd_res_create_blob(cblob.resource_id, cblob.size);
+
+    if (cblob.resource_id == 0) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource id 0 is not allowed\n",
+                      __func__);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    res = virtio_gpu_virgl_find_resource(g, cblob.resource_id);
+    if (res) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource already exists %d\n",
+                      __func__, cblob.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    res = g_new0(struct virtio_gpu_virgl_resource, 1);
+    res->base.resource_id = cblob.resource_id;
+    res->base.blob_size = cblob.size;
+    res->base.dmabuf_fd = -1;
+
+    if (cblob.blob_mem != VIRTIO_GPU_BLOB_MEM_HOST3D) {
+        ret = virtio_gpu_create_mapping_iov(g, cblob.nr_entries, sizeof(cblob),
+                                            cmd, &res->base.addrs,
+                                            &res->base.iov, &res->base.iov_cnt);
+        if (!ret) {
+            g_free(res);
+            cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
+            return;
+        }
+    }
+
+    QTAILQ_INSERT_HEAD(&g->reslist, &res->base, next);
+
+    virgl_args.res_handle = cblob.resource_id;
+    virgl_args.ctx_id = cblob.hdr.ctx_id;
+    virgl_args.blob_mem = cblob.blob_mem;
+    virgl_args.blob_id = cblob.blob_id;
+    virgl_args.blob_flags = cblob.blob_flags;
+    virgl_args.size = cblob.size;
+    virgl_args.iovecs = res->base.iov;
+    virgl_args.num_iovs = res->base.iov_cnt;
+
+    ret = virgl_renderer_resource_create_blob(&virgl_args);
+    if (ret) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: virgl blob create error: %s\n",
+                      __func__, strerror(-ret));
+        cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
+    }
+}
+
+static void virgl_cmd_resource_map_blob(VirtIOGPU *g,
+                                        struct virtio_gpu_ctrl_command *cmd)
+{
+    struct virtio_gpu_resource_map_blob mblob;
+    struct virtio_gpu_virgl_resource *res;
+    struct virtio_gpu_resp_map_info resp;
+    int ret;
+
+    VIRTIO_GPU_FILL_CMD(mblob);
+    virtio_gpu_map_blob_bswap(&mblob);
+
+    res = virtio_gpu_virgl_find_resource(g, mblob.resource_id);
+    if (!res) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource does not exist %d\n",
+                      __func__, mblob.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    ret = virtio_gpu_virgl_map_resource_blob(g, res, mblob.offset);
+    if (ret) {
+        cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
+        return;
+    }
+
+    memset(&resp, 0, sizeof(resp));
+    resp.hdr.type = VIRTIO_GPU_RESP_OK_MAP_INFO;
+    virgl_renderer_resource_get_map_info(mblob.resource_id, &resp.map_info);
+    virtio_gpu_ctrl_response(g, cmd, &resp.hdr, sizeof(resp));
+}
+
+static void virgl_cmd_resource_unmap_blob(VirtIOGPU *g,
+                                          struct virtio_gpu_ctrl_command *cmd,
+                                          bool *cmd_suspended)
+{
+    struct virtio_gpu_resource_unmap_blob ublob;
+    struct virtio_gpu_virgl_resource *res;
+    int ret;
+
+    VIRTIO_GPU_FILL_CMD(ublob);
+    virtio_gpu_unmap_blob_bswap(&ublob);
+
+    res = virtio_gpu_virgl_find_resource(g, ublob.resource_id);
+    if (!res) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource does not exist %d\n",
+                      __func__, ublob.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    ret = virtio_gpu_virgl_async_unmap_resource_blob(g, res);
+    if (ret) {
+        cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
+        return;
+    }
+
+    if (res->mr) {
+        *cmd_suspended = true;
+    }
+}
+
 static void virgl_cmd_set_scanout_blob(VirtIOGPU *g,
                                        struct virtio_gpu_ctrl_command *cmd)
 {
@@ -616,6 +863,8 @@ static void virgl_cmd_set_scanout_blob(VirtIOGPU *g,
 void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
                                       struct virtio_gpu_ctrl_command *cmd)
 {
+    bool cmd_suspended = false;
+
     VIRTIO_GPU_FILL_CMD(cmd->cmd_hdr);
 
     virgl_renderer_force_ctx_0();
@@ -657,7 +906,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
         virgl_cmd_resource_flush(g, cmd);
         break;
     case VIRTIO_GPU_CMD_RESOURCE_UNREF:
-        virgl_cmd_resource_unref(g, cmd);
+        virgl_cmd_resource_unref(g, cmd, &cmd_suspended);
         break;
     case VIRTIO_GPU_CMD_CTX_ATTACH_RESOURCE:
         /* TODO add security */
@@ -680,6 +929,15 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
         virtio_gpu_get_edid(g, cmd);
         break;
 #ifdef HAVE_VIRGL_RESOURCE_BLOB
+    case VIRTIO_GPU_CMD_RESOURCE_CREATE_BLOB:
+        virgl_cmd_resource_create_blob(g, cmd);
+        break;
+    case VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB:
+        virgl_cmd_resource_map_blob(g, cmd);
+        break;
+    case VIRTIO_GPU_CMD_RESOURCE_UNMAP_BLOB:
+        virgl_cmd_resource_unmap_blob(g, cmd, &cmd_suspended);
+        break;
     case VIRTIO_GPU_CMD_SET_SCANOUT_BLOB:
         virgl_cmd_set_scanout_blob(g, cmd);
         break;
@@ -689,6 +947,9 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
         break;
     }
 
+    if (cmd_suspended) {
+        return;
+    }
     if (cmd->finished) {
         return;
     }
@@ -854,6 +1115,11 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
                                       virtio_gpu_print_stats, g);
         timer_mod(g->print_stats, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 1000);
     }
+
+    g->cmdq_resume_bh = aio_bh_new(qemu_get_aio_context(),
+                                   virtio_gpu_virgl_resume_cmdq_bh,
+                                   g);
+
     return 0;
 }
 
@@ -869,6 +1135,10 @@ int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
 
 void virtio_gpu_virgl_deinit(VirtIOGPU *g)
 {
+    if (g->cmdq_resume_bh) {
+        qemu_bh_delete(g->cmdq_resume_bh);
+    }
+
     if (g->fence_poll) {
         timer_free(g->fence_poll);
     }
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 6c8c7213bafa..052ab493a00b 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1483,10 +1483,12 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp)
             return;
         }
 
+#ifndef HAVE_VIRGL_RESOURCE_BLOB
         if (virtio_gpu_virgl_enabled(g->parent_obj.conf)) {
-            error_setg(errp, "blobs and virgl are not compatible (yet)");
+            error_setg(errp, "old virglrenderer, blob resources unsupported");
             return;
         }
+#endif
     }
 
     if (!virtio_gpu_base_device_realize(qdev,
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index ba36497c477f..c0b0b0eac08b 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -210,6 +210,8 @@ struct VirtIOGPU {
         QTAILQ_HEAD(, VGPUDMABuf) bufs;
         VGPUDMABuf *primary[VIRTIO_GPU_MAX_SCANOUTS];
     } dmabuf;
+
+    QEMUBH *cmdq_resume_bh;
 };
 
 struct VirtIOGPUClass {
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 03/10] virtio-gpu: Support context-init feature with virglrenderer
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 01/10] virtio-gpu: Unrealize GL device Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 02/10] virtio-gpu: Use pkgconfig version to decide which virgl features are available Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 04/10] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled Dmitry Osipenko
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

From: Huang Rui <ray.huang@amd.com>

Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init
feature flags. Expose this feature and support creating virglrenderer
context with flags using context_id if libvirglrenderer is new enough.

Originally-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Antonio Caggiano <quic_acaggian@quicinc.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu-gl.c    |  4 ++++
 hw/display/virtio-gpu-virgl.c | 20 ++++++++++++++++++--
 meson.build                   |  1 +
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index 0c0a8d136954..95806999189e 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -127,6 +127,10 @@ static void virtio_gpu_gl_device_realize(DeviceState *qdev, Error **errp)
     VIRTIO_GPU_BASE(g)->virtio_config.num_capsets =
         virtio_gpu_virgl_get_num_capsets(g);
 
+#ifdef HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS
+    g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED;
+#endif
+
     virtio_gpu_device_realize(qdev, errp);
 }
 
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index b0500eccf8e0..8306961ad502 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -106,8 +106,24 @@ static void virgl_cmd_context_create(VirtIOGPU *g,
     trace_virtio_gpu_cmd_ctx_create(cc.hdr.ctx_id,
                                     cc.debug_name);
 
-    virgl_renderer_context_create(cc.hdr.ctx_id, cc.nlen,
-                                  cc.debug_name);
+    if (cc.context_init) {
+        if (!virtio_gpu_context_init_enabled(g->parent_obj.conf)) {
+            qemu_log_mask(LOG_GUEST_ERROR, "%s: context_init disabled",
+                          __func__);
+            cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
+            return;
+        }
+
+#ifdef HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS
+        virgl_renderer_context_create_with_flags(cc.hdr.ctx_id,
+                                                 cc.context_init,
+                                                 cc.nlen,
+                                                 cc.debug_name);
+        return;
+#endif
+    }
+
+    virgl_renderer_context_create(cc.hdr.ctx_id, cc.nlen, cc.debug_name);
 }
 
 static void virgl_cmd_context_destroy(VirtIOGPU *g,
diff --git a/meson.build b/meson.build
index ca2798dbac37..5448eb17f39b 100644
--- a/meson.build
+++ b/meson.build
@@ -2288,6 +2288,7 @@ config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
 config_host_data.set('CONFIG_VNC_SASL', sasl.found())
 if virgl.version().version_compare('>=1.0.0')
   config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', 1)
+  config_host_data.set('HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS', 1)
 endif
 config_host_data.set('CONFIG_VIRTFS', have_virtfs)
 config_host_data.set('CONFIG_VTE', vte.found())
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 10/10] virtio-gpu: Support Venus context
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
                   ` (8 preceding siblings ...)
  2024-05-11 18:22  1% ` [PATCH v11 09/10] virtio-gpu: Register capsets dynamically Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

From: Antonio Caggiano <antonio.caggiano@collabora.com>

Request Venus when initializing VirGL and if venus=true flag is set for
virtio-gpu-gl device.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu-gl.c     |  2 ++
 hw/display/virtio-gpu-virgl.c  | 22 ++++++++++++++++++----
 hw/display/virtio-gpu.c        | 13 +++++++++++++
 include/hw/virtio/virtio-gpu.h |  3 +++
 meson.build                    |  1 +
 5 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index 431fc2881a00..1deb3e64b781 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -137,6 +137,8 @@ static void virtio_gpu_gl_device_realize(DeviceState *qdev, Error **errp)
 static Property virtio_gpu_gl_properties[] = {
     DEFINE_PROP_BIT("stats", VirtIOGPU, parent_obj.conf.flags,
                     VIRTIO_GPU_FLAG_STATS_ENABLED, false),
+    DEFINE_PROP_BIT("venus", VirtIOGPU, parent_obj.conf.flags,
+                    VIRTIO_GPU_FLAG_VENUS_ENABLED, false),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 135974431492..f1cad005dd8f 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -1094,6 +1094,11 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
         flags |= VIRGL_RENDERER_D3D11_SHARE_TEXTURE;
     }
 #endif
+#ifdef VIRGL_RENDERER_VENUS
+    if (virtio_gpu_venus_enabled(g->parent_obj.conf)) {
+        flags |= VIRGL_RENDERER_VENUS | VIRGL_RENDERER_RENDER_SERVER;
+    }
+#endif
 
     ret = virgl_renderer_init(g, flags, &virtio_gpu_3d_cbs);
     if (ret != 0) {
@@ -1124,7 +1129,7 @@ static void virtio_gpu_virgl_add_capset(GArray *capset_ids, uint32_t capset_id)
 
 GArray *virtio_gpu_virgl_get_capsets(VirtIOGPU *g)
 {
-    uint32_t capset2_max_ver, capset2_max_size;
+    uint32_t capset_max_ver, capset_max_size;
     GArray *capset_ids;
 
     capset_ids = g_array_new(false, false, sizeof(uint32_t));
@@ -1133,12 +1138,21 @@ GArray *virtio_gpu_virgl_get_capsets(VirtIOGPU *g)
     virtio_gpu_virgl_add_capset(capset_ids, VIRTIO_GPU_CAPSET_VIRGL);
 
     virgl_renderer_get_cap_set(VIRTIO_GPU_CAPSET_VIRGL2,
-                              &capset2_max_ver,
-                              &capset2_max_size);
-    if (capset2_max_ver) {
+                               &capset_max_ver,
+                               &capset_max_size);
+    if (capset_max_ver) {
         virtio_gpu_virgl_add_capset(capset_ids, VIRTIO_GPU_CAPSET_VIRGL2);
     }
 
+    if (virtio_gpu_venus_enabled(g->parent_obj.conf)) {
+        virgl_renderer_get_cap_set(VIRTIO_GPU_CAPSET_VENUS,
+                                   &capset_max_ver,
+                                   &capset_max_size);
+        if (capset_max_size) {
+            virtio_gpu_virgl_add_capset(capset_ids, VIRTIO_GPU_CAPSET_VENUS);
+        }
+    }
+
     return capset_ids;
 }
 
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 052ab493a00b..0518bb858e88 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1491,6 +1491,19 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp)
 #endif
     }
 
+    if (virtio_gpu_venus_enabled(g->parent_obj.conf)) {
+#ifdef HAVE_VIRGL_VENUS
+        if (!virtio_gpu_blob_enabled(g->parent_obj.conf) ||
+            !virtio_gpu_hostmem_enabled(g->parent_obj.conf)) {
+            error_setg(errp, "venus requires enabled blob and hostmem options");
+            return;
+        }
+#else
+        error_setg(errp, "old virglrenderer, venus unsupported");
+        return;
+#endif
+    }
+
     if (!virtio_gpu_base_device_realize(qdev,
                                         virtio_gpu_handle_ctrl_cb,
                                         virtio_gpu_handle_cursor_cb,
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 7bbc6ef268eb..9940bbcbaacc 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -99,6 +99,7 @@ enum virtio_gpu_base_conf_flags {
     VIRTIO_GPU_FLAG_BLOB_ENABLED,
     VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED,
     VIRTIO_GPU_FLAG_RUTABAGA_ENABLED,
+    VIRTIO_GPU_FLAG_VENUS_ENABLED,
 };
 
 #define virtio_gpu_virgl_enabled(_cfg) \
@@ -117,6 +118,8 @@ enum virtio_gpu_base_conf_flags {
     (_cfg.flags & (1 << VIRTIO_GPU_FLAG_RUTABAGA_ENABLED))
 #define virtio_gpu_hostmem_enabled(_cfg) \
     (_cfg.hostmem > 0)
+#define virtio_gpu_venus_enabled(_cfg) \
+    (_cfg.flags & (1 << VIRTIO_GPU_FLAG_VENUS_ENABLED))
 
 struct virtio_gpu_base_conf {
     uint32_t max_outputs;
diff --git a/meson.build b/meson.build
index 0433ea200dd7..20241931730f 100644
--- a/meson.build
+++ b/meson.build
@@ -2290,6 +2290,7 @@ if virgl.version().version_compare('>=1.0.0')
   config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', 1)
   config_host_data.set('HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS', 1)
   config_host_data.set('HAVE_VIRGL_RESOURCE_BLOB', 1)
+  config_host_data.set('HAVE_VIRGL_VENUS', 1)
 endif
 config_host_data.set('CONFIG_VIRTFS', have_virtfs)
 config_host_data.set('CONFIG_VTE', vte.found())
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 00/10] Support blob memory and venus on qemu
@ 2024-05-11 18:22  1% Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 01/10] virtio-gpu: Unrealize GL device Dmitry Osipenko
                   ` (9 more replies)
  0 siblings, 10 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

Hello,

This series enables Vulkan Venus context support on virtio-gpu.

All virglrender and almost all Linux kernel prerequisite changes
needed by Venus are already in upstream. For kernel there is a pending
KVM patchset that fixes mapping of compound pages needed for DRM drivers
using TTM [1], othewrwise hostmem blob mapping will fail with a KVM error
from Qemu.

[1] https://lore.kernel.org/kvm/20240229025759.1187910-1-stevensd@google.com/

You'll need to use recent Mesa version containing patch that removes
dependency on cross-device feature from Venus that isn't supported by
Qemu [2].

[2] https://gitlab.freedesktop.org/mesa/mesa/-/commit/087e9a96d13155e26987befae78b6ccbb7ae242b

Example Qemu cmdline that enables Venus:

  qemu-system-x86_64 -device virtio-vga-gl,hostmem=4G,blob=true,venus=true \
      -machine q35,accel=kvm,memory-backend=mem1 \
      -object memory-backend-memfd,id=mem1,size=8G -m 8G


Changes from V10 to V11

- Replaced cmd_resume bool in struct ctrl_command with
  "cmd->finished + !VIRTIO_GPU_FLAG_FENCE" checking as was requested
  by Akihiko Odaki.

- Reworked virgl_cmd_resource_unmap/unref_blob() to avoid re-adding
  the 'async_unmap_in_progress' flag that was dropped in v9:

    1. virgl_cmd_resource_[un]map_blob() now doesn't check itself whether
       resource was previously mapped and lets virglrenderer to do the
       checking.

    2. error returned by virgl_renderer_resource_unmap() is now handled
       and reported properly, previously the error wasn't checked. The
       virgl_renderer_resource_unmap() fails if resource wasn't mapped.

    3. virgl_cmd_resource_unref_blob() now doesn't allow to unref resource
       that is mapped, it's a error condition if guest didn't unmap resource
       before doing the unref. Previously unref was implicitly unmapping
       resource.

Changes from V9 to V10

- Dropped 'async_unmap_in_progress' variable and switched to use
  aio_bh_new() isntead of oneshot variant in the "blob commands" patch.

- Further improved error messages by printing error code when actual error
  occurrs and using ERR_UNSPEC instead of ERR_ENOMEM when we don't really
  know if it was ENOMEM for sure.

- Added vdc->unrealize for the virtio GL device and freed virgl data.

- Dropped UUID and doc/migration patches. UUID feature isn't needed
  anymore, instead we changed Mesa Venus driver to not require UUID.

- Renamed virtio-gpu-gl "vulkan" property name back to "venus".

Changes from V8 to V9

- Added resuming of cmdq processing when hostmem MR is freed,
  as was suggested by Akihiko Odaki.

- Added more error messages, suggested by Akihiko Odaki

- Dropped superfluous 'res->async_unmap_completed', suggested
  by Akihiko Odaki.

- Kept using cmd->suspended flag. Akihiko Odaki suggested to make
  virtio_gpu_virgl_process_cmd() return false if cmd processing is
  suspended, but it's not easy to implement due to ubiquitous
  VIRTIO_GPU_FILL_CMD() macros that returns void, requiring to change
  all the virtio-gpu processing code.

- Added back virtio_gpu_virgl_resource as was requested by Akihiko Odaki,
  though I'm not convinced it's really needed.

- Switched to use GArray, renamed capset2_max_ver/size vars and moved
  "vulkan" property definition to the virtio-gpu-gl device in the Venus
  patch, like was suggested by Akihiko Odaki.

- Moved UUID to virtio_gpu_virgl_resource and dropped UUID save/restore
  since it will require bumping VM version and virgl device isn't miratable
  anyways.

- Fixed exposing UUID feature with Rutabaga

- Dropped linux-headers update patch because headers were already updated
  in Qemu/staging.

- Added patch that updates virtio migration doc with a note about virtio-gpu
  migration specifics, suggested by Akihiko Odaki.

- Addressed coding style issue noticed by Akihiko Odaki

Changes from V7 to V8

- Supported suspension of virtio-gpu commands processing and made
  unmapping of hostmem region asynchronous by blocking/suspending
  cmd processing until region is unmapped. Suggested by Akihiko Odaki.

- Fixed arm64 building of x86 targets using updated linux-headers.
  Corrected the update script. Thanks to Rob Clark for reporting
  the issue.

- Added new patch that makes registration of virgl capsets dynamic.
  Requested by Antonio Caggiano and Pierre-Eric Pelloux-Prayer.

- Venus capset now isn't advertised if Vulkan is disabled with vulkan=false

Changes from V6 to V7

- Used scripts/update-linux-headers.sh to update Qemu headers based
  on Linux v6.8-rc3 that adds Venus capset definition to virtio-gpu
  protocol, was requested by Peter Maydel

- Added r-bs that were given to v6 patches. Corrected missing s-o-bs

- Dropped context_init Qemu's virtio-gpu device configuration flag,
  was suggested by Marc-André Lureau

- Added missing error condition checks spotted by Marc-André Lureau
  and Akihiko Odaki, and few more

- Returned back res->mr referencing to memory_region_init_ram_ptr() like
  was suggested by Akihiko Odaki. Incorporated fix suggested by Pierre-Eric
  to specify the MR name

- Dropped the virgl_gpu_resource wrapper, cleaned up and simplified
  patch that adds blob-cmd support

- Fixed improper blob resource removal from resource list on resource_unref
  that was spotted by Akihiko Odaki

- Change order of the blob patches, was suggested by Akihiko Odaki.
  The cmd_set_scanout_blob support is enabled first

- Factored out patch that adds resource management support to virtio-gpu-gl,
  was requested by Marc-André Lureau

- Simplified and improved the UUID support patch, dropped the hash table
  as we don't need it for now. Moved QemuUUID to virtio_gpu_simple_resource.
  This all was suggested by Akihiko Odaki and Marc-André Lureau

- Dropped console_has_gl() check, suggested by Akihiko Odaki

- Reworked Meson cheking of libvirglrender features, made new features
  available based on virglrender pkgconfig version instead of checking
  symbols in header. This should fix build error using older virglrender
  version, reported by Alex Bennée

- Made enabling of Venus context configrable via new virtio-gpu device
  "vulkan=true" flag, suggested by Marc-André Lureau. The flag is disabled
  by default because it requires blob and hostmem options to be enabled
  and configured

Changes from V5 to V6

- Move macros configurations under virgl.found() and rename
  HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS.

- Handle the case while context_init is disabled.

- Enable context_init by default.

- Move virtio_gpu_virgl_resource_unmap() into
  virgl_cmd_resource_unmap_blob().

- Introduce new struct virgl_gpu_resource to store virgl specific members.

- Remove erro handling of g_new0, because glib will abort() on OOM.

- Set resource uuid as option.

- Implement optional subsection of vmstate_virtio_gpu_resource_uuid_state
  for virtio live migration.

- Use g_int_hash/g_int_equal instead of the default

- Add scanout_blob function for virtio-gpu-virgl

- Resolve the memory leak on virtio-gpu-virgl

- Remove the unstable API flags check because virglrenderer is already 1.0

- Squash the render server flag support into "Initialize Venus"

Changes from V4 (virtio gpu V4) to V5

- Inverted patch 5 and 6 because we should configure
  HAVE_VIRGL_CONTEXT_INIT firstly.

- Validate owner of memory region to avoid slowing down DMA.

- Use memory_region_init_ram_ptr() instead of
  memory_region_init_ram_device_ptr().

- Adjust sequence to allocate gpu resource before virglrender resource
  creation

- Add virtio migration handling for uuid.

- Send kernel patch to define VIRTIO_GPU_CAPSET_VENUS.
  https://lore.kernel.org/lkml/20230915105918.3763061-1-ray.huang@amd.com/

- Add meson check to make sure unstable APIs defined from 0.9.0.

Changes from V1 to V2 (virtio gpu V4)

- Remove unused #include "hw/virtio/virtio-iommu.h"

- Add a local function, called virgl_resource_destroy(), that is used
  to release a vgpu resource on error paths and in resource_unref.

- Remove virtio_gpu_virgl_resource_unmap from
  virtio_gpu_cleanup_mapping(),
  since this function won't be called on blob resources and also because
  blob resources are unmapped via virgl_cmd_resource_unmap_blob().

- In virgl_cmd_resource_create_blob(), do proper cleanup in error paths
  and move QTAILQ_INSERT_HEAD(&g->reslist, res, next) after the resource
  has been fully initialized.

- Memory region has a different life-cycle from virtio gpu resources
  i.e. cannot be released synchronously along with the vgpu resource.
  So, here the field "region" was changed to a pointer and is allocated
  dynamically when the blob is mapped.
  Also, since the pointer can be used to indicate whether the blob
  is mapped, the explicite field "mapped" was removed.

- In virgl_cmd_resource_map_blob(), add check on the value of
  res->region, to prevent beeing called twice on the same resource.

- Add a patch to enable automatic deallocation of memory regions to resolve
  use-after-free memory corruption with a reference.

Antonio Caggiano (2):
  virtio-gpu: Handle resource blob commands
  virtio-gpu: Support Venus context

Dmitry Osipenko (4):
  virtio-gpu: Unrealize GL device
  virtio-gpu: Use pkgconfig version to decide which virgl features are
    available
  virtio-gpu: Don't require udmabuf when blobs and virgl are enabled
  virtio-gpu: Support suspension of commands processing

Huang Rui (2):
  virtio-gpu: Support context-init feature with virglrenderer
  virtio-gpu: Add virgl resource management

Pierre-Eric Pelloux-Prayer (1):
  virtio-gpu: Register capsets dynamically

Robert Beckett (1):
  virtio-gpu: Support blob scanout using dmabuf fd

 hw/display/virtio-gpu-gl.c     |  23 +-
 hw/display/virtio-gpu-virgl.c  | 541 +++++++++++++++++++++++++++++++--
 hw/display/virtio-gpu.c        |  35 ++-
 include/hw/virtio/virtio-gpu.h |  17 +-
 meson.build                    |  10 +-
 5 files changed, 592 insertions(+), 34 deletions(-)

-- 
2.44.0



^ permalink raw reply	[relevance 1%]

* [PATCH v11 05/10] virtio-gpu: Add virgl resource management
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
                   ` (3 preceding siblings ...)
  2024-05-11 18:22  1% ` [PATCH v11 04/10] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 06/10] virtio-gpu: Support blob scanout using dmabuf fd Dmitry Osipenko
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

From: Huang Rui <ray.huang@amd.com>

In a preparation to adding host blobs support to virtio-gpu, add virgl
resource management that allows to retrieve resource based on its ID
and virgl resource wrapper on top of simple resource that will be contain
fields specific to virgl.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Antonio Caggiano <quic_acaggian@quicinc.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu-virgl.c | 76 +++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 8306961ad502..c6c63ca1c373 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -22,6 +22,23 @@
 
 #include <virglrenderer.h>
 
+struct virtio_gpu_virgl_resource {
+    struct virtio_gpu_simple_resource base;
+};
+
+static struct virtio_gpu_virgl_resource *
+virtio_gpu_virgl_find_resource(VirtIOGPU *g, uint32_t resource_id)
+{
+    struct virtio_gpu_simple_resource *res;
+
+    res = virtio_gpu_find_resource(g, resource_id);
+    if (!res) {
+        return NULL;
+    }
+
+    return container_of(res, struct virtio_gpu_virgl_resource, base);
+}
+
 #if VIRGL_RENDERER_CALLBACKS_VERSION >= 4
 static void *
 virgl_get_egl_display(G_GNUC_UNUSED void *cookie)
@@ -35,11 +52,34 @@ static void virgl_cmd_create_resource_2d(VirtIOGPU *g,
 {
     struct virtio_gpu_resource_create_2d c2d;
     struct virgl_renderer_resource_create_args args;
+    struct virtio_gpu_virgl_resource *res;
 
     VIRTIO_GPU_FILL_CMD(c2d);
     trace_virtio_gpu_cmd_res_create_2d(c2d.resource_id, c2d.format,
                                        c2d.width, c2d.height);
 
+    if (c2d.resource_id == 0) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource id 0 is not allowed\n",
+                      __func__);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    res = virtio_gpu_virgl_find_resource(g, c2d.resource_id);
+    if (res) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource already exists %d\n",
+                      __func__, c2d.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    res = g_new0(struct virtio_gpu_virgl_resource, 1);
+    res->base.width = c2d.width;
+    res->base.height = c2d.height;
+    res->base.format = c2d.format;
+    res->base.resource_id = c2d.resource_id;
+    QTAILQ_INSERT_HEAD(&g->reslist, &res->base, next);
+
     args.handle = c2d.resource_id;
     args.target = 2;
     args.format = c2d.format;
@@ -59,11 +99,34 @@ static void virgl_cmd_create_resource_3d(VirtIOGPU *g,
 {
     struct virtio_gpu_resource_create_3d c3d;
     struct virgl_renderer_resource_create_args args;
+    struct virtio_gpu_virgl_resource *res;
 
     VIRTIO_GPU_FILL_CMD(c3d);
     trace_virtio_gpu_cmd_res_create_3d(c3d.resource_id, c3d.format,
                                        c3d.width, c3d.height, c3d.depth);
 
+    if (c3d.resource_id == 0) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource id 0 is not allowed\n",
+                      __func__);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    res = virtio_gpu_virgl_find_resource(g, c3d.resource_id);
+    if (res) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource already exists %d\n",
+                      __func__, c3d.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
+    res = g_new0(struct virtio_gpu_virgl_resource, 1);
+    res->base.width = c3d.width;
+    res->base.height = c3d.height;
+    res->base.format = c3d.format;
+    res->base.resource_id = c3d.resource_id;
+    QTAILQ_INSERT_HEAD(&g->reslist, &res->base, next);
+
     args.handle = c3d.resource_id;
     args.target = c3d.target;
     args.format = c3d.format;
@@ -82,12 +145,21 @@ static void virgl_cmd_resource_unref(VirtIOGPU *g,
                                      struct virtio_gpu_ctrl_command *cmd)
 {
     struct virtio_gpu_resource_unref unref;
+    struct virtio_gpu_virgl_resource *res;
     struct iovec *res_iovs = NULL;
     int num_iovs = 0;
 
     VIRTIO_GPU_FILL_CMD(unref);
     trace_virtio_gpu_cmd_res_unref(unref.resource_id);
 
+    res = virtio_gpu_virgl_find_resource(g, unref.resource_id);
+    if (!res) {
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: resource does not exist %d\n",
+                      __func__, unref.resource_id);
+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
+        return;
+    }
+
     virgl_renderer_resource_detach_iov(unref.resource_id,
                                        &res_iovs,
                                        &num_iovs);
@@ -95,6 +167,10 @@ static void virgl_cmd_resource_unref(VirtIOGPU *g,
         virtio_gpu_cleanup_mapping_iov(g, res_iovs, num_iovs);
     }
     virgl_renderer_resource_unref(unref.resource_id);
+
+    QTAILQ_REMOVE(&g->reslist, &res->base, next);
+
+    g_free(res);
 }
 
 static void virgl_cmd_context_create(VirtIOGPU *g,
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

* [PATCH v11 01/10] virtio-gpu: Unrealize GL device
  2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
@ 2024-05-11 18:22  1% ` Dmitry Osipenko
  2024-05-11 18:22  1% ` [PATCH v11 02/10] virtio-gpu: Use pkgconfig version to decide which virgl features are available Dmitry Osipenko
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 200+ results
From: Dmitry Osipenko @ 2024-05-11 18:22 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Gerd Hoffmann, Michael S . Tsirkin, Stefano Stabellini,
	Anthony PERARD, Antonio Caggiano, Dr . David Alan Gilbert,
	Robert Beckett, Gert Wollny, Alex Bennée
  Cc: qemu-devel, Gurchetan Singh, ernunes, Alyssa Ross,
	Roger Pau Monné,
	Alex Deucher, Stefano Stabellini, Christian König,
	Xenia Ragiadakou, Pierre-Eric Pelloux-Prayer, Honglei Huang,
	Julia Zhang, Chen Jiqian, Yiwei Zhang

Even though GL GPU doesn't support hotplugging today, free virgl
resources when GL device is unrealized. For consistency.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 hw/display/virtio-gpu-gl.c     | 11 +++++++++++
 hw/display/virtio-gpu-virgl.c  |  9 +++++++++
 include/hw/virtio/virtio-gpu.h |  1 +
 3 files changed, 21 insertions(+)

diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index e06be60dfbfc..0c0a8d136954 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -136,6 +136,16 @@ static Property virtio_gpu_gl_properties[] = {
     DEFINE_PROP_END_OF_LIST(),
 };
 
+static void virtio_gpu_gl_device_unrealize(DeviceState *qdev)
+{
+    VirtIOGPU *g = VIRTIO_GPU(qdev);
+    VirtIOGPUGL *gl = VIRTIO_GPU_GL(qdev);
+
+    if (gl->renderer_inited) {
+        virtio_gpu_virgl_deinit(g);
+    }
+}
+
 static void virtio_gpu_gl_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
@@ -149,6 +159,7 @@ static void virtio_gpu_gl_class_init(ObjectClass *klass, void *data)
     vgc->update_cursor_data = virtio_gpu_gl_update_cursor_data;
 
     vdc->realize = virtio_gpu_gl_device_realize;
+    vdc->unrealize = virtio_gpu_gl_device_unrealize;
     vdc->reset = virtio_gpu_gl_reset;
     device_class_set_props(dc, virtio_gpu_gl_properties);
 }
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 9f34d0e6619c..b0500eccf8e0 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -665,3 +665,12 @@ int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
 
     return capset2_max_ver ? 2 : 1;
 }
+
+void virtio_gpu_virgl_deinit(VirtIOGPU *g)
+{
+    if (g->fence_poll) {
+        timer_free(g->fence_poll);
+    }
+
+    virgl_renderer_cleanup(NULL);
+}
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index ed44cdad6b34..b657187159d9 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -336,6 +336,7 @@ void virtio_gpu_virgl_fence_poll(VirtIOGPU *g);
 void virtio_gpu_virgl_reset_scanout(VirtIOGPU *g);
 void virtio_gpu_virgl_reset(VirtIOGPU *g);
 int virtio_gpu_virgl_init(VirtIOGPU *g);
+void virtio_gpu_virgl_deinit(VirtIOGPU *g);
 int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g);
 
 #endif
-- 
2.44.0



^ permalink raw reply related	[relevance 1%]

Results 1-200 of ~16000000   | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2024-02-12  0:26     [Buildroot] [PATCH v2] package/ustreamer: new package Kadambini Nema
2024-02-19 21:34     ` [Buildroot] [PATCH 1/1] " Kadambini Nema
2024-05-11 20:08  1%   ` Thomas Petazzoni via buildroot
2024-04-01 21:39     [PATCH RFC cmpxchg 8/8] riscv: Emulate one-byte and two-byte cmpxchg Paul E. McKenney
2024-04-04 14:15     ` Palmer Dabbelt
2024-05-11  6:50       ` Guo Ren
2024-05-11 14:54         ` Paul E. McKenney
2024-05-11 20:44  0%       ` Leonardo Bras
2024-05-11 20:44  0%         ` Leonardo Bras
2024-04-05 19:19     [RFC PATCH v3 1/7] mm/damon/paddr: refactor DAMOS_PAGEOUT with migration_mode SeongJae Park
2024-05-11 20:16  1% ` SeongJae Park
2024-04-07 11:44     [Buildroot] [PATCH v2 00/20] package/kodi: bump version to 21.0-Omega Bernd Kuhls
2024-05-11 18:30  1% ` Yann E. MORIN
2024-04-17  5:35     [PATCH] modules: Drop the .export_symbol section from the final modules wangyao
2024-05-11 22:41  0% ` Luis Chamberlain
2024-04-20  1:13     Possible git-diff bug when using exit-code with diff filters German Lashevich
2024-04-21 10:42     ` René Scharfe
2024-05-05 10:20       ` [PATCH 2/2] diff: fix --exit-code with external diff René Scharfe
2024-05-05 15:25         ` Phillip Wood
2024-05-06 18:23           ` René Scharfe
2024-05-08 15:25             ` phillip.wood123
2024-05-11 20:32  1%           ` René Scharfe
2024-04-24  9:27     [PATCH v7 0/6] soc: qcom: add in-kernel pd-mapper implementation Dmitry Baryshkov
2024-04-24  9:27     ` [PATCH v7 1/6] soc: qcom: pdr: protect locator_addr with the main mutex Dmitry Baryshkov
2024-04-25 19:30       ` Chris Lew
2024-05-11 21:52  0%     ` Dmitry Baryshkov
2024-04-27 14:27     Git-GUI change of maintainership Johannes Sixt
2024-04-29 14:24     ` Pratyush Yadav
2024-05-11 15:25       ` Johannes Sixt
2024-05-11 16:43         ` Junio C Hamano
2024-05-11 20:53  1%       ` Johannes Sixt
2024-05-11 21:29  0%         ` Junio C Hamano
2024-04-29 22:15     [PATCH 0/8] Update lpfc to revision 14.4.0.2 Justin Tee
2024-05-11 18:39  1% ` Martin K. Petersen
2024-05-04 14:32     created ext4 disk image differs depending on the underlying filesystem Johannes Schauer Marin Rodrigues
2024-05-04 17:53     ` Johannes Schauer Marin Rodrigues
2024-05-05  0:10       ` Theodore Ts'o
2024-05-11  5:34         ` Johannes Schauer Marin Rodrigues
2024-05-11 21:11  1%       ` Theodore Ts'o
2024-05-06 12:57     [PATCH 0/9] drm/i915: Plane fb refactoring Ville Syrjala
2024-05-10 16:55     ` Ville Syrjälä
2024-05-11 19:00  0%   ` Lucas De Marchi
2024-05-07  1:47     [PATCH v8 0/6] drm/xe/guc: Add GuC based register capture for error capture Zhanjun Dong
2024-05-07  1:47     ` [PATCH v8 6/6] drm/xe/guc: Plumb GuC-capture into dev coredump Zhanjun Dong
2024-05-11 20:25  1%   ` Teres Alexis, Alan Previn
2024-05-07  6:53     [PATCH v5 0/2] Add notifier for PLL0 clock and set it 1.5GHz on Xingyu Wu
2024-05-07  6:53     ` [PATCH v5 2/2] riscv: dts: starfive: visionfive-2: Fix lower rate of CPUfreq by setting PLL0 rate to 1.5GHz Xingyu Wu
2024-05-11 18:47  0%   ` Samuel Holland
2024-05-11 18:47  0%     ` Samuel Holland
2024-05-07 10:53     [PATCHv5 bpf-next 0/8] uprobe: uretprobe speed up Jiri Olsa
2024-05-07 10:53     ` [PATCHv5 bpf-next 6/8] x86/shstk: Add return uprobe support Jiri Olsa
2024-05-07 17:35       ` Edgecombe, Rick P
2024-05-09  8:30         ` Jiri Olsa
2024-05-09 16:24           ` Edgecombe, Rick P
2024-05-11 21:09  0%         ` Jiri Olsa
2024-05-08  6:50     [PATCH 00/10] guestfs: custom image + mirroring sources.list heuristic Luis Chamberlain
2024-05-08  6:50     ` [PATCH 05/10] guestfs: add initial debian trixie support with custom URLs Luis Chamberlain
2024-05-08 17:30       ` Scott Mayhew
2024-05-11 23:46  1%     ` Luis Chamberlain
2024-05-08 18:57     [PATCH v7 00/14] Update SMMUv3 to the modern iommu API (part 2b/3) Jason Gunthorpe
2024-05-08 18:57     ` [PATCH v7 04/14] iommu/arm-smmu-v3: Make changing domains be hitless for ATS Jason Gunthorpe
2024-05-11 21:56  1%   ` Nicolin Chen
2024-05-11 21:56  1%     ` Nicolin Chen
2024-05-09  5:27     linux-next: manual merge of the refactor-heap tree with the block tree Stephen Rothwell
2024-05-09 19:58     ` Kent Overstreet
2024-05-09 22:44       ` Kuan-Wei Chiu
2024-05-09 23:16         ` Kent Overstreet
2024-05-10  3:07           ` Kuan-Wei Chiu
2024-05-10  3:46             ` Matthew Mirvish
2024-05-10  9:10               ` Kuan-Wei Chiu
2024-05-11 19:24  1%             ` Kuan-Wei Chiu
2024-05-09  7:44     [PATCH net] net: ethernet: cortina: Locking fixes Linus Walleij
2024-05-11 21:11  1% ` Michał Mirosław
2024-05-09 12:44     Ftrace, KASLR and gdb alexandre.ferrieux
2024-05-10 18:12     ` Steven Rostedt
2024-05-11 22:44  1%   ` alexandre.ferrieux
2024-05-09 16:27     [PATCH V1 0/9] PCIe TPH and cache direct injection support Wei Huang
2024-05-09 16:27     ` [PATCH V1 5/9] PCI/TPH: Introduce API functions to get/set steering tags Wei Huang
2024-05-11 20:15  1%   ` Simon Horman
2024-05-09 17:05     [PATCH] media: i2c: hi846: Fix V4L2_SUBDEV_FORMAT_TRY get_selection() Ricardo Ribalda
2024-05-09 19:39     ` Laurent Pinchart
2024-05-11  7:47       ` Ricardo Ribalda
2024-05-11 19:09  0%     ` Laurent Pinchart
2024-05-09 22:32     git-cherry-pick(1) -- path Alejandro Colomar
2024-05-10  1:15     ` Junio C Hamano
2024-05-10  9:05       ` Alejandro Colomar
2024-05-10 10:00         ` Phillip Wood
2024-05-10 17:03           ` Junio C Hamano
2024-05-11 11:46             ` Alejandro Colomar
2024-05-11 15:01               ` Phillip Wood
2024-05-11 20:08  1%             ` Alejandro Colomar
2024-05-10  0:03     [PATCH, net-next, 2/2] net: stmmac: PCI driver for BCM8958X SoC Jitendra Vegiraju
2024-05-11  1:59     ` [PATCH v2, " Jitendra Vegiraju
2024-05-11 16:16       ` Andrew Lunn
2024-05-11 17:12         ` Russell King (Oracle)
2024-05-11 17:19           ` Andrew Lunn
2024-05-11 19:35  0%         ` Russell King (Oracle)
2024-05-11 19:35  0%           ` Russell King (Oracle)
2024-05-11 17:50           ` Andrew Lunn
2024-05-11 19:36  1%         ` Russell King (Oracle)
2024-05-11 19:36  1%           ` Russell King (Oracle)
2024-05-11 19:34  1%   ` Russell King (Oracle)
2024-05-11 19:34  1%     ` Russell King (Oracle)
2024-05-10  3:09     [PATCH v6 0/3] pkg-database and systemd-sysext image Johannes Schneider
2024-05-11 23:07  0% ` Alexandre Belloni
2024-05-10  6:40     [PATCH 0/2] add AD8460 DAC driver Mariel Tinaco
2024-05-10  6:40     ` [PATCH 1/2] dt-bindings: iio: dac: add docs for ad8460 Mariel Tinaco
2024-05-10 17:28       ` David Lechner
2024-05-11 16:25         ` Jonathan Cameron
2024-05-11 18:47  1%       ` David Lechner
2024-05-10  9:37     [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver Yasin Lee
2024-05-11 18:36  1% ` kernel test robot
2024-05-11 19:18  1% ` kernel test robot
2024-05-11 19:18  1% ` kernel test robot
2024-05-11 22:14  1% ` kernel test robot
2024-05-10 10:07     [PATCH v4 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log() Ilpo Järvinen
2024-05-11 22:35  1% ` kernel test robot
2024-05-10 10:29     [PATCH 0/5] enable bs > ps for block devices hare
2024-05-10 10:29     ` [PATCH 3/5] block/bdev: lift restrictions on supported blocksize hare
2024-05-10 22:25       ` Matthew Wilcox
2024-05-11 22:57  1%     ` Luis Chamberlain
2024-05-11 22:54  1%   ` Luis Chamberlain
2024-05-10 10:29     ` [PATCH 5/5] nvme: enable logical block size > PAGE_SIZE hare
2024-05-10 22:37       ` Matthew Wilcox
2024-05-11 23:11  1%     ` Luis Chamberlain
2024-05-11 23:09  0%   ` Luis Chamberlain
2024-05-10 15:23     [PATCH 00/16] drm/i915: skl+ plane register stuff Ville Syrjala
2024-05-11 20:02  1% ` ✗ Fi.CI.IGT: failure for " Patchwork
2024-05-10 21:17     [GIT PULL] asm-generic cleanups for 6.10 Arnd Bergmann
2024-05-10 21:19     ` [GIT PULL] alpha: cleanups and build fixes " Arnd Bergmann
2024-05-10 21:40       ` John Paul Adrian Glaubitz
2024-05-10 22:28         ` Paul E. McKenney
2024-05-11 18:49  0%       ` John Paul Adrian Glaubitz
2024-05-11 19:37  1%         ` Paul E. McKenney
2024-05-11 20:08  1%           ` Arnd Bergmann
2024-05-11  0:44     [PATCH RFC v2 0/8] spi: axi-spi-engine: add offload support David Lechner
2024-05-11  0:44     ` [PATCH RFC v2 8/8] iio: adc: ad7944: add support for SPI offload David Lechner
2024-05-11 16:58       ` Jonathan Cameron
2024-05-11 18:41  1%     ` David Lechner
2024-05-11  2:05     [RFC PATCH 1/1] kvm: Note an RCU quiescent state on guest exit Leonardo Bras
2024-05-11 14:55     ` Paul E. McKenney
2024-05-11 20:31  0%   ` Leonardo Bras
2024-05-11  6:40     [PATCH linux-next] mm/huge_memory: remove redundant locking when parsing THP sysfs input xu.xin16
2024-05-11 16:05     ` Matthew Wilcox
2024-05-11 21:35  1%   ` Andrew Morton
2024-05-11  7:46     [Buildroot] [PATCH] configs/qemu_riscv32_nommu_virt_defconfig: New defconfig Waldemar Brodkorb
2024-05-11 20:14  1% ` Thomas Petazzoni via buildroot
2024-05-11  8:06     [Buildroot] [PATCH v3] package/tbtools: new package Mika Westerberg
2024-05-11 20:15  0% ` Thomas Petazzoni via buildroot
2024-05-11  8:08     [Buildroot] [PATCH] arch: remove BINFMT_FLAT_SHARED support Waldemar Brodkorb
2024-05-11 20:18  1% ` Thomas Petazzoni via buildroot
2024-05-11 10:41     [PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest" Geliang Tang
2024-05-11 13:50     ` Matthieu Baerts
2024-05-11 23:17  1%   ` Geliang Tang
2024-05-11 11:28     [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround Jonas Karlman
2024-05-11 17:44     ` Alex Bee
2024-05-11 18:47  1%   ` Jonas Karlman
2024-05-11 19:57  0%     ` Mark Kettenis
2024-05-11 20:55  1%       ` Jonas Karlman
2024-05-11 11:56     [Buildroot] [PATCH 1/3] package/gcc: add version 14.x Waldemar Brodkorb
2024-05-11 20:52  1% ` Thomas Petazzoni via buildroot
2024-05-11 11:56  4% [Buildroot] [git commit] package/ustreamer: new package Thomas Petazzoni via buildroot
2024-05-11 11:59     [Buildroot] [PATCH 3/3] package/gcc: remove version 11.x Waldemar Brodkorb
2024-05-11 20:52  0% ` Thomas Petazzoni via buildroot
2024-05-11 12:58     [Buildroot] [PATCH 1/1] package/kodi: fix libudfread dependency Bernd Kuhls
2024-05-11 20:45  1% ` Yann E. MORIN
2024-05-11 14:45     [syzbot] [kernel?] KASAN: slab-use-after-free Read in kill_orphaned_pgrp (2) lee bruce
2024-05-11 23:34  0% ` Hillf Danton
2024-05-11 14:51     [PATCH] perf/x86/amd/uncore: Add flex array to struct amd_uncore_ctx Erick Archer
2024-05-11 20:04  0% ` Kees Cook
2024-05-11 16:12  1% [PATCH v3] rockchip: rv1126: Migrate to OF_UPSTREAM Anand Moon
2024-05-11 16:32     [PATCH 0/3] lib80211: Constify struct lib80211_crypto_ops Christophe JAILLET
2024-05-11 16:32     ` [PATCH 1/3] lib80211: Handle const struct lib80211_crypto_ops in lib80211 Christophe JAILLET
2024-05-11 20:31       ` Simon Horman
2024-05-11 21:47  1%     ` Christophe JAILLET
2024-05-11 18:05     [RFC PATCH] fs: dcache: Delete the associated dentry when deleting a file Linus Torvalds
2024-05-11 18:26  1% ` [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()' Linus Torvalds
2024-05-11 18:42  1%   ` Linus Torvalds
2024-05-11 19:28  1%     ` Al Viro
2024-05-11 19:55  1%       ` Linus Torvalds
2024-05-11 20:31  1%         ` Al Viro
2024-05-11 21:17  1%           ` Al Viro
2024-05-11 20:02  7%     ` [PATCH v2] " Linus Torvalds
2024-05-11 19:24  0%   ` [PATCH] " Al Viro
2024-05-11 18:22  1% [PATCH v11 00/10] Support blob memory and venus on qemu Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 01/10] virtio-gpu: Unrealize GL device Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 02/10] virtio-gpu: Use pkgconfig version to decide which virgl features are available Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 03/10] virtio-gpu: Support context-init feature with virglrenderer Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 04/10] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 05/10] virtio-gpu: Add virgl resource management Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 06/10] virtio-gpu: Support blob scanout using dmabuf fd Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 07/10] virtio-gpu: Support suspension of commands processing Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 08/10] virtio-gpu: Handle resource blob commands Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 09/10] virtio-gpu: Register capsets dynamically Dmitry Osipenko
2024-05-11 18:22  1% ` [PATCH v11 10/10] virtio-gpu: Support Venus context Dmitry Osipenko
2024-05-11 18:22     [regression] suspend stress test stalls within 30 minutes Kalle Valo
2024-05-11 18:48  1% ` Borislav Petkov
2024-05-11 18:42  1% [PATCH] ASoC: intel: Constify struct snd_soc_ops Christophe JAILLET
2024-05-11 19:00  7% subscribe A. F. Cano
2024-05-11 19:02  1% [xen-unstable test] 185980: tolerable FAIL - PUSHED osstest service owner
2024-05-11 19:06  1% [PATCH] Documentation: security-bugs Korean translation yskelg
2024-05-11 19:16  1% [PATCH 0/1] Fix Dreamcast GAPS PCI bridge Artur Rojek
2024-05-11 19:16  1% ` [PATCH 1/1] sh: dreamcast: Fix GAPS PCI bridge addressing Artur Rojek
2024-05-11 19:30  0%   ` John Paul Adrian Glaubitz
2024-05-11 19:24  1% [GIT PULL] execve updates for 6.10-rc1 Kees Cook
2024-05-11 19:28  1% [PATCH] ucounts: constify usage of ctl_table_header::ctl_table_arg Thomas Weißschuh
2024-05-11 19:30 14% [PATCH 0/4] drm/tidss: Add OLDI bridge support Aradhya Bhatia
2024-05-11 19:30 15% ` [PATCH 1/4] dt-bindings: display: ti,am65x-dss: Minor Cleanup Aradhya Bhatia
2024-05-11 19:30 16% ` [PATCH 2/4] dt-bindings: display: ti: Add schema for AM625 OLDI Transmitter Aradhya Bhatia
2024-05-11 19:30 13% ` [PATCH 3/4] dt-bindings: display: ti,am65x-dss: Add OLDI properties for AM625 DSS Aradhya Bhatia
2024-05-11 19:30 14%   ` [PATCH 3/4] dt-bindings: display: ti, am65x-dss: " Aradhya Bhatia
2024-05-11 19:30 11% ` [PATCH 4/4] drm/tidss: Add OLDI bridge support Aradhya Bhatia
2024-05-11 19:35  1% [PATCH] drm/msm/adreno: request memory region Kiarash Hajian
2024-05-11 19:49  0% ` Dmitry Baryshkov
2024-05-11 19:35  1% [PATCH] ACPI: scan: Add missing check for kstrdup() Jiasheng Jiang
2024-05-11 19:42  1% [PATCH] x86/cpufreq: Rename cpuid variable/parameters to cpu Andrew Cooper
2024-05-11 19:42  1% [GIT PULL] hardening updates for 6.10-rc1 Kees Cook
2024-05-11 19:43  1% [GIT PULL] i2c-host changes for v6.10 - pt. 1 Andi Shyti
2024-05-11 19:56  1% [PATCH v2] drm/msm/a6xx: request memory region Kiarash Hajian
2024-05-11 21:46  0% ` Dmitry Baryshkov
2024-05-11 19:59  1% [qais-yousef:improve-sched-cpufreq-interaction 1/1] kernel/sched/core.c:5169:17: error: incompatible pointer to integer conversion passing 'struct task_struct *' to parameter of type 'int' kernel test robot
2024-05-11 19:59  1% [PATCH] Documentation: cve Korean translation yskelg
2024-05-11 20:07  1% Assistance getting the Universal Audio Apollo Solo USB to work with Linux Ethin Probst
2024-05-11 20:08  1% [Buildroot] [git commit] package/elf2flt: update to 2024.02 Thomas Petazzoni via buildroot
2024-05-11 20:09  1% devicetree for Turris Omnia is missing i2c frequency for atsha204a m95d
2024-05-11 20:15  4% [Buildroot] [git commit] package/tbtools: new package Thomas Petazzoni via buildroot
2024-05-11 20:15  1% [PATCH] Fixes rtl8139 driver for old kernels Hans
2024-05-11 20:17  4% [Buildroot] [git commit] arch: remove BINFMT_FLAT_SHARED support Thomas Petazzoni via buildroot
2024-05-11 20:26  1% [PATCH] mips64el-softmmu: Enable MTTCG Jiaxun Yang
2024-05-11 20:31  1% [openeuler:openEuler-1.0-LTS 22374/22416] drivers/gpu/drm/nouveau/nvkm/core/object.c:37:17: warning: ISO C90 forbids mixed declarations and code kernel test robot
2024-05-11 20:31  1% [openeuler:OLK-6.6 9538/9601] arch/arm64/kvm/vgic/vgic-mmio.c:266:38: warning: variable 'is_pending' set but not used kernel test robot
2024-05-11 20:40  4% [Buildroot] [git commit] package/kodi: fix libudfread dependency Yann E. MORIN
2024-05-11 20:48  1% [Buildroot] [PATCH] package/libnss: bump version to 3.100 Giulio Benetti
2024-05-11 20:49  4% [Buildroot] [git commit] toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_14 blind option Thomas Petazzoni via buildroot
2024-05-11 20:49  1% [Buildroot] [git commit] Config.in.legacy: fix legacy BR2_BINFMT_FLAT_SHARED Thomas Petazzoni via buildroot
2024-05-11 20:50  1% [Buildroot] [git commit] package/gcc: switch to 13.x as default Thomas Petazzoni via buildroot
2024-05-11 20:50  4% [Buildroot] [git commit] package/gcc: add version 14.x Thomas Petazzoni via buildroot
2024-05-11 20:50  3% [Buildroot] [git commit] package/gcc: remove version 11.x Thomas Petazzoni via buildroot
2024-05-11 20:52  1% [syzbot] [bcachefs?] KMSAN: uninit-value in bch2_extent_update_i_size_sectors syzbot
2024-05-11 21:22  1% [PATCH bpf-next] bpf: disable strict aliasing in test_global_func9.c Jose E. Marchesi
2024-05-11 21:22  3% [PATCH bpf-next V2] bpf: make list_for_each_entry portable Jose E. Marchesi
2024-05-11 21:23  1% [PATCH bpf-next] bpf: ignore expected GCC warning in test_global_func10.c Jose E. Marchesi
2024-05-11 21:31  1% [PATCH] Coccinelle: pm_runtime: Fix grammar in comment Thorsten Blum
2024-05-11 21:46  5% [PATCH] ASoC: dt-bindings: ak4118: convert to dt schema Xiaxi Shen
2024-05-11 21:47  1% [PATCH] ASoC: dt-bindings: ssm2305: " Xiaxi Shen
2024-05-11 21:47  1% [syzbot] [wireguard?] WARNING in kthread_unpark (2) syzbot
2024-05-11 21:47  1% [PATCH] ASoC: dt-bindings: ssm2602: convert to dt schema Xiaxi Shen
2024-05-11 23:26  1% ` Rob Herring (Arm)
2024-05-11 21:49 10% [folded-merged] mseal-add-mseal-syscall-fix.patch removed from -mm tree Andrew Morton
2024-05-11 21:50  2% [folded-merged] selftest-mm-mseal-read-only-elf-memory-segment-fix.patch " Andrew Morton
2024-05-11 21:50  1% [folded-merged] selftest-mm-mseal-read-only-elf-memory-segment-fix-4.patch " Andrew Morton
2024-05-11 21:56  1% [PATCH v8 0/5] soc: qcom: add in-kernel pd-mapper implementation Dmitry Baryshkov
2024-05-11 21:56  4% ` [PATCH v8 1/5] soc: qcom: pdr: protect locator_addr with the main mutex Dmitry Baryshkov
2024-05-11 21:56  1% ` [PATCH v8 2/5] soc: qcom: pdr: fix parsing of domains lists Dmitry Baryshkov
2024-05-11 21:56  1% ` [PATCH v8 3/5] soc: qcom: pdr: extract PDR message marshalling data Dmitry Baryshkov
2024-05-11 21:56  3% ` [PATCH v8 4/5] soc: qcom: add pd-mapper implementation Dmitry Baryshkov
2024-05-11 21:56  1% ` [PATCH v8 5/5] remoteproc: qcom: enable in-kernel PD mapper Dmitry Baryshkov
2024-05-11 22:04  1% drivers/of/unittest.c:1195 of_unittest_reg() error: uninitialized symbol 'addr' kernel test robot
2024-05-11 22:04  1% [PATCH v4 0/9] arm64: dts: qcom: fix description of the Type-C signals Dmitry Baryshkov
2024-05-11 22:04  4% ` [PATCH v4 1/9] dt-bindings: clk: qcom,dispcc-sm8x50: describe additional DP clocks Dmitry Baryshkov
2024-05-11 22:04  1% ` [PATCH v4 2/9] arm64: dts: qcom: sc8180x: correct dispcc clocks Dmitry Baryshkov
2024-05-11 22:04  1% ` [PATCH v4 3/9] arm64: dts: qcom: sm8250: describe HS signals properly Dmitry Baryshkov
2024-05-11 22:04  5% ` [PATCH v4 4/9] arm64: dts: qcom: sm8250: add a link between DWC3 and QMP PHY Dmitry Baryshkov
2024-05-11 22:04  1% ` [PATCH v4 5/9] arm64: dts: qcom: sc8180x: switch USB+DP QMP PHYs to new bindings Dmitry Baryshkov
2024-05-11 22:04  1% ` [PATCH v4 6/9] arm64: dts: qcom: sc8180x: describe USB signals properly Dmitry Baryshkov
2024-05-11 22:04  1% ` [PATCH v4 7/9] arm64: dts: qcom: sc8280xp: " Dmitry Baryshkov
2024-05-11 22:04  1% ` [PATCH v4 8/9] arm64: dts: qcom: x1e80100: " Dmitry Baryshkov
2024-05-11 22:04  1% ` [PATCH v4 9/9] arm64: dts: qcom: sm8150-hdk: rename Type-C HS endpoints Dmitry Baryshkov
2024-05-11 22:16  1% [PATCH] ip(7), ipv6(7): small fixes: network byte order, etc Askar Safin
2024-05-11 22:17 14% [Buildroot] [git commit] docs/website/index.html: refer to Gitlab and lore Thomas Petazzoni via buildroot
2024-05-11 22:23  1% [Buildroot] [git commit] package/libnss: bump version to 3.100 Thomas Petazzoni via buildroot
2024-05-11 22:32  1% [PATCH v2] docs: document python version used for compilation Dmitry Baryshkov
2024-05-11 22:40 25% [folded-merged] docs-mm-damon-design-use-a-list-for-supported-filters-fix.patch removed from -mm tree Andrew Morton
2024-05-11 22:40  1% [PATCH v2 0/6] Generate address range data for built-in modules Kris Van Hees
2024-05-11 22:40  4% ` [PATCH v2 1/6] kbuild: add modules.builtin.objs Kris Van Hees
2024-05-11 22:40  1% ` [PATCH v2 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option Kris Van Hees
2024-05-11 22:40  9% ` [PATCH v2 3/6] kbuild: generate a linker map for vmlinux.o Kris Van Hees
2024-05-11 22:40  4% ` [PATCH v2 4/6] module: script to generate offset ranges for builtin modules Kris Van Hees
2024-05-11 22:40  4% ` [PATCH v2 5/6] kbuild: generate modules.builtin.ranges when linking the kernel Kris Van Hees
2024-05-11 22:40  1% ` [PATCH v2 6/6] module: add install target for modules.builtin.ranges Kris Van Hees
2024-05-11 22:42  1% [merged mm-stable] selftests-damon-_damon_sysfs-support-quota-goals.patch removed from -mm tree Andrew Morton
2024-05-11 22:42 14% [merged mm-stable] selftests-damon-add-a-test-for-damos-quota-goal.patch " Andrew Morton
2024-05-11 22:42  1% [merged mm-stable] mm-damon-core-initialize-esz_bp-from-damos_quota_init_priv.patch " Andrew Morton
2024-05-11 22:42  1% [merged mm-stable] selftests-damon-_damon_sysfs-use-is-instead-of-==-for-none.patch " Andrew Morton
2024-05-11 22:42  1% [merged mm-stable] docs-admin-guide-mm-damon-usage-fix-wrong-example-of-damos-filter-matching-sysfs-file.patch " Andrew Morton
2024-05-11 22:42  8% [merged mm-stable] docs-admin-guide-mm-damon-usage-fix-wrong-schemes-effective-quota-update-command.patch " Andrew Morton
2024-05-11 22:42 24% [merged mm-stable] docs-mm-damon-design-use-a-list-for-supported-filters.patch " Andrew Morton
2024-05-11 22:42 13% [merged mm-stable] docs-mm-damon-maintainer-profile-change-the-maintainers-timezone-from-pst-to-pt.patch " Andrew Morton
2024-05-11 22:42  1% [merged mm-stable] mm-do-not-update-memcg-stats-for-nr_file-shmem_pmdmapped.patch " Andrew Morton
2024-05-11 22:42  1% [merged mm-stable] mm-damon-core-fix-return-value-from-damos_wmark_metric_value.patch " Andrew Morton
2024-05-11 22:42  5% [merged mm-stable] selftests-cgroup-add-tests-to-verify-the-zswap-writeback-path.patch " Andrew Morton
2024-05-11 22:42  1% [merged mm-stable] mm-hugetlb-add-missing-vm_fault_set_hindex-in-hugetlb_fault.patch " Andrew Morton
2024-05-11 22:42  1% [merged mm-stable] selftests-mm-hugetlb_madv_vs_map-avoid-test-skipping-by-querying-hugepage-size-at-runtime.patch " Andrew Morton
2024-05-11 22:46  1% [syzbot] [bcachefs?] INFO: task hung in bch2_fs_read_only_work syzbot
2024-05-11 22:47  1% [to-be-updated] selftests-mqueue-fix-5-warnings-about-signed-unsigned-mismatches.patch removed from -mm tree Andrew Morton
2024-05-11 22:52 14% [merged mm-nonmm-stable] nilfs2-use-__field_struct-for-a-bitwise-field.patch " Andrew Morton
2024-05-11 22:52  1% [merged mm-nonmm-stable] documentation-coding-style-ask-function-like-macros-to-evaluate-parameters.patch " Andrew Morton
2024-05-11 22:52  6% [merged mm-nonmm-stable] scripts-checkpatch-check-unused-parameters-for-function-like-macro.patch " Andrew Morton
2024-05-11 22:52  1% [merged mm-nonmm-stable] nilfs2-convert-bug_on-in-nilfs_finish_roll_forward-to-warn_on.patch " Andrew Morton
2024-05-11 22:52  1% [merged mm-nonmm-stable] fs-proc-fix-softlockup-in-__read_vmcore.patch " Andrew Morton
2024-05-11 22:55  1% [mst-vhost:vhost 54/54] drivers/vdpa/octeon_ep/octep_vdpa_main.c:538:25: error: implicit declaration of function 'readq'; did you mean 'readl'? kernel test robot
2024-05-11 23:00  1% [PATCH v2 0/7] drm/mipi-dsi: simplify MIPI DSI init/cleanup even more Dmitry Baryshkov
2024-05-11 23:00  1% ` [PATCH v2 1/7] drm/panel: lg-sw43408: add missing error handling Dmitry Baryshkov
2024-05-11 23:00  9% ` [PATCH v2 2/7] drm/mipi-dsi: wrap more functions for streamline handling Dmitry Baryshkov
2024-05-11 23:00  1% ` [PATCH v2 3/7] drm/panel: boe-tv101wum-nl6: use wrapped MIPI DCS functions Dmitry Baryshkov
2024-05-11 23:00  1% ` [PATCH v2 4/7] drm/panel: ilitek-ili9882t: " Dmitry Baryshkov
2024-05-11 23:00  1% ` [PATCH v2 5/7] drm/panel: innolux-p079zca: use mipi_dsi_dcs_nop_multi() Dmitry Baryshkov
2024-05-11 23:00  1% ` [PATCH v2 6/7] drm/panel: novatek-nt36672e: use wrapped MIPI DCS functions Dmitry Baryshkov
2024-05-11 23:00  1% ` [PATCH v2 7/7] drm/panel: lg-sw43408: use new streamlined MIPI DSI API Dmitry Baryshkov
2024-05-11 23:23  1% [syzbot] [btrfs?] possible deadlock in join_transaction syzbot
2024-05-11 23:29  1% What's cooking in git.git (May 2024, #05; Sat, 11) Junio C Hamano
2024-05-11 23:42  1% [linux-linus test] 185982: tolerable FAIL - PUSHED osstest service owner

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.