<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/nubus, 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-05-22T11:51:56+00:00</updated>
<entry>
<title>nubus: Don't list slot resources by default</title>
<updated>2023-05-22T11:51:56+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@linux-m68k.org</email>
</author>
<published>2023-05-16T01:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72b44f6577f15f37fe964c8dcc42a7c5736e604c'/>
<id>urn:sha1:72b44f6577f15f37fe964c8dcc42a7c5736e604c</id>
<content type='text'>
Some Nubus card ROMs contain many slot resources. A single Radius video
card produced well over a thousand entries under /proc/bus/nubus/.
Populating /proc/bus/nubus/ on a slow machine with several such cards
installed takes long enough that the user may think that the system is
wedged. All those procfs entries also consume significant RAM though
they are not normally needed (except by developers).
Omit these resources from /proc/bus/nubus/ by default and add a kernel
parameter to enable them when needed.
On the test machine, this saved 300 kB and 10 seconds.

Cc: Brad Boyer &lt;flar@allandria.com&gt;
Reviewed-by: Brad Boyer &lt;flar@allandria.com&gt;
Tested-by: Stan Johnson &lt;userm57@yahoo.com&gt;
Signed-off-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/71ed7fb234a5f7381a50253b0d841a656d53e64c.1684200125.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Remove proc entries before adding them</title>
<updated>2023-05-22T11:51:48+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@linux-m68k.org</email>
</author>
<published>2023-03-22T00:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7629ce6f492eb2d48b9ee1dab5980c7278514c1'/>
<id>urn:sha1:b7629ce6f492eb2d48b9ee1dab5980c7278514c1</id>
<content type='text'>
The config ROMs on some Nubus cards contain mistakes such as resource
duplication. This results in a warning from proc_register():

    NuBus: Scanning NuBus slots.
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1 at fs/proc/generic.c:376 proc_register+0xbc/0xda
    proc_dir_entry '24/5' already registered
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Not tainted 6.1.0-5-m68k #1  Debian 6.1.12-1
    Stack from 00829d18:
            00829d18 00451507 00451507 00000000 00000009 0038c57c 00451507 00386bae
            00442945 0045f062 00000178 00868580 00868f50 00386c42 0045f062 00000178
            00166fc8 00000009 00000000 00829d78 008685e4 0037f9ec 00000025 00248808
            0045f0df 00829d94 00166fc8 0045f062 00000178 00000009 0045f0df 008689e4
            008685e4 fafe3a20 00868980 00829df3 00829e32 00000024 00829dc0 00167332
            00868980 00868580 00829e40 00248d36 00829df3 00008124 00868980 00248b0c
    Call Trace: [&lt;0038c57c&gt;] dump_stack+0xc/0x10
     [&lt;00386bae&gt;] __warn+0x70/0xbc
     [&lt;00386c42&gt;] warn_slowpath_fmt+0x48/0x66
     [&lt;00166fc8&gt;] proc_register+0xbc/0xda
     [&lt;0037f9ec&gt;] memcmp+0x0/0x56
     [&lt;00248808&gt;] nubus_get_rsrc_str+0x0/0x5e
     [&lt;00166fc8&gt;] proc_register+0xbc/0xda
     [&lt;00167332&gt;] proc_create_single_data+0x40/0x48
     [&lt;00248d36&gt;] nubus_proc_add_rsrc_mem+0x68/0xa4
     [&lt;00008124&gt;] amiga_mksound+0xb8/0xc8
     [&lt;00248b0c&gt;] nubus_proc_rsrc_show+0x0/0xa4
     [&lt;00386180&gt;] memset+0x0/0x94
     [&lt;0024864a&gt;] nubus_readdir+0x0/0x66
     [&lt;00560f35&gt;] nubus_get_vendorinfo.isra.0+0x87/0x10e
     [&lt;00560fb4&gt;] nubus_get_vendorinfo.isra.0+0x106/0x10e
     [&lt;00248d72&gt;] nubus_proc_add_rsrc+0x0/0x8e
     [&lt;001f6f50&gt;] __dynamic_pr_debug+0x0/0x96
     [&lt;0038741e&gt;] _printk+0x0/0x18
     [&lt;0016fafe&gt;] kernfs_link_sibling+0x9a/0xaa
     [&lt;00561cb0&gt;] nubus_init+0x660/0x79c
     [&lt;0037f7c6&gt;] strcpy+0x0/0x1c
     [&lt;0003f58c&gt;] parse_args+0x0/0x308
     [&lt;00002104&gt;] do_one_initcall+0x0/0x184
     [&lt;00561650&gt;] nubus_init+0x0/0x79c
     [&lt;00010000&gt;] frc1_dst+0xe/0x14
     [&lt;00002172&gt;] do_one_initcall+0x6e/0x184
     [&lt;0037f7c6&gt;] strcpy+0x0/0x1c
     [&lt;0003f58c&gt;] parse_args+0x0/0x308
     [&lt;00002104&gt;] do_one_initcall+0x0/0x184
     [&lt;0054b25c&gt;] kernel_init_freeable+0x192/0x19c
     [&lt;00561650&gt;] nubus_init+0x0/0x79c
     [&lt;0038c6c4&gt;] kernel_init+0x0/0xec
     [&lt;0038c6d8&gt;] kernel_init+0x14/0xec
     [&lt;0038c6c4&gt;] kernel_init+0x0/0xec
     [&lt;0000297c&gt;] ret_from_kernel_thread+0xc/0x14

    ---[ end trace 0000000000000000 ]---

