<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/firmware/google, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/firmware/google?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/firmware/google?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-24T12:59:44Z</updated>
<entry>
<title>firmware: google: Test spinlock on panic path to avoid lockups</title>
<updated>2022-09-24T12:59:44Z</updated>
<author>
<name>Guilherme G. Piccoli</name>
<email>gpiccoli@igalia.com</email>
</author>
<published>2022-09-09T20:07:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3e081438b8e639cc76ef1a5ce0c1bd8a154082c7'/>
<id>urn:sha1:3e081438b8e639cc76ef1a5ce0c1bd8a154082c7</id>
<content type='text'>
Currently the gsmi driver registers a panic notifier as well as
reboot and die notifiers. The callbacks registered are called in
atomic and very limited context - for instance, panic disables
preemption and local IRQs, also all secondary CPUs (not executing
the panic path) are shutdown.

With that said, taking a spinlock in this scenario is a dangerous
invitation for lockup scenarios. So, fix that by checking if the
spinlock is free to acquire in the panic notifier callback - if not,
bail-out and avoid a potential hang.

Fixes: 74c5b31c6618 ("driver: Google EFI SMI")
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: David Gow &lt;davidgow@google.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Julius Werner &lt;jwerner@chromium.org&gt;
Cc: Petr Mladek &lt;pmladek@suse.com&gt;
Reviewed-by: Evan Green &lt;evgreen@chromium.org&gt;
Signed-off-by: Guilherme G. Piccoli &lt;gpiccoli@igalia.com&gt;
Link: https://lore.kernel.org/r/20220909200755.189679-1-gpiccoli@igalia.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: Properly state IOMEM dependency</title>
<updated>2022-03-18T13:18:15Z</updated>
<author>
<name>David Gow</name>
<email>davidgow@google.com</email>
</author>
<published>2022-02-25T04:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=37fd83916da2e4cae03d350015c82a67b1b334c4'/>
<id>urn:sha1:37fd83916da2e4cae03d350015c82a67b1b334c4</id>
<content type='text'>
The Google Coreboot implementation requires IOMEM functions
(memmremap, memunmap, devm_memremap), but does not specify this is its
Kconfig. This results in build errors when HAS_IOMEM is not set, such as
on some UML configurations:

/usr/bin/ld: drivers/firmware/google/coreboot_table.o: in function `coreboot_table_probe':
coreboot_table.c:(.text+0x311): undefined reference to `memremap'
/usr/bin/ld: coreboot_table.c:(.text+0x34e): undefined reference to `memunmap'
/usr/bin/ld: drivers/firmware/google/memconsole-coreboot.o: in function `memconsole_probe':
memconsole-coreboot.c:(.text+0x12d): undefined reference to `memremap'
/usr/bin/ld: memconsole-coreboot.c:(.text+0x17e): undefined reference to `devm_memremap'
/usr/bin/ld: memconsole-coreboot.c:(.text+0x191): undefined reference to `memunmap'
/usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_section_destroy.isra.0':
vpd.c:(.text+0x300): undefined reference to `memunmap'
/usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_section_init':
vpd.c:(.text+0x382): undefined reference to `memremap'
/usr/bin/ld: vpd.c:(.text+0x459): undefined reference to `memunmap'
/usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_probe':
vpd.c:(.text+0x59d): undefined reference to `memremap'
/usr/bin/ld: vpd.c:(.text+0x5d3): undefined reference to `memunmap'
collect2: error: ld returned 1 exit status

Fixes: a28aad66da8b ("firmware: coreboot: Collapse platform drivers into bus core")
Acked-By: anton ivanov &lt;anton.ivanov@cambridgegreys.com&gt;
Acked-By: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: David Gow &lt;davidgow@google.com&gt;
Link: https://lore.kernel.org/r/20220225041502.1901806-1-davidgow@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: Update Kconfig help text for Google firmware</title>
<updated>2021-12-21T09:12:31Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2018-06-18T22:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d185a3466f0cd5af8f1c5c782c53bc0e6f2e7136'/>
<id>urn:sha1:d185a3466f0cd5af8f1c5c782c53bc0e6f2e7136</id>
<content type='text'>
The help text for GOOGLE_FIRMWARE states that it should only be
enabled when building a kernel for Google's own servers.  However,
many of the drivers dependent on it are also useful on Chromebooks or
on any platform using coreboot.

Update the help text to reflect this double duty.

Fixes: d384d6f43d1e ("firmware: google memconsole: Add coreboot support")
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Link: https://lore.kernel.org/r/20180618225540.GD14131@decadent.org.uk
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:42Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-07-13T19:35:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/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>kernel.h: split out panic and oops helpers</title>
<updated>2021-07-01T18:06:04Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-07-01T01:54:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f39650de687e35766572ac89dbcd16a5911e2f0a'/>
<id>urn:sha1:f39650de687e35766572ac89dbcd16a5911e2f0a</id>
<content type='text'>
kernel.h is being used as a dump for all kinds of stuff for a long time.
Here is the attempt to start cleaning it up by splitting out panic and
oops helpers.

There are several purposes of doing this:
- dropping dependency in bug.h
- dropping a loop by moving out panic_notifier.h
- unload kernel.h from something which has its own domain

At the same time convert users tree-wide to use new headers, although for
the time being include new header back to kernel.h to avoid twisted
indirected includes for existing users.

