summaryrefslogtreecommitdiffstats
path: root/arch/m68k/virt
Commit message (Collapse)AuthorAgeFilesLines
* m68k: Rework BI_VIRT_RNG_SEED as BI_RNG_SEEDJason A. Donenfeld2022-09-281-11/+0
| | | | | | | | | | | | | | | | This is useful on !virt platforms for kexec, so change things from BI_VIRT_RNG_SEED to be BI_RNG_SEED, and simply remove BI_VIRT_RNG_SEED because it only ever lasted one release, and nothing is broken by not having it. At the same time, keep a comment noting that it's been removed, so that ID isn't reused. In addition, we previously documented 2-byte alignment, but 4-byte alignment is actually necessary, so update that comment. Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Fixes: a1ee38ab1a75 ("m68k: virt: Use RNG seed from bootinfo block") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Link: https://lore.kernel.org/r/20220927130835.1629806-2-Jason@zx2c4.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: Add common forward declaration for show_registers()Geert Uytterhoeven2022-07-121-2/+1
| | | | | | | | | | There are several forward declarations for show_registers() in C source files. Replace these by a single common forward declaration in <asm/processor.h>, and include <asm/processor.h> where needed. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Link: https://lore.kernel.org/r/d5b6a7f9af3e82f0ccb67edac09d9ee45d457932.1657114791.git.geert@linux-m68k.org
* m68k: virt: Fix missing platform_device_unregister() on error in ↵Yang Yingliang2022-07-061-25/+33
| | | | | | | | | | | | | | virt_platform_init() Add the missing platform_device_unregister() before return from virt_platform_init() in the error handling case. Fixes: 05d51e42df06 ("m68k: Introduce a virtual m68k machine") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Link: https://lore.kernel.org/r/20220628084903.3147123-1-yangyingliang@huawei.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: virt: Use RNG seed from bootinfo blockJason A. Donenfeld2022-07-061-0/+11
| | | | | | | | | | | | | Other virt VMs can pass RNG seeds via the "rng-seed" device tree property or via UEFI, but m68k doesn't have either. Instead it has its own bootinfo protocol. So this commit adds support for receiving a RNG seed from it, which will be used at the earliest possible time in boot, just like device tree. Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Link: https://lore.kernel.org/r/20220626111509.330159-1-Jason@zx2c4.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: virt: Switch to new sys-off handler APIGeert Uytterhoeven2022-05-251-1/+3
| | | | | | | | | | | | | | | | | | | On m68k with CONFIG_VIRT=y (e.g. virt_defconfig or allmodconfig): arch/m68k/virt/config.c: In function ‘config_virt’: arch/m68k/virt/config.c:129:2: error: ‘mach_power_off’ undeclared (first use in this function); did you mean ‘pm_power_off’? 129 | mach_power_off = virt_halt; | ^~~~~~~~~~~~~~ | pm_power_off Commit 05d51e42df06f021 ("m68k: Introduce a virtual m68k machine") introduced a new user of mach_power_off. Convert it to the new sys-off handler API, too. Reported-by: noreply@ellerman.id.au Fixes: f0f7e5265b3b37b0 ("m68k: Switch to new sys-off handler API") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* m68k: Introduce a virtual m68k machineLaurent Vivier2022-04-114-0/+363
This machine allows to have up to 3.2 GiB and 128 Virtio devices. It is based on android goldfish devices. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Link: https://lore.kernel.org/r/20220406201523.243733-5-laurent@vivier.eu Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>