<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/device/driver.h, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-06-05T16:55:20+00:00</updated>
<entry>
<title>driver core: return bool from driver_probe_done</title>
<updated>2023-06-05T16:55:20+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2023-05-31T12:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa5f6ed8c21ec1aa5fd688118d8d5cd87c5ffc1d'/>
<id>urn:sha1:aa5f6ed8c21ec1aa5fd688118d8d5cd87c5ffc1d</id>
<content type='text'>
bool is the most sensible return value for a yes/no return.  Also
add __init as this funtion is only called from the early boot code.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20230531125535.676098-2-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>driver core: driver.h: remove extern from function prototypes</title>
<updated>2023-03-24T14:35:42+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-03-24T12:27:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a2b9c84c708cf2a99499d5a685a642af7b68c37'/>
<id>urn:sha1:8a2b9c84c708cf2a99499d5a685a642af7b68c37</id>
<content type='text'>
The kernel coding style does not require 'extern' in function prototypes
in .h files, so remove them from include/linux/device/driver.h as they
are not needed.

Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Link: https://lore.kernel.org/r/20230324122711.2664537-3-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: make the bus_type in struct device_driver constant</title>
<updated>2023-03-23T12:21:26+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-03-13T18:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c28dd08ef713d2127c5bad3f3e0e93d6ec0309a2'/>
<id>urn:sha1:c28dd08ef713d2127c5bad3f3e0e93d6ec0309a2</id>
<content type='text'>
The pointer to struct bus_type in struct device_driver should only be
pointing to something that can never change now that the driver core has
fixed up the previously writable fields.  So mark it as a constant
pointer to enforce this and move forward with the goal of moving
bus_type into read-only memory.

Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Link: https://lore.kernel.org/r/20230313182918.1312597-28-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: bus: constify driver_find()</title>
<updated>2023-03-23T12:21:22+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-03-13T18:29:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c06be04251a0b3349868622a2111a54cbfad8d4'/>
<id>urn:sha1:7c06be04251a0b3349868622a2111a54cbfad8d4</id>
<content type='text'>
The driver_find() function can now take a const * to bus_type, not just
a * so fix that up.

Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Link: https://lore.kernel.org/r/20230313182918.1312597-26-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: Make driver_deferred_probe_timeout a static variable</title>
<updated>2023-01-11T15:06:40+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javierm@redhat.com</email>
</author>
<published>2022-12-27T23:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=504fa212d7030fb1c042290dc2eb92b21515573a'/>
<id>urn:sha1:504fa212d7030fb1c042290dc2eb92b21515573a</id>
<content type='text'>
It is not used outside of its compilation unit, so there's no need to
export this variable.

Signed-off-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Andrew Halaney &lt;ahalaney@redhat.com&gt;
Acked-by: John Stultz &lt;jstultz@google.com&gt;
Link: https://lore.kernel.org/r/20221227232152.3094584-1-javierm@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "driver core: Delete driver_deferred_probe_check_state()"</title>
<updated>2022-08-23T11:14:02+00:00</updated>
<author>
<name>Saravana Kannan</name>
<email>saravanak@google.com</email>
</author>
<published>2022-08-19T22:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=13a8e0f6b01b14b2e28ba144e112c883f03a3db2'/>
<id>urn:sha1:13a8e0f6b01b14b2e28ba144e112c883f03a3db2</id>
<content type='text'>
This reverts commit 9cbffc7a59561be950ecc675d19a3d2b45202b2b.

There are a few more issues to fix that have been reported in the thread
for the original series [1]. We'll need to fix those before this will work.
So, revert it for now.

[1] - https://lore.kernel.org/lkml/20220601070707.3946847-1-saravanak@google.com/

Fixes: 9cbffc7a5956 ("driver core: Delete driver_deferred_probe_check_state()")
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Tested-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Tested-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Reviewed-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Saravana Kannan &lt;saravanak@google.com&gt;
Link: https://lore.kernel.org/r/20220819221616.2107893-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: Delete driver_deferred_probe_check_state()</title>
<updated>2022-06-10T13:57:54+00:00</updated>
<author>
<name>Saravana Kannan</name>
<email>saravanak@google.com</email>
</author>
<published>2022-06-01T07:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9cbffc7a59561be950ecc675d19a3d2b45202b2b'/>
<id>urn:sha1:9cbffc7a59561be950ecc675d19a3d2b45202b2b</id>
<content type='text'>
The function is no longer used. So delete it.

Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Saravana Kannan &lt;saravanak@google.com&gt;
Link: https://lore.kernel.org/r/20220601070707.3946847-10-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: Add wait_for_init_devices_probe helper function</title>
<updated>2022-06-10T13:57:54+00:00</updated>
<author>
<name>Saravana Kannan</name>
<email>saravanak@google.com</email>
</author>
<published>2022-06-01T07:07:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f8c3ae8288e4a4018330ed5c4e758b878d9c555'/>
<id>urn:sha1:2f8c3ae8288e4a4018330ed5c4e758b878d9c555</id>
<content type='text'>
Some devices might need to be probed and bound successfully before the
kernel boot sequence can finish and move on to init/userspace. For
example, a network interface might need to be bound to be able to mount
a NFS rootfs.