This particular card (a Radius video card) contains a duplicated resource
hence the /proc/bus/nubus/a/1/24/5 entry got registered twice.
(A date resource has ID 5, the vendor info directory has ID 24)

The solution for this is to remove a potentially pre-existing entry before
adding the procfs entry for the resource.

Reported-and-tested-by: Stan Johnson &lt;userm57@yahoo.com&gt;
Signed-off-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/dd1b560bbe426b351cdbb3bbf89414753c3d0117.1679446472.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Partially revert proc_create_single_data() conversion</title>
<updated>2023-05-22T11:51:47+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@linux-m68k.org</email>
</author>
<published>2023-03-14T08:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e96647cff9224db564a1cee6efccb13dbe11ee2'/>
<id>urn:sha1:0e96647cff9224db564a1cee6efccb13dbe11ee2</id>
<content type='text'>
The conversion to proc_create_single_data() introduced a regression
whereby reading a file in /proc/bus/nubus results in a seg fault:

    # grep -r . /proc/bus/nubus/e/
    Data read fault at 0x00000020 in Super Data (pc=0x1074c2)
    BAD KERNEL BUSERR
    Oops: 00000000
    Modules linked in:
    PC: [&lt;001074c2&gt;] PDE_DATA+0xc/0x16
    SR: 2010  SP: 38284958  a2: 01152370
    d0: 00000001    d1: 01013000    d2: 01002790    d3: 00000000
    d4: 00000001    d5: 0008ce2e    a0: 00000000    a1: 00222a40
    Process grep (pid: 45, task=142f8727)
    Frame format=B ssw=074d isc=2008 isb=4e5e daddr=00000020 dobuf=01199e70
    baddr=001074c8 dibuf=ffffffff ver=f
    Stack from 01199e48:
	    01199e70 00222a58 01002790 00000000 011a3000 01199eb0 015000c0 00000000
	    00000000 01199ec0 01199ec0 000d551a 011a3000 00000001 00000000 00018000
	    d003f000 00000003 00000001 0002800d 01052840 01199fa8 c01f8000 00000000
	    00000029 0b532b80 00000000 00000000 00000029 0b532b80 01199ee4 00103640
	    011198c0 d003f000 00018000 01199fa8 00000000 011198c0 00000000 01199f4c
	    000b3344 011198c0 d003f000 00018000 01199fa8 00000000 00018000 011198c0
    Call Trace: [&lt;00222a58&gt;] nubus_proc_rsrc_show+0x18/0xa0
     [&lt;000d551a&gt;] seq_read+0xc4/0x510
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;0002800d&gt;] __sys_setreuid+0x115/0x1c6
     [&lt;00103640&gt;] proc_reg_read+0x5c/0xb0
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b3344&gt;] __vfs_read+0x2c/0x13c
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b8aa2&gt;] sys_statx+0x60/0x7e
     [&lt;000b34b6&gt;] vfs_read+0x62/0x12a
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b39c2&gt;] ksys_read+0x48/0xbe
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;000b3a4e&gt;] sys_read+0x16/0x1a
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;00002b84&gt;] syscall+0x8/0xc
     [&lt;00018000&gt;] fp_fcos+0x2/0x82
     [&lt;0000c016&gt;] not_ext+0xa/0x18
    Code: 4e5e 4e75 4e56 0000 206e 0008 2068 ffe8 &lt;2068&gt; 0020 2008 4e5e 4e75 4e56 0000 2f0b 206e 0008 2068 0004 2668 0020 206b ffe8
    Disabling lock debugging due to kernel taint

    Segmentation fault

The proc_create_single_data() conversion does not work because
single_open(file, nubus_proc_rsrc_show, PDE_DATA(inode)) is not
equivalent to the original code.

Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}")
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@vger.kernel.org # 5.6+
Signed-off-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/d4e2a586e793cc8d9442595684ab8a077c0fe726.1678783919.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>nubus: Drop noop match function</title>
<updated>2023-03-20T14:39:14+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-13T18:08:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f400a1dc29f3ed6cb0fe0e58f706b6933f72625'/>
<id>urn:sha1:7f400a1dc29f3ed6cb0fe0e58f706b6933f72625</id>
<content type='text'>
nubus_bus_match() returned 1 unconditionally. This is equivalent to
no match function at all. (See driver_match_device() which does:

	return drv-&gt;bus-&gt;match ? drv-&gt;bus-&gt;match(dev, drv) : 1;

.)

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230313180848.2770504-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>proc: remove PDE_DATA() completely</title>
<updated>2022-01-22T06:33:37+00:00</updated>
<author>
<name>Muchun Song</name>
<email>songmuchun@bytedance.com</email>
</author>
<published>2022-01-22T06:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=359745d78351c6f5442435f81549f0207ece28aa'/>
<id>urn:sha1:359745d78351c6f5442435f81549f0207ece28aa</id>
<content type='text'>
Remove PDE_DATA() completely and replace it with pde_data().