[akpm@linux-foundation.org: thread_info.h needs limits.h]
[andriy.shevchenko@linux.intel.com: ia64 fix]
  Link: https://lkml.kernel.org/r/20210520130557.55277-1-andriy.shevchenko@linux.intel.com

Link: https://lkml.kernel.org/r/20210511074137.33666-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Co-developed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Acked-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Acked-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Acked-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Acked-by: Helge Deller &lt;deller@gmx.de&gt; # parisc
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: Enable s0ix logging by default</title>
<updated>2021-04-02T14:30:21Z</updated>
<author>
<name>Evan Green</name>
<email>evgreen@chromium.org</email>
</author>
<published>2021-04-01T21:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b0077b4b085f636e5f8a1fd9cd6e568907471b24'/>
<id>urn:sha1:b0077b4b085f636e5f8a1fd9cd6e568907471b24</id>
<content type='text'>
Many moons ago, support was added to the SMI handlers to log s0ix entry
and exit. Early iterations of firmware on Apollo Lake correctly returned
"unsupported" for this new command they did not recognize, but
unfortunately also contained a quirk where this command would cause them
to power down rather than resume from s0ix.

Fixes for this quirk were pushed out long ago, so all APL devices still
in the field should have updated firmware. As such, we no longer need to
have the s0ix_logging_enable be opt-in, where every new platform has to
add this to their kernel commandline parameters. Change it to be on by
default.

In theory we could remove the parameter altogether: updated versions of
Chrome OS containing a kernel with this change would also be coupled
with firmware that behaves properly with these commands. Eventually we
should probably do that. For now, convert this to an opt-out parameter
so there's an emergency valve for people who are deliberately running
old firmware, or as an escape hatch in case of unforeseen regressions.

Signed-off-by: Evan Green &lt;evgreen@chromium.org&gt;
Link: https://lore.kernel.org/r/20210401140430.1.Ie141e6044d9b0d5aba72cb08857fdb43660c54d3@changeid
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: make coreboot driver's remove callback return void</title>
<updated>2021-02-09T11:12:43Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2021-01-26T21:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5f6805327982d1fd45355730e9d1adda616b995b'/>
<id>urn:sha1:5f6805327982d1fd45355730e9d1adda616b995b</id>
<content type='text'>
All coreboot drivers return 0 unconditionally in their remove callback.
Also the device core ignores the return value of the struct
bus_type::remove(), so make the coreboot remove callback return void
instead of giving driver authors the illusion they could return an error
code here.

All drivers are adapted accordingly.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Link: https://lore.kernel.org/r/20210126215339.706021-1-uwe@kleine-koenig.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: gsmi: Drop the use of dma_pool_* API functions</title>
<updated>2020-11-09T17:48:06Z</updated>
<author>
<name>Furquan Shaikh</name>
<email>furquan@google.com</email>
</author>
<published>2020-10-22T07:15:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=17adb469bf1ef3c62e9356ab84449df6cad28ed5'/>
<id>urn:sha1:17adb469bf1ef3c62e9356ab84449df6cad28ed5</id>
<content type='text'>
GSMI driver uses dma_pool_* API functions for buffer allocation
because it requires that the SMI buffers are allocated within 32-bit
physical address space. However, this does not work well with IOMMU
since there is no real device and hence no domain associated with the
device.

Since this is not a real device, it does not require any device
address(IOVA) for the buffer allocations. The only requirement is to
ensure that the physical address allocated to the buffer is within
32-bit physical address space. This is because the buffers have
nothing to do with DMA at all. It is required for communication with
firmware executing in SMI mode which has access only to the bottom
4GiB of memory. Hence, this change switches to using a SLAB cache
created with SLAB_CACHE_DMA32 that guarantees that the allocation
happens from the DMA32 memory zone. All calls to dma_pool_* are
replaced with kmem_cache_*.

In addition to that, all the code for managing the dma_pool for GSMI
platform device is dropped.

Signed-off-by: Furquan Shaikh &lt;furquan@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20201022071550.1192947-1-furquan@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>efi: gsmi: fix false dependency on CONFIG_EFI_VARS</title>
<updated>2020-09-29T17:40:57Z</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2020-09-23T08:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9846d86031eeca2fb2867fe4ac9d92803a97e8e4'/>
<id>urn:sha1:9846d86031eeca2fb2867fe4ac9d92803a97e8e4</id>
<content type='text'>
The gsmi code does not actually rely on CONFIG_EFI_VARS, since it only
uses the efivars abstraction that is included unconditionally when
CONFIG_EFI is defined. CONFIG_EFI_VARS controls the inclusion of the
code that exposes the sysfs entries, and which has been deprecated for
some time.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: vpd: Replace zero-length array with flexible-array member</title>
<updated>2020-06-16T04:08:21Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-21T15:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aa125f313d8e7d04bf001175dadeabaf8723c00b'/>
<id>urn:sha1:aa125f313d8e7d04bf001175dadeabaf8723c00b</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having a
dynamically sized set of trailing elements in a structure. Kernel code should
always use “flexible array members”[1] for these cases. The older style of
one-element or zero-length arrays should no longer be used[2].

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://github.com/KSPP/linux/issues/21

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
</content>
</entry>
</feed>