With fw_devlink=on by default, some of these devices might be blocked
from probing because they are waiting on a optional supplier that
doesn't have a driver. While fw_devlink will eventually identify such
devices and unblock the probing automatically, it might be too late by
the time it unblocks the probing of devices. For example, the IP4
autoconfig might timeout before fw_devlink unblocks probing of the
network interface.

This function is available to temporarily try and probe all devices that
have a driver even if some of their suppliers haven't been added or
don't have drivers.

The drivers can then decide which of the suppliers are optional vs
mandatory and probe the device if possible. By the time this function
returns, all such "best effort" probes are guaranteed to be completed.
If a device successfully probes in this mode, we delete all fw_devlink
discovered dependencies of that device where the supplier hasn't yet
probed successfully because they have to be optional dependencies.

This also means that some devices that aren't needed for init and could
have waited for their optional supplier to probe (when the supplier's
module is loaded later on) would end up probing prematurely with limited
functionality.  So call this function only when boot would fail without
it.

Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Saravana Kannan &lt;saravanak@google.com&gt;
Link: https://lore.kernel.org/r/20220601070707.3946847-5-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver: platform: Add helper for safer setting of driver_override</title>
<updated>2022-04-22T15:13:53+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2022-04-19T11:34:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c2f421174273de8f83cde4286d1c076d43a2d35'/>
<id>urn:sha1:6c2f421174273de8f83cde4286d1c076d43a2d35</id>
<content type='text'>
Several core drivers and buses expect that driver_override is a
dynamically allocated memory thus later they can kfree() it.

However such assumption is not documented, there were in the past and
there are already users setting it to a string literal. This leads to
kfree() of static memory during device release (e.g. in error paths or
during unbind):

    kernel BUG at ../mm/slub.c:3960!
    Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    ...
    (kfree) from [&lt;c058da50&gt;] (platform_device_release+0x88/0xb4)
    (platform_device_release) from [&lt;c0585be0&gt;] (device_release+0x2c/0x90)
    (device_release) from [&lt;c0a69050&gt;] (kobject_put+0xec/0x20c)
    (kobject_put) from [&lt;c0f2f120&gt;] (exynos5_clk_probe+0x154/0x18c)
    (exynos5_clk_probe) from [&lt;c058de70&gt;] (platform_drv_probe+0x6c/0xa4)
    (platform_drv_probe) from [&lt;c058b7ac&gt;] (really_probe+0x280/0x414)
    (really_probe) from [&lt;c058baf4&gt;] (driver_probe_device+0x78/0x1c4)
    (driver_probe_device) from [&lt;c0589854&gt;] (bus_for_each_drv+0x74/0xb8)
    (bus_for_each_drv) from [&lt;c058b48c&gt;] (__device_attach+0xd4/0x16c)
    (__device_attach) from [&lt;c058a638&gt;] (bus_probe_device+0x88/0x90)
    (bus_probe_device) from [&lt;c05871fc&gt;] (device_add+0x3dc/0x62c)
    (device_add) from [&lt;c075ff10&gt;] (of_platform_device_create_pdata+0x94/0xbc)
    (of_platform_device_create_pdata) from [&lt;c07600ec&gt;] (of_platform_bus_create+0x1a8/0x4fc)
    (of_platform_bus_create) from [&lt;c0760150&gt;] (of_platform_bus_create+0x20c/0x4fc)
    (of_platform_bus_create) from [&lt;c07605f0&gt;] (of_platform_populate+0x84/0x118)
    (of_platform_populate) from [&lt;c0f3c964&gt;] (of_platform_default_populate_init+0xa0/0xb8)
    (of_platform_default_populate_init) from [&lt;c01031f8&gt;] (do_one_initcall+0x8c/0x404)

Provide a helper which clearly documents the usage of driver_override.
This will allow later to reuse the helper and reduce the amount of
duplicated code.

Convert the platform driver to use a new helper and make the
driver_override field const char (it is not modified by the core).

Reviewed-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20220419113435.246203-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Add missing includes masked by cgroup -&gt; bpf dependency</title>
<updated>2021-12-03T18:58:13+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-12-02T20:34:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8581fd402a0cf80b5298e3b225e7a7bd8f110e69'/>
<id>urn:sha1:8581fd402a0cf80b5298e3b225e7a7bd8f110e69</id>
<content type='text'>
cgroup.h (therefore swap.h, therefore half of the universe)
includes bpf.h which in turn includes module.h and slab.h.
Since we're about to get rid of that dependency we need
to clean things up.

v2: drop the cpu.h include from cacheinfo.h, it's not necessary
and it makes riscv sensitive to ordering of include files.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Krzysztof Wilczyński &lt;kw@linux.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Acked-by: SeongJae Park &lt;sj@kernel.org&gt;
Acked-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/all/20211120035253.72074-1-kuba@kernel.org/  # v1
Link: https://lore.kernel.org/all/20211120165528.197359-1-kuba@kernel.org/ # cacheinfo discussion
Link: https://lore.kernel.org/bpf/20211202203400.1208663-1-kuba@kernel.org
</content>
</entry>
</feed>