[akpm@linux-foundation.org: fix naming clash in drivers/nubus/proc.c]
[akpm@linux-foundation.org: now fix it properly]

Link: https://lkml.kernel.org/r/20211124081956.87711-2-songmuchun@bytedance.com
Signed-off-by: Muchun Song &lt;songmuchun@bytedance.com&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Alexey Gladkov &lt;gladkov.alexey@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nubus: Simplify check in remove callback</title>
<updated>2021-08-05T12:37:03+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-07-30T19:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67'/>
<id>urn:sha1:f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67</id>
<content type='text'>
The driver core only calls a remove callback when the device was
successfully bound (aka probed) before. So dev-&gt;driver is never NULL and
the respective check can just be dropped.

Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210730191035.1455248-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bus: Make remove callback return void</title>
<updated>2021-07-21T09:53:42+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-07-13T19:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc7a6209d5710618eb4f72a77cd81b8d694ecf89'/>
<id>urn:sha1:fc7a6209d5710618eb4f72a77cd81b8d694ecf89</id>
<content type='text'>
The driver core ignores the return value of this callback because there
is only little it can do when a device disappears.

This is the final bit of a long lasting cleanup quest where several
buses were converted to also return void from their remove callback.
Additionally some resource leaks were fixed that were caused by drivers
returning an error code in the expectation that the driver won't go
away.

With struct bus_type::remove returning void it's prevented that newly
implemented buses return an ignored error code and so don't anticipate
wrong expectations for driver authors.

Reviewed-by: Tom Rix &lt;trix@redhat.com&gt; (For fpga)
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt; (For drivers/s390 and drivers/vfio)
Acked-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt; (For ARM, Amba and related parts)
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt; (for sunxi-rsb)
Acked-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt; (for media)
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt; (For drivers/platform)
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-By: Vinod Koul &lt;vkoul@kernel.org&gt;
Acked-by: Juergen Gross &lt;jgross@suse.com&gt; (For xen)
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt; (For mfd)
Acked-by: Johannes Thumshirn &lt;jth@kernel.org&gt; (For mcb)
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt; (For slimbus)
Acked-by: Kirti Wankhede &lt;kwankhede@nvidia.com&gt; (For vfio)
Acked-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt; (For ulpi and typec)
Acked-by: Samuel Iglesias Gonsálvez &lt;siglesias@igalia.com&gt; (For ipack)
Acked-by: Geoff Levand &lt;geoff@infradead.org&gt; (For ps3)
Acked-by: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt; (For thunderbolt)
Acked-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt; (For intel_th)
Acked-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt; (For pcmcia)
Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt; (For ACPI)
Acked-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt; (rpmsg and apr)
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt; (For intel-ish-hid)
Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt; (For CXL, DAX, and NVDIMM)
Acked-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt; (For isa)
Acked-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt; (For firewire)
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt; (For hid)
Acked-by: Thorsten Scherer &lt;t.scherer@eckelmann.de&gt; (For siox)
Acked-by: Sven Van Asbroeck &lt;TheSven73@gmail.com&gt; (For anybuss)
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt; (For MMC)
Acked-by: Wolfram Sang &lt;wsa@kernel.org&gt; # for I2C
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nubus: Remove cast to void pointer</title>
<updated>2019-10-21T07:08:15+00:00</updated>
<author>
<name>Himanshu Jha</name>
<email>himanshujha199640@gmail.com</email>
</author>
<published>2017-08-27T07:32:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=51b67a6e6592db3b2aa06e870c6546bac095b22b'/>
<id>urn:sha1:51b67a6e6592db3b2aa06e870c6546bac095b22b</id>
<content type='text'>
Casting void pointers to other pointer types is unnecessary.

Signed-off-by: Himanshu Jha &lt;himanshujha199640@gmail.com&gt;
Link: https://lore.kernel.org/r/1503819148-11676-1-git-send-email-himanshujha199640@gmail.com
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier - Makefile/Kconfig</title>
<updated>2019-05-21T08:50:46+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1'/>
<id>urn:sha1:ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1</id>
<content type='text'>
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nubus: Set default dma mask for nubus_board devices</title>
<updated>2018-07-23T13:07:12+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2018-06-25T11:46:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8c5cb994341d4af6d75286fcb66684e53295135'/>
<id>urn:sha1:a8c5cb994341d4af6d75286fcb66684e53295135</id>
<content type='text'>
A 32-bit mask is used by default because a NuBus slot has 32
address/data lines and a NuBus board is free to use all of them.

Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Stan Johnson &lt;userm57@yahoo.com&gt;
Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
</feed>
