* [PATCH] powerpc/pseries: Fix update of LPAR security flavor after LPM
From: Laurent Dufour @ 2021-08-05 15:23 UTC (permalink / raw)
To: mpe, benh, paulus; +Cc: linuxppc-dev, linux-kernel, stable
After LPM, when migrating from a system with security mitigation enabled to
a system with mitigation disabled, the security flavor exposed in /proc is
not correctly set back to 0.
Do not assume the value of the security flavor is set to 0 when entering
init_cpu_char_feature_flags(), so when called after a LPM, the value is set
correctly even if the mitigation are not turned off.
Fixes: 6ce56e1ac380 ("powerpc/pseries: export LPAR security flavor in
lparcfg")
Cc: stable@vger.kernel.org # 5.13.x
Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
---
arch/powerpc/platforms/pseries/setup.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 6b0886668465..0dfaa6ab44cc 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -539,9 +539,10 @@ static void init_cpu_char_feature_flags(struct h_cpu_char_result *result)
* H_CPU_BEHAV_FAVOUR_SECURITY_H could be set only if
* H_CPU_BEHAV_FAVOUR_SECURITY is.
*/
- if (!(result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY))
+ if (!(result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)) {
security_ftr_clear(SEC_FTR_FAVOUR_SECURITY);
- else if (result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY_H)
+ pseries_security_flavor = 0;
+ } else if (result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY_H)
pseries_security_flavor = 1;
else
pseries_security_flavor = 2;
--
2.32.0
^ permalink raw reply related
* Re: [PATCH printk v1 00/10] printk: introduce atomic consoles and sync mode
From: Petr Mladek @ 2021-08-05 15:47 UTC (permalink / raw)
To: John Ogness
Cc: Gautham R. Shenoy, Gustavo A. R. Silva, Srikar Dronamraju,
Jiri Slaby, Peter Zijlstra, Al Cooper, Douglas Anderson,
Paul Cercueil, Matthias Brugger, Paul Mackerras, H. Peter Anvin,
Cengiz Can, Chengyang Fan, Daniel Thompson, Eddie Huang,
Bhaskar Chowdhury, Changbin Du, Masahiro Yamada, x86,
linux-mediatek, Tetsuo Handa, Ingo Molnar, linux-serial,
kgdb-bugreport, linux-mips, Wang Qing, Sergey Senozhatsky,
Paul E. McKenney, Johan Hovold, Steven Rostedt, Borislav Petkov,
Nicholas Piggin, Hsin-Yi Wang, Sedat Dilek, Claire Chang,
Thomas Gleixner, Andy Shevchenko, Andrij Abyzov, linux-arm-kernel,
Sumit Garg, kuldip dwivedi, Andrew Jeffery, Greg Kroah-Hartman,
Zhang Qilong, Nick Desaulniers, linux-kernel, Sergey Senozhatsky,
Guenter Roeck, Jason Wessel, Christophe JAILLET, Andrew Morton,
Maciej W. Rozycki, linuxppc-dev, Vitor Massaru Iha,
Cédric Le Goater
In-Reply-To: <20210803131301.5588-1-john.ogness@linutronix.de>
On Tue 2021-08-03 15:18:51, John Ogness wrote:
> Hi,
>
> This is the next part of our printk-rework effort (points 3 and
> 4 of the LPC 2019 summary [0]).
>
> Here the concept of "atomic consoles" is introduced through a
> new (optional) write_atomic() callback for console drivers. This
> callback must be implemented as an NMI-safe variant of the
> write() callback, meaning that it can function from any context
> without relying on questionable tactics such as ignoring locking
> and also without relying on the synchronization of console
> semaphore.
>
> As an example of how such an atomic console can look like, this
> series implements write_atomic() for the 8250 UART driver.
>
> This series also introduces a new console printing mode called
> "sync mode" that is only activated when the kernel is about to
> end (such as panic, oops, shutdown, reboot). Sync mode can only
> be activated if atomic consoles are available. A system without
> registered atomic consoles will be unaffected by this series.
>
> When in sync mode, the console printing behavior becomes:
>
> - only consoles implementing write_atomic() will be called
>
> - printing occurs within vprintk_store() instead of
> console_unlock(), since the console semaphore is irrelevant
> for atomic consoles
I am fine with the new behavior at this stage. It is a quite clear
win when (only) the atomic console is used. And it does not make any
difference when atomic consoles are disabled.
But I am not sure about the proposed terms and implementation.
I want to be sure that we are on the right way for introducing
console kthreads.
Let me try to compare the behavior:
1. before this patchset():
/* printk: store immediately; try all consoles immediately */
int printk(...)
{
vprintk_store();
if (console_try_lock()) {
/* flush pending messages to the consoles */
console_unlock();
}
}
/* panic: try hard to flush messages to the consoles and avoid deadlock */
void panic()
{
/* Ignore locks in console drivers */
bust_spinlocks(1);
printk("Kernel panic ...);
dump_stack();
smp_send_stop();
/* ignore console lock */
console_flush_on_panic();
}
2. after this patchset():
+ same as before in normal mode or when there is no atomic console
+ in panic with atomic console; it modifies the behavior:
/*
* printk: store immediately; immediately flush atomic consoles;
* unsafe consoles are not used anymore;
*/
int printk(...)
{
vprintk_store();
flush_atomic_consoles();
}
/* panic: no hacks; only atomic consoles are used */
void panic()
{
printk("Kernel panic ...);
dump_stack();
}
3. After introducing console kthread(s):
int printk(...)
{
vprintk_store();
wake_consoles_via_irqwork();
}
+ in panic:
+ with atomic console like after this patchset?
+ without atomic consoles?
+ during early boot?
I guess that we will need another sync mode for the early boot,
panic, suspend, kexec, etc.. It must be posible to debug these states
even wihtout atomic console and working kthreads.
Best Regards,
Petr
^ permalink raw reply
* Re: [PATCH 1/3] arch: Export machine_restart() instances so they can be called from modules
From: Catalin Marinas @ 2021-08-05 17:36 UTC (permalink / raw)
To: Lee Jones
Cc: Rich Felker, Greg Kroah-Hartman, John Crispin, Sebastian Reichel,
James E . J . Bottomley, Max Filippov, Guo Ren, linux-csky,
sparclinux, linux-hexagon, linux-riscv, Will Deacon,
Thomas Gleixner, Anton Ivanov, Jonas Bonn, linux-s390, Brian Cain,
Helge Deller, linux-sh, Ley Foon Tan, Christian Borntraeger,
Ingo Molnar, Geert Uytterhoeven, linux-snps-arc, Jeff Dike,
uclinux-h8-devel, linux-xtensa, Albert Ou, Vasily Gorbik,
Heiko Carstens, linux-um, Stefan Kristiansson, linux-m68k,
openrisc, Borislav Petkov, Paul Walmsley, Stafford Horne,
linux-arm-kernel, Chris Zankel, Michal Simek, Thomas Bogendoerfer,
linux-mips, Yoshinori Sato, linux-parisc, Vineet Gupta,
linux-kernel, Palmer Dabbelt, Richard Weinberger, linuxppc-dev,
David S . Miller
In-Reply-To: <20210805075032.723037-2-lee.jones@linaro.org>
On Thu, Aug 05, 2021 at 08:50:30AM +0100, Lee Jones wrote:
> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
> index b4bb67f17a2ca..cf89ce91d7145 100644
> --- a/arch/arm64/kernel/process.c
> +++ b/arch/arm64/kernel/process.c
> @@ -212,6 +212,7 @@ void machine_restart(char *cmd)
> printk("Reboot failed -- System halted\n");
> while (1);
> }
> +EXPORT_SYMBOL(machine_restart);
Should we make this EXPORT_SYMBOL_GPL? I suppose it's not for general
use by out of tree drivers and it matches the other pm_power_off symbol
we export in this file.
Either way:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
^ permalink raw reply
* Re: [PATCH 1/3] arch: Export machine_restart() instances so they can be called from modules
From: Greg Kroah-Hartman @ 2021-08-05 18:41 UTC (permalink / raw)
To: Catalin Marinas
Cc: Rich Felker, linux-sh, John Crispin, Sebastian Reichel,
James E . J . Bottomley, Max Filippov, Guo Ren, linux-csky,
sparclinux, linux-hexagon, linux-riscv, Lee Jones,
Thomas Gleixner, Anton Ivanov, Jonas Bonn, linux-s390,
Vasily Gorbik, Brian Cain, Helge Deller, Ley Foon Tan,
Christian Borntraeger, Ingo Molnar, Geert Uytterhoeven,
linux-snps-arc, Jeff Dike, uclinux-h8-devel, linux-xtensa,
Albert Ou, Will Deacon, Heiko Carstens, linux-um,
Stefan Kristiansson, linux-m68k, openrisc, Borislav Petkov,
Paul Walmsley, Stafford Horne, linux-arm-kernel, Chris Zankel,
Michal Simek, Thomas Bogendoerfer, linux-mips, Yoshinori Sato,
linux-parisc, Vineet Gupta, linux-kernel, Palmer Dabbelt,
Richard Weinberger, linuxppc-dev, David S . Miller
In-Reply-To: <20210805173625.GH6719@arm.com>
On Thu, Aug 05, 2021 at 06:36:25PM +0100, Catalin Marinas wrote:
> On Thu, Aug 05, 2021 at 08:50:30AM +0100, Lee Jones wrote:
> > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
> > index b4bb67f17a2ca..cf89ce91d7145 100644
> > --- a/arch/arm64/kernel/process.c
> > +++ b/arch/arm64/kernel/process.c
> > @@ -212,6 +212,7 @@ void machine_restart(char *cmd)
> > printk("Reboot failed -- System halted\n");
> > while (1);
> > }
> > +EXPORT_SYMBOL(machine_restart);
>
> Should we make this EXPORT_SYMBOL_GPL? I suppose it's not for general
> use by out of tree drivers and it matches the other pm_power_off symbol
> we export in this file.
Yes please.
^ permalink raw reply
* Re: [PATCH 1/3] arch: Export machine_restart() instances so they can be called from modules
From: Lee Jones @ 2021-08-05 18:54 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Rich Felker, linux-sh, Catalin Marinas, Paul Walmsley,
Sebastian Reichel, James E . J . Bottomley, Max Filippov, Guo Ren,
linux-csky, sparclinux, linux-hexagon, linux-riscv, Will Deacon,
Thomas Gleixner, Anton Ivanov, Jonas Bonn, linux-s390, Brian Cain,
Helge Deller, Ley Foon Tan, Christian Borntraeger, Ingo Molnar,
Geert Uytterhoeven, linux-snps-arc, Jeff Dike, uclinux-h8-devel,
linux-xtensa, Albert Ou, Vasily Gorbik, Heiko Carstens, linux-um,
Stefan Kristiansson, linux-m68k, openrisc, Borislav Petkov,
John Crispin, Stafford Horne, linux-arm-kernel, Chris Zankel,
Michal Simek, Thomas Bogendoerfer, linux-mips, Yoshinori Sato,
linux-parisc, Vineet Gupta, linux-kernel, Palmer Dabbelt,
Richard Weinberger, linuxppc-dev, David S . Miller
In-Reply-To: <YQww08x2whx/LIIT@kroah.com>
On Thu, 05 Aug 2021, Greg Kroah-Hartman wrote:
> On Thu, Aug 05, 2021 at 06:36:25PM +0100, Catalin Marinas wrote:
> > On Thu, Aug 05, 2021 at 08:50:30AM +0100, Lee Jones wrote:
> > > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
> > > index b4bb67f17a2ca..cf89ce91d7145 100644
> > > --- a/arch/arm64/kernel/process.c
> > > +++ b/arch/arm64/kernel/process.c
> > > @@ -212,6 +212,7 @@ void machine_restart(char *cmd)
> > > printk("Reboot failed -- System halted\n");
> > > while (1);
> > > }
> > > +EXPORT_SYMBOL(machine_restart);
> >
> > Should we make this EXPORT_SYMBOL_GPL? I suppose it's not for general
> > use by out of tree drivers and it matches the other pm_power_off symbol
> > we export in this file.
>
> Yes please.
Sure.
Thanks for the feedback.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [RFC PATCH 02/15] arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER
From: Zi Yan @ 2021-08-05 19:02 UTC (permalink / raw)
To: David Hildenbrand, linux-mm
Cc: linux-ia64, linux-sh, Catalin Marinas, Michal Hocko, Guo Ren,
Ley Foon Tan, sparclinux, Yoshinori Sato, Matthew Wilcox,
Geert Uytterhoeven, Vlastimil Babka, Zi Yan, linux-snps-arc,
linux-xtensa, John Hubbard, linuxppc-dev, linux-mips, linux-m68k,
linux-csky, linux-arm-kernel, Chris Zankel, Thomas Bogendoerfer,
Vineet Gupta, linux-kernel, linux-oxnas, Shawn Guo,
David S. Miller, Kirill A . Shutemov, Mike Kravetz
In-Reply-To: <20210805190253.2795604-1-zi.yan@sent.com>
From: Zi Yan <ziy@nvidia.com>
This Kconfig option is used by individual arch to set its desired
MAX_ORDER. Rename it to reflect its actual use.
Signed-off-by: Zi Yan <ziy@nvidia.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Guo Ren <guoren@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Chris Zankel <chris@zankel.net>
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-oxnas@groups.io
Cc: linux-csky@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-mips@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-sh@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: linux-xtensa@linux-xtensa.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
arch/arc/Kconfig | 2 +-
arch/arm/Kconfig | 2 +-
arch/arm/configs/imx_v6_v7_defconfig | 2 +-
arch/arm/configs/milbeaut_m10v_defconfig | 2 +-
arch/arm/configs/oxnas_v6_defconfig | 2 +-
arch/arm/configs/sama7_defconfig | 2 +-
arch/arm64/Kconfig | 2 +-
arch/csky/Kconfig | 2 +-
arch/ia64/Kconfig | 2 +-
arch/ia64/include/asm/sparsemem.h | 6 +++---
arch/m68k/Kconfig.cpu | 2 +-
arch/mips/Kconfig | 2 +-
arch/nios2/Kconfig | 2 +-
arch/powerpc/Kconfig | 2 +-
arch/powerpc/configs/85xx/ge_imp3a_defconfig | 2 +-
arch/powerpc/configs/fsl-emb-nonhw.config | 2 +-
arch/sh/configs/ecovec24_defconfig | 2 +-
arch/sh/mm/Kconfig | 2 +-
arch/sparc/Kconfig | 2 +-
arch/xtensa/Kconfig | 2 +-
include/linux/mmzone.h | 4 ++--
21 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index b5bf68e74732..923ea4c31e59 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -583,7 +583,7 @@ config ARC_BUILTIN_DTB_NAME
endmenu # "ARC Architecture Configuration"
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
default "12" if ARC_HUGEPAGE_16M
default "11"
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2fb7012c3246..286854318fe5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1523,7 +1523,7 @@ config ARM_MODULE_PLTS
Disabling this is usually safe for small single-platform
configurations. If unsure, say y.
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
default "12" if SOC_AM33XX
default "9" if SA1111
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 079fcd8d1d11..802310d3ebf5 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -34,7 +34,7 @@ CONFIG_PCI_IMX6=y
CONFIG_SMP=y
CONFIG_ARM_PSCI=y
CONFIG_HIGHMEM=y
-CONFIG_FORCE_MAX_ZONEORDER=14
+CONFIG_ARCH_FORCE_MAX_ORDER=14
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
CONFIG_KEXEC=y
CONFIG_CPU_FREQ=y
diff --git a/arch/arm/configs/milbeaut_m10v_defconfig b/arch/arm/configs/milbeaut_m10v_defconfig
index 7c07f9893a0f..06967243f74d 100644
--- a/arch/arm/configs/milbeaut_m10v_defconfig
+++ b/arch/arm/configs/milbeaut_m10v_defconfig
@@ -26,7 +26,7 @@ CONFIG_THUMB2_KERNEL=y
# CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11 is not set
# CONFIG_ARM_PATCH_IDIV is not set
CONFIG_HIGHMEM=y
-CONFIG_FORCE_MAX_ZONEORDER=12
+CONFIG_ARCH_FORCE_MAX_ORDER=12
CONFIG_SECCOMP=y
CONFIG_KEXEC=y
CONFIG_EFI=y
diff --git a/arch/arm/configs/oxnas_v6_defconfig b/arch/arm/configs/oxnas_v6_defconfig
index cae0db6b4eaf..df8462272446 100644
--- a/arch/arm/configs/oxnas_v6_defconfig
+++ b/arch/arm/configs/oxnas_v6_defconfig
@@ -17,7 +17,7 @@ CONFIG_MACH_OX820=y
CONFIG_SMP=y
CONFIG_NR_CPUS=16
CONFIG_CMA=y
-CONFIG_FORCE_MAX_ZONEORDER=12
+CONFIG_ARCH_FORCE_MAX_ORDER=12
CONFIG_SECCOMP=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
diff --git a/arch/arm/configs/sama7_defconfig b/arch/arm/configs/sama7_defconfig
index 938aae4bd80b..f8683b87cb27 100644
--- a/arch/arm/configs/sama7_defconfig
+++ b/arch/arm/configs/sama7_defconfig
@@ -22,7 +22,7 @@ CONFIG_ATMEL_CLOCKSOURCE_TCB=y
# CONFIG_CACHE_L2X0 is not set
# CONFIG_ARM_PATCH_IDIV is not set
# CONFIG_CPU_SW_DOMAIN_PAN is not set
-CONFIG_FORCE_MAX_ZONEORDER=15
+CONFIG_ARCH_FORCE_MAX_ORDER=15
CONFIG_UACCESS_WITH_MEMCPY=y
# CONFIG_ATAGS is not set
CONFIG_CMDLINE="console=ttyS0,115200 earlyprintk ignore_loglevel"
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b5b13a932561..972d81f6bb2c 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1152,7 +1152,7 @@ config XEN
help
Say Y if you want to run Linux in a Virtual Machine on Xen on ARM64.
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int
default "14" if ARM64_64K_PAGES
default "12" if ARM64_16K_PAGES
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 2716f6395ba7..0fd2333226b7 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -307,7 +307,7 @@ config HIGHMEM
select KMAP_LOCAL
default y
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
default "11"
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 4993c7ac7ff6..d1bd010ee7a5 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -200,7 +200,7 @@ config IA64_CYCLONE
Say Y here to enable support for IBM EXA Cyclone time source.
If you're unsure, answer N.
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "MAX_ORDER (11 - 17)" if !HUGETLB_PAGE
range 11 17 if !HUGETLB_PAGE
default "17" if HUGETLB_PAGE
diff --git a/arch/ia64/include/asm/sparsemem.h b/arch/ia64/include/asm/sparsemem.h
index 42ed5248fae9..84e8ce387b69 100644
--- a/arch/ia64/include/asm/sparsemem.h
+++ b/arch/ia64/include/asm/sparsemem.h
@@ -11,10 +11,10 @@
#define SECTION_SIZE_BITS (30)
#define MAX_PHYSMEM_BITS (50)
-#ifdef CONFIG_FORCE_MAX_ZONEORDER
-#if ((CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS)
+#ifdef CONFIG_ARCH_FORCE_MAX_ORDER
+#if ((CONFIG_ARCH_FORCE_MAX_ORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS)
#undef SECTION_SIZE_BITS
-#define SECTION_SIZE_BITS (CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT)
+#define SECTION_SIZE_BITS (CONFIG_ARCH_FORCE_MAX_ORDER - 1 + PAGE_SHIFT)
#endif
#endif
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 29e946394fdb..c39157f3dd87 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -408,7 +408,7 @@ config SINGLE_MEMORY_CHUNK
order" to save memory that could be wasted for unused memory map.
Say N if not sure.
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order" if ADVANCED
depends on !SINGLE_MEMORY_CHUNK
default "11"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 6dfb27d531dd..0998f671ed7e 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2284,7 +2284,7 @@ config PAGE_SIZE_64KB
endchoice
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
range 14 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
default "14" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index c24955c81c92..e5c300198e1f 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -50,7 +50,7 @@ menu "Kernel features"
source "kernel/Kconfig.hz"
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
range 9 20
default "11"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 2e213ec6ec05..5edb48b363c4 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -810,7 +810,7 @@ config DATA_SHIFT
in that case. If PIN_TLB is selected, it must be aligned to 8M as
8M pages will be pinned.
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
range 8 9 if PPC64 && PPC_64K_PAGES
default "9" if PPC64 && PPC_64K_PAGES
diff --git a/arch/powerpc/configs/85xx/ge_imp3a_defconfig b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
index f29c166998af..e7672c186325 100644
--- a/arch/powerpc/configs/85xx/ge_imp3a_defconfig
+++ b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
@@ -30,7 +30,7 @@ CONFIG_PREEMPT=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=m
CONFIG_MATH_EMULATION=y
-CONFIG_FORCE_MAX_ZONEORDER=17
+CONFIG_ARCH_FORCE_MAX_ORDER=17
CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCI_MSI=y
diff --git a/arch/powerpc/configs/fsl-emb-nonhw.config b/arch/powerpc/configs/fsl-emb-nonhw.config
index df37efed0aec..521e7a530888 100644
--- a/arch/powerpc/configs/fsl-emb-nonhw.config
+++ b/arch/powerpc/configs/fsl-emb-nonhw.config
@@ -41,7 +41,7 @@ CONFIG_FIXED_PHY=y
CONFIG_FONT_8x16=y
CONFIG_FONT_8x8=y
CONFIG_FONTS=y
-CONFIG_FORCE_MAX_ZONEORDER=13
+CONFIG_ARCH_FORCE_MAX_ORDER=13
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAME_WARN=1024
CONFIG_FTL=y
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig
index 03cb916819fa..4c09ca308d43 100644
--- a/arch/sh/configs/ecovec24_defconfig
+++ b/arch/sh/configs/ecovec24_defconfig
@@ -8,7 +8,7 @@ CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_CPU_SUBTYPE_SH7724=y
-CONFIG_FORCE_MAX_ZONEORDER=12
+CONFIG_ARCH_FORCE_MAX_ORDER=12
CONFIG_MEMORY_SIZE=0x10000000
CONFIG_FLATMEM_MANUAL=y
CONFIG_SH_ECOVEC=y
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index ba569cfb4368..411fdc0901f7 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -18,7 +18,7 @@ config PAGE_OFFSET
default "0x80000000" if MMU
default "0x00000000"
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
range 9 64 if PAGE_SIZE_16KB
default "9" if PAGE_SIZE_16KB
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index f0c0f955e169..2206c99612ed 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -273,7 +273,7 @@ config ARCH_SPARSEMEM_ENABLE
config ARCH_SPARSEMEM_DEFAULT
def_bool y if SPARC64
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
default "13"
help
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index b843902ad9fd..90784aa68cf8 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -709,7 +709,7 @@ config HIGHMEM
If unsure, say Y.
-config FORCE_MAX_ZONEORDER
+config ARCH_FORCE_MAX_ORDER
int "Maximum zone order"
default "11"
help
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index c1d914a72489..98e3297b9e09 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -24,10 +24,10 @@
#include <asm/page.h>
/* Free memory management - zoned buddy allocator. */
-#ifndef CONFIG_FORCE_MAX_ZONEORDER
+#ifndef CONFIG_ARCH_FORCE_MAX_ORDER
#define MAX_ORDER 11
#else
-#define MAX_ORDER CONFIG_FORCE_MAX_ZONEORDER
+#define MAX_ORDER CONFIG_ARCH_FORCE_MAX_ORDER
#endif
#define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1))
--
2.30.2
^ permalink raw reply related
* [PATCH v2 0/3] KVM: PPC: Book3S HV: kvmhv_copy_tofrom_guest_radix changes
From: Fabiano Rosas @ 2021-08-05 21:26 UTC (permalink / raw)
To: kvm-ppc; +Cc: linuxppc-dev, christophe.leroy, npiggin
This series contains the fix for __kvmhv_copy_tofrom_guest_radix plus
a couple of changes.
- Patch 1: The fix itself. I thought a smaller fix upfront would be
better to facilitate any backports.
- Patch 2: Adds a sanity check to the low level function. Since the
hcall API already enforces that the effective address must
be on quadrant 0, moving the checks from the high level
function would only add overhead to the hcall path, so I
opted for a lightweight check at the low level.
- Patch 3: Cleans up the EXPORT_SYMBOL_GPL tags. I don't see how they
would be needed since the functions are contained within
kvm-hv.ko.
v1:
https://lkml.kernel.org/r/20210802234941.2568493-1-farosas@linux.ibm.com
Fabiano Rosas (3):
KVM: PPC: Book3S HV: Fix copy_tofrom_guest routines
KVM: PPC: Book3S HV: Add sanity check to copy_tofrom_guest
KVM: PPC: Book3S HV: Stop exporting symbols from book3s_64_mmu_radix
arch/powerpc/kvm/book3s_64_mmu_radix.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
--
2.29.2
^ permalink raw reply
* [PATCH v2 2/3] KVM: PPC: Book3S HV: Add sanity check to copy_tofrom_guest
From: Fabiano Rosas @ 2021-08-05 21:26 UTC (permalink / raw)
To: kvm-ppc; +Cc: linuxppc-dev, christophe.leroy, npiggin
In-Reply-To: <20210805212616.2641017-1-farosas@linux.ibm.com>
Both paths into __kvmhv_copy_tofrom_guest_radix ensure that we arrive
with an effective address that is smaller than our total addressable
space and addresses quadrant 0.
- The H_COPY_TOFROM_GUEST hypercall path rejects the call with
H_PARAMETER if the effective address has any of the twelve most
significant bits set.
- The kvmhv_copy_tofrom_guest_radix path clears the top twelve bits
before calling the internal function.
Although the callers make sure that the effective address is sane, any
future use of the function is exposed to a programming error, so add a
sanity check.
Suggested-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
arch/powerpc/kvm/book3s_64_mmu_radix.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c
index 44eb7b1ef289..1b1c9e9e539b 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_radix.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c
@@ -44,6 +44,9 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,
(to != NULL) ? __pa(to): 0,
(from != NULL) ? __pa(from): 0, n);
+ if (eaddr & (0xFFFUL << 52))
+ return ret;
+
quadrant = 1;
if (!pid)
quadrant = 2;
--
2.29.2
^ permalink raw reply related
* [PATCH v2 3/3] KVM: PPC: Book3S HV: Stop exporting symbols from book3s_64_mmu_radix
From: Fabiano Rosas @ 2021-08-05 21:26 UTC (permalink / raw)
To: kvm-ppc; +Cc: linuxppc-dev, christophe.leroy, npiggin
In-Reply-To: <20210805212616.2641017-1-farosas@linux.ibm.com>
The book3s_64_mmu_radix.o object is not part of the KVM builtins and
all the callers of the exported symbols are in the same kvm-hv.ko
module so we should not need to export any symbols.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
arch/powerpc/kvm/book3s_64_mmu_radix.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c
index 1b1c9e9e539b..16359525a40f 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_radix.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c
@@ -86,7 +86,6 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,
return ret;
}
-EXPORT_SYMBOL_GPL(__kvmhv_copy_tofrom_guest_radix);
static long kvmhv_copy_tofrom_guest_radix(struct kvm_vcpu *vcpu, gva_t eaddr,
void *to, void *from, unsigned long n)
@@ -122,14 +121,12 @@ long kvmhv_copy_from_guest_radix(struct kvm_vcpu *vcpu, gva_t eaddr, void *to,
return ret;
}
-EXPORT_SYMBOL_GPL(kvmhv_copy_from_guest_radix);
long kvmhv_copy_to_guest_radix(struct kvm_vcpu *vcpu, gva_t eaddr, void *from,
unsigned long n)
{
return kvmhv_copy_tofrom_guest_radix(vcpu, eaddr, NULL, from, n);
}
-EXPORT_SYMBOL_GPL(kvmhv_copy_to_guest_radix);
int kvmppc_mmu_walk_radix_tree(struct kvm_vcpu *vcpu, gva_t eaddr,
struct kvmppc_pte *gpte, u64 root,
--
2.29.2
^ permalink raw reply related
* [PATCH v2 1/3] KVM: PPC: Book3S HV: Fix copy_tofrom_guest routines
From: Fabiano Rosas @ 2021-08-05 21:26 UTC (permalink / raw)
To: kvm-ppc; +Cc: linuxppc-dev, christophe.leroy, npiggin
In-Reply-To: <20210805212616.2641017-1-farosas@linux.ibm.com>
The __kvmhv_copy_tofrom_guest_radix function was introduced along with
nested HV guest support. It uses the platform's Radix MMU quadrants to
provide a nested hypervisor with fast access to its nested guests
memory (H_COPY_TOFROM_GUEST hypercall). It has also since been added
as a fast path for the kvmppc_ld/st routines which are used during
instruction emulation.
The commit def0bfdbd603 ("powerpc: use probe_user_read() and
probe_user_write()") changed the low level copy function from
raw_copy_from_user to probe_user_read, which adds a check to
access_ok. In powerpc that is:
static inline bool __access_ok(unsigned long addr, unsigned long size)
{
return addr < TASK_SIZE_MAX && size <= TASK_SIZE_MAX - addr;
}
and TASK_SIZE_MAX is 0x0010000000000000UL for 64-bit, which means that
setting the two MSBs of the effective address (which correspond to the
quadrant) now cause access_ok to reject the access.
This was not caught earlier because the most common code path via
kvmppc_ld/st contains a fallback (kvm_read_guest) that is likely to
succeed for L1 guests. For nested guests there is no fallback.
Another issue is that probe_user_read (now __copy_from_user_nofault)
does not return the number of bytes not copied in case of failure, so
the destination memory is not being cleared anymore in
kvmhv_copy_from_guest_radix:
ret = kvmhv_copy_tofrom_guest_radix(vcpu, eaddr, to, NULL, n);
if (ret > 0) <-- always false!
memset(to + (n - ret), 0, ret);
This patch fixes both issues by skipping access_ok and open-coding the
low level __copy_to/from_user_inatomic.
Fixes: def0bfdbd603 ("powerpc: use probe_user_read() and probe_user_write()")
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
arch/powerpc/kvm/book3s_64_mmu_radix.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c
index b5905ae4377c..44eb7b1ef289 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_radix.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c
@@ -65,10 +65,12 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,
}
isync();
+ pagefault_disable();
if (is_load)
- ret = copy_from_user_nofault(to, (const void __user *)from, n);
+ ret = __copy_from_user_inatomic(to, (const void __user *)from, n);
else
- ret = copy_to_user_nofault((void __user *)to, from, n);
+ ret = __copy_to_user_inatomic((void __user *)to, from, n);
+ pagefault_enable();
/* switch the pid first to avoid running host with unallocated pid */
if (quadrant == 1 && pid != old_pid)
--
2.29.2
^ permalink raw reply related
* Re: [PATCH v4 1/3] audit: replace magic audit syscall class numbers with macros
From: Paul Moore @ 2021-08-05 22:01 UTC (permalink / raw)
To: Richard Guy Briggs
Cc: linux-s390, linux-ia64, linux-parisc, Arnd Bergmann, x86, LKML,
Eric Paris, sparclinux, Aleksa Sarai, Linux-Audit Mailing List,
Alexander Viro, linux-alpha, linux-fsdevel, Eric Paris,
Steve Grubb, linuxppc-dev
In-Reply-To: <2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com>
On Wed, May 19, 2021 at 4:01 PM Richard Guy Briggs <rgb@redhat.com> wrote:
>
> Replace audit syscall class magic numbers with macros.
>
> This required putting the macros into new header file
> include/linux/auditsc_classmacros.h since the syscall macros were
> included for both 64 bit and 32 bit in any compat code, causing
> redefinition warnings.
>
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> Link: https://lore.kernel.org/r/2300b1083a32aade7ae7efb95826e8f3f260b1df.1621363275.git.rgb@redhat.com
> ---
> MAINTAINERS | 1 +
> arch/alpha/kernel/audit.c | 8 ++++----
> arch/ia64/kernel/audit.c | 8 ++++----
> arch/parisc/kernel/audit.c | 8 ++++----
> arch/parisc/kernel/compat_audit.c | 9 +++++----
> arch/powerpc/kernel/audit.c | 10 +++++-----
> arch/powerpc/kernel/compat_audit.c | 11 ++++++-----
> arch/s390/kernel/audit.c | 10 +++++-----
> arch/s390/kernel/compat_audit.c | 11 ++++++-----
> arch/sparc/kernel/audit.c | 10 +++++-----
> arch/sparc/kernel/compat_audit.c | 11 ++++++-----
> arch/x86/ia32/audit.c | 11 ++++++-----
> arch/x86/kernel/audit_64.c | 8 ++++----
> include/linux/audit.h | 1 +
> include/linux/auditsc_classmacros.h | 23 +++++++++++++++++++++++
> kernel/auditsc.c | 12 ++++++------
> lib/audit.c | 10 +++++-----
> lib/compat_audit.c | 11 ++++++-----
> 18 files changed, 102 insertions(+), 71 deletions(-)
> create mode 100644 include/linux/auditsc_classmacros.h
...
> diff --git a/include/linux/auditsc_classmacros.h b/include/linux/auditsc_classmacros.h
> new file mode 100644
> index 000000000000..18757d270961
> --- /dev/null
> +++ b/include/linux/auditsc_classmacros.h
> @@ -0,0 +1,23 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/* auditsc_classmacros.h -- Auditing support syscall macros
> + *
> + * Copyright 2021 Red Hat Inc., Durham, North Carolina.
> + * All Rights Reserved.
> + *
> + * Author: Richard Guy Briggs <rgb@redhat.com>
> + */
> +#ifndef _LINUX_AUDITSCM_H_
> +#define _LINUX_AUDITSCM_H_
> +
> +enum auditsc_class_t {
> + AUDITSC_NATIVE = 0,
> + AUDITSC_COMPAT,
> + AUDITSC_OPEN,
> + AUDITSC_OPENAT,
> + AUDITSC_SOCKETCALL,
> + AUDITSC_EXECVE,
> +
> + AUDITSC_NVALS /* count */
> +};
> +
> +#endif
My apologies Richard, for some reason I had it in my mind that this
series was waiting on you to answer a question and/or respin; however,
now that I'm clearing my patch queues looking for any stragglers I see
that isn't the case. Looking over the patchset I think it looks okay
to me, my only concern is that "auditsc_classmacros.h" is an awfully
specific header file name and could prove to be annoying if we want to
add to it in the future. What do you think about something like
"audit_arch.h" instead?
If that change is okay with you I can go ahead and do the rename while
I'm merging the patches, I'll consider it penance for letting this
patchset sit for so long :/
--
paul moore
www.paul-moore.com
^ permalink raw reply
* Re: [PATCH v2 5/6] PCI: Adapt all code locations to not use struct pci_dev::driver directly
From: Andrew Donnellan @ 2021-08-05 15:09 UTC (permalink / raw)
To: Uwe Kleine-König, Bjorn Helgaas
Cc: Mark Rutland, Giovanni Cabiddu, Rafał Miłecki,
Peter Zijlstra, linux-pci, Alexander Duyck, Sathya Prakash,
oss-drivers, Paul Mackerras, H. Peter Anvin, Jiri Olsa,
Boris Ostrovsky, linux-perf-users, Stefano Stabellini, Herbert Xu,
linux-scsi, Ido Schimmel, x86, qat-linux, Alexander Shishkin,
Ingo Molnar, linux-wireless, Jakub Kicinski, Mathias Nyman,
Yisen Zhuang, Fiona Trahe, Arnd Bergmann, Konrad Rzeszutek Wilk,
Suganath Prabu Subramani, Simon Horman, Arnaldo Carvalho de Melo,
Borislav Petkov, Michael Buesch, Jiri Pirko, Namhyung Kim,
Thomas Gleixner, Andy Shevchenko, Juergen Gross, Salil Mehta,
Sreekanth Reddy, xen-devel, Vadym Kochan, MPT-FusionLinux.pdl,
Greg Kroah-Hartman, linux-usb, Wojciech Ziemba, linux-kernel,
Taras Chornyi, Zhou Wang, linux-crypto, kernel, netdev,
Frederic Barrat, Oliver O'Halloran, linuxppc-dev,
David S. Miller
In-Reply-To: <20210803100150.1543597-6-u.kleine-koenig@pengutronix.de>
On 3/8/21 8:01 pm, Uwe Kleine-König wrote:
> This prepares removing the driver member of struct pci_dev which holds the
> same information than struct pci_dev::dev->driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
cxl hunks look alright.
Acked-by: Andrew Donnellan <ajd@linux.ibm.com> # cxl
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
^ permalink raw reply
* Re: [PATCH v2 0/6] PCI: Drop duplicated tracking of a pci_dev's bound driver
From: Bjorn Helgaas @ 2021-08-05 23:42 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Mark Rutland, Giovanni Cabiddu, Rafał Miłecki,
Peter Zijlstra, linux-pci, Alexander Duyck, Sathya Prakash,
oss-drivers, Paul Mackerras, H. Peter Anvin, Jiri Olsa,
Boris Ostrovsky, linux-perf-users, Stefano Stabellini, Herbert Xu,
linux-scsi, Ido Schimmel, x86, qat-linux, Alexander Shishkin,
Ingo Molnar, linux-wireless, Jakub Kicinski, Mathias Nyman,
Yisen Zhuang, Fiona Trahe, Andrew Donnellan, Arnd Bergmann,
Konrad Rzeszutek Wilk, Suganath Prabu Subramani, Simon Horman,
Arnaldo Carvalho de Melo, Borislav Petkov, Michael Buesch,
Jiri Pirko, Bjorn Helgaas, Namhyung Kim, Thomas Gleixner,
Andy Shevchenko, Juergen Gross, Salil Mehta, Sreekanth Reddy,
xen-devel, Vadym Kochan, MPT-FusionLinux.pdl, Greg Kroah-Hartman,
linux-usb, Wojciech Ziemba, linux-kernel, Taras Chornyi,
Zhou Wang, linux-crypto, kernel, netdev, Frederic Barrat,
Oliver O'Halloran, linuxppc-dev, David S. Miller
In-Reply-To: <20210803100150.1543597-1-u.kleine-koenig@pengutronix.de>
On Tue, Aug 03, 2021 at 12:01:44PM +0200, Uwe Kleine-König wrote:
> Hello,
>
> changes since v1 (https://lore.kernel.org/linux-pci/20210729203740.1377045-1-u.kleine-koenig@pengutronix.de):
>
> - New patch to simplify drivers/pci/xen-pcifront.c, spotted and
> suggested by Boris Ostrovsky
> - Fix a possible NULL pointer dereference I introduced in xen-pcifront.c
> - A few whitespace improvements
> - Add a commit log to patch #6 (formerly #5)
>
> I also expanded the audience for patches #4 and #6 to allow affected
> people to actually see the changes to their drivers.
>
> Interdiff can be found below.
>
> The idea is still the same: After a few cleanups (#1 - #3) a new macro
> is introduced abstracting access to struct pci_dev->driver. All users
> are then converted to use this and in the last patch the macro is
> changed to make use of struct pci_dev::dev->driver to get rid of the
> duplicated tracking.
I love the idea of this series!
I looked at all the bus_type.probe() methods, it looks like pci_dev is
not the only offender here. At least the following also have a driver
pointer in the device struct:
parisc_device.driver
acpi_device.driver
dio_dev.driver
hid_device.driver
pci_dev.driver
pnp_dev.driver
rio_dev.driver
zorro_dev.driver
Do you plan to do the same for all of them, or is there some reason
why they need the pointer and PCI doesn't?
In almost all cases, other buses define a "to_<bus>_driver()"
interface. In fact, PCI already has a to_pci_driver().
This series adds pci_driver_of_dev(), which basically just means we
can do this:
pdrv = pci_driver_of_dev(pdev);
instead of this:
pdrv = to_pci_driver(pdev->dev.driver);
I don't see any other "<bus>_driver_of_dev()" interfaces, so I assume
other buses just live with the latter style? I'd rather not be
different and have two ways to get the "struct pci_driver *" unless
there's a good reason.
Looking through the places that care about pci_dev.driver (the ones
updated by patch 5/6), many of them are ... a little dubious to begin
with. A few need the "struct pci_error_handlers *err_handler"
pointer, so that's probably legitimate. But many just need a name,
and should probably be using dev_driver_string() instead.
Bjorn
^ permalink raw reply
* Re: Debian SID kernel doesn't boot on PowerBook 3400c
From: Finn Thain @ 2021-08-06 1:06 UTC (permalink / raw)
To: Christophe Leroy; +Cc: debian-powerpc, linuxppc-dev, Stan Johnson
In-Reply-To: <6ea50cd7-84d3-5180-0430-1211aaf0e308@yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 6039 bytes --]
(Christophe, you've seen some of this before, however there are new
results added at the end. I've Cc'd the mailing lists this time.)
On Wed, 4 Aug 2021, Stan Johnson wrote:
> On 8/4/21 8:41 PM, Finn Thain wrote:
>
> >
> > $ curl https://lore.kernel.org/lkml/9b64dde3-6ebd-b446-41d9-61e8cb0d8c39@csgroup.eu/raw
> > ../message.mbox
> ok
>
> $ sha1 ../message.mbox
> SHA1 (../message.mbox) = 436ce0adf893c46c84c54607f73c838897caeeea
>
> >
> > On Wed, 4 Aug 2021, Christophe Leroy wrote:
> >
> >> Can you check if they happen at commit c16728835
> >>
>
> $ git checkout c16728835eec
> Checking out files: 100% (20728/20728), done.
> Note: checking out 'c16728835eec'.
>
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
>
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
>
> git checkout -b <new-branch-name>
>
> HEAD is now at c16728835eec powerpc/32: Manage KUAP in C
> $ git am ../message.mbox
> warning: Patch sent with format=flowed; space at the end of lines might be lost.
> Applying: powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE
> $ cp ../dot-config-powermac-5.13 .config
> $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4 clean olddefconfig vmlinux
> $ strings vmlinux | fgrep 'Linux version'
> Linux version 5.12.0-rc3-pmac-00078-geb51c431b81 (johnson@ThinkPad) (powerpc-linux-gnu-gcc (Debian 8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP Wed Aug 4 21:50:47 MDT 2021
>
> 1) PB 3400c
> Hangs at boot (Mac OS screen), no serial console output
>
> 2) Wallstreet
> X fails, errors ("Kernel attempted to write user page", "BUG: Unable to
> handle kernel instruction fetch"), see Wallstreet_console-1.txt.
>
The log shows that the error "Kernel attempted to write user page
(b3399774) - exploit attempt?" happens after commit c16728835eec
("powerpc/32: Manage KUAP in C").
> >>
> >> Can you check if they DO NOT happen at preceding commit c16728835~
> >>
>
> $ git checkout c16728835~
> Previous HEAD position was c16728835eec powerpc/32: Manage KUAP in C
> HEAD is now at 0b45359aa2df powerpc/8xx: Create C version of kuap save/restore/check helpers
> $ git am ../message.mbox
> warning: Patch sent with format=flowed; space at the end of lines might be lost.
> Applying: powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE
> $ cp ../dot-config-powermac-5.13 .config
> $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4 clean olddefconfig vmlinux
>
> Linux version 5.12.0-rc3-pmac-00077-gc9f6e8dd045
>
> 3) PB 3400c
> Hangs at boot (Mac OS screen)
>
> 4) Wallstreet
> X fails, errors in console log (different than test 2), see
> Wallstreet_console-2.txt.
>
This log shows that the errors "xfce4-session[1775]: bus error (7)" and
"kernel BUG at arch/powerpc/kernel/interrupt.c:49!" happen prior to commit
c16728835eec ("powerpc/32: Manage KUAP in C").
>
> $ git checkout 0b45359aa2df
> ...
> HEAD is now at 0b45359aa2df powerpc/8xx: Create C version of kuap save/restore/check helpers
> $ git am ../message.mbox
> warning: Patch sent with format=flowed; space at the end of lines might be lost.
> Applying: powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE
> $ cp ../dot-config-powermac-5.13 .config
> $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4 clean olddefconfig vmlinux
>
> Linux version 5.12.0-rc3-pmac-00077-ge06b29ce146
>
> 5) PB 3400c
> Hangs at boot (Mac OS screen)
>
> 6) Wallstreet
> X failed (X login succeeded, but setting up desktop failed), errors in
> console log, see Wallstreet_console-3.txt.
>
(No need for those two tests: it's exactly the same code and almost the
same failure modes: "kernel BUG at arch/powerpc/kernel/interrupt.c:50".)
On Thu, 5 Aug 2021, Stan Johnson wrote:
> On 8/5/21 12:47 AM, Finn Thain wrote:
>
> > On Wed, 4 Aug 2021, Christophe Leroy wrote:
> >
> >> Could you test without CONFIG_PPC_KUAP
> ...
>
> $ git checkout c16728835eec
> ...
> HEAD is now at c16728835eec powerpc/32: Manage KUAP in C
> $ git am ../message.mbox
> warning: Patch sent with format=flowed; space at the end of lines might be lost.
> Applying: powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE
> $ cp ../dot-config-powermac-5.13 .config
> $ scripts/config -d CONFIG_PPC_KUAP
> $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4 clean olddefconfig vmlinux
> $ grep CONFIG_PPC_KUAP .config
> # CONFIG_PPC_KUAP is not set
>
> Linux version 5.12.0-rc3-pmac-00078-g5cac2bc3752
>
> 7) PB 3400c
> Hangs at boot (Mac OS screen)
>
> 8) Wallstreet
> Everything works, no errors (see Wallstreet_console-4.txt).
>
That would seem to implicate CONFIG_PPC_KUAP itself. (Note that all builds
up until this one have CONFIG_PPC_KUAP=y.)
>
> >
> >> Could you test with CONFIG_PPC_KUAP and CONFIG_PPC_KUAP_DEBUG
> ...
>
> $scripts/config -e CONFIG_PPC_KUAP
> $ scripts/config -e CONFIG_PPC_KUAP_DEBUG
> $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4 clean olddefconfig vmlinux
> $ grep CONFIG_PPC_KUAP .config
> CONFIG_PPC_KUAP=y
> CONFIG_PPC_KUAP_DEBUG=y
>
> Linux version 5.12.0-rc3-pmac-00078-g5cac2bc3752
>
> 9) PB 3400c
> Hangs at boot (Mac OS screen)
>
> 10) Wallstreet
> X failed at first login, worked at second login, one error in console
> log ("BUG: Unable to handle kernel instruction fetch"), see
> Wallstreet_console-5.txt.
>
One might expect to see "Kernel attempted to write user page (b3399774) -
exploit attempt?" again here (see c16728835eec build above) but instead
this log says "Oops: Kernel access of bad area, sig: 11".
BTW, this procedure could be made simpler and easier if I pushed git
branches to a public repo for Stan to build, which included Christophe's
fix plus hard-wired Kconfig changes. That way, the .config file could be
held constant and the commit hash in the serial console log would be more
meaningful.
[-- Attachment #2: Type: text/plain, Size: 21560 bytes --]
printk: console [ttyS0] enabled
printk: bootconsole [udbg0] disabled
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
devtmpfs: initialized
Duplicate name in PowerPC,750, renamed to "l2-cache#1"
Duplicate name in pci, renamed to "mac-io#1"
Duplicate name in pci, renamed to "pccard#1"
Found Grackle (MPC106) PCI host bridge at 0x0000000080000000. Firmware bus number: 0->0
PCI host bridge /pci (primary) ranges:
IO 0x00000000fe000000..0x00000000fe7fffff -> 0x0000000000000000
MEM 0x00000000fd000000..0x00000000fdffffff -> 0x0000000000000000
MEM 0x0000000080000000..0x00000000fcffffff -> 0x0000000080000000
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered protocol family 16
PMU i2c /pci/mac-io/via-pmu
channel 1 bus <multibus>
channel 2 bus <multibus>
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x7fffff]
pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfdffffff] (bus address [0x00000000-0x00ffffff])
pci_bus 0000:00: root bus resource [mem 0x80000000-0xfcffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
pci 0000:00:00.0: [1057:0002] type 00 class 0x060000
pci 0000:00:0d.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:0d.0: reg 0x10: [mem 0xf4000000-0xf407ffff]
pci 0000:00:10.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:10.0: reg 0x10: [mem 0xf3000000-0xf307ffff]
pci 0000:00:11.0: [1002:4c50] type 00 class 0x038000
pci 0000:00:11.0: reg 0x10: [mem 0x82000000-0x82ffffff]
pci 0000:00:11.0: reg 0x14: [io 0x0400-0x04ff]
pci 0000:00:11.0: reg 0x18: [mem 0x82fff000-0x82ffffff]
pci 0000:00:11.0: reg 0x30: [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: supports D1 D2
pci 0000:00:13.0: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.0: reg 0x10: [mem 0x81803000-0x81803fff]
pci 0000:00:13.1: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.1: reg 0x10: [mem 0x81802000-0x81802fff]
pci_bus 0000:01: extended config space not accessible
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 04
pci_bus 0000:05: extended config space not accessible
pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 08
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 08
PCI: Cannot allocate resource region 2 of device 0000:00:11.0, will remap
PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]
pci 0000:00:13.0: BAR 9: assigned [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: BAR 10: assigned [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: BAR 9: assigned [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: BAR 10: assigned [mem 0x90000000-0x93ffffff]
pci 0000:00:11.0: BAR 6: assigned [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: BAR 2: assigned [mem 0xfd020000-0xfd020fff]
pci 0000:00:13.0: BAR 7: assigned [io 0x1000-0x10ff]
pci 0000:00:13.0: BAR 8: assigned [io 0x1100-0x11ff]
pci 0000:00:13.1: BAR 7: assigned [io 0x1200-0x12ff]
pci 0000:00:13.1: BAR 8: assigned [io 0x1300-0x13ff]
pci 0000:00:13.0: CardBus bridge to [bus 01-04]
pci 0000:00:13.0: bridge window [io 0x1000-0x10ff]
pci 0000:00:13.0: bridge window [io 0x1100-0x11ff]
pci 0000:00:13.0: bridge window [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: bridge window [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: CardBus bridge to [bus 05-08]
pci 0000:00:13.1: bridge window [io 0x1200-0x12ff]
pci 0000:00:13.1: bridge window [io 0x1300-0x13ff]
pci 0000:00:13.1: bridge window [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: bridge window [mem 0x90000000-0x93ffffff]
pci_bus 0000:00: resource 4 [io 0x0000-0x7fffff]
pci_bus 0000:00: resource 5 [mem 0xfd000000-0xfdffffff]
pci_bus 0000:00: resource 6 [mem 0x80000000-0xfcffffff]
pci_bus 0000:01: resource 0 [io 0x1000-0x10ff]
pci_bus 0000:01: resource 1 [io 0x1100-0x11ff]
pci_bus 0000:01: resource 2 [mem 0x84000000-0x87ffffff pref]
pci_bus 0000:01: resource 3 [mem 0x88000000-0x8bffffff]
pci_bus 0000:05: resource 0 [io 0x1200-0x12ff]
pci_bus 0000:05: resource 1 [io 0x1300-0x13ff]
pci_bus 0000:05: resource 2 [mem 0x8c000000-0x8fffffff pref]
pci_bus 0000:05: resource 3 [mem 0x90000000-0x93ffffff]
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 32 bytes, default 32
Thermal assist unit using workqueue, shrink_timer: 2000 ms
workingset: timestamp_bits=30 max_order=17 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler mq-deadline registered
pci 0000:00:11.0: enabling device (0086 -> 0087)
Using unsupported 1024x768 (null) at 82801000, depth=32, pitch=4096
Console: switching to colour frame buffer device 128x48
fb0: Open Firmware frame buffer device on /pci/ATY,RageLTPro
pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
Non-volatile memory driver v1.3
brd: module loaded
loop: module loaded
MacIO PCI driver attached to Gatwick chipset
MacIO PCI driver attached to Heathrow chipset
swim3 0.00015000:floppy: [fd0] SWIM3 floppy controller in media bay
0.00013020:ch-a: ttyS0 at MMIO 0xf3013020 (irq = 16, base_baud = 230400) is a Z85c30 ESCC - Serial port
0.00013000:ch-b: ttyS1 at MMIO 0xf3013000 (irq = 17, base_baud = 230400) is a Z85c30 ESCC - Infrared port
macio: fixed media-bay irq on gatwick
macio: fixed left floppy irqs
swim3 1.00015000:floppy: [fd1] Couldn't request interrupt
swim3: probe of 1.00015000:floppy failed with error -16
macio: fixed left ide irqs
macio: fixed SCC irqs on gatwick
1.00013020:ch-a: ttyS2 at MMIO 0xf4013020 (irq = 79, base_baud = 230400) is a Z85c30 ESCC - Internal modem
mediabay0: Registered Heathrow media-bay
mediabay1: Registered Heathrow media-bay
mediabay0: Bay contains an ATA device
PMU Backlight initialized (pmubl)
mesh: configured for synchronous 5 MB/s
mediabay1: Bay contains a floppy drive
mesh: performing initial bus reset...
random: fast init done
adb device [2]: 2 0xC3
adb device [3]: 3 0x1
adb device [7]: 7 0x1F
ADB keyboard at 2 has handler 0xC3
Detected ADB keyboard, type ANSI.
input: ADB keyboard as /devices/virtual/input/input0
input: ADB Powerbook buttons as /devices/virtual/input/input1
ADB mouse (trackpad) at 3 has handler 0x4
input: ADB mouse as /devices/virtual/input/input2
scsi host0: MESH
pata-macio 0.00020000:ata0: Activating pata-macio chipset Heathrow ATA, Apple bus ID 0
scsi host1: pata_macio
ata1: PATA max MWDMA2 irq 30
ata1.00: ATA-7: SAMSUNG HM100JC, YN100-08, max UDMA/100
ata1.00: 195371568 sectors, multi 8: LBA48
scsi 1:0:0:0: Direct-Access ATA SAMSUNG HM100JC 0-08 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 195371568 512-byte logical blocks: (100 GB/93.2 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
pata-macio 0.00021000:ata1: Activating pata-macio chipset Heathrow ATA, Apple bus ID 1
scsi host2: pata_macio
ata2: PATA max MWDMA2 irq 36
pata-macio 1.00021000:ata4: Activating pata-macio chipset Heathrow ATA, Apple bus ID 4
genirq: Flags mismatch irq 36. 00000000 (pata-macio[1.00021000:ata4]) vs. 00000000 (pata-macio[0.00021000:ata1])
pata-macio: probe of 1.00021000:ata4 failed with error -16
ata2.00: ATA-6: ST9160821A, 3.ALD, max UDMA/100
ata2.00: 312581808 sectors, multi 0: LBA48
eth0: BMAC at 00:05:02:07:5a:a6
aoe: AoE v85 initialised.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-generic rtc-generic: registered as rtc0
i2c /dev entries driver
PowerMac i2c bus pmu 2 registered
PowerMac i2c bus pmu 1 registered
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
drmem: No dynamic reconfiguration memory found
sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15
sd 1:0:0:0: [sda] Attached SCSI disk
scsi 2:0:0:0: Direct-Access ATA ST9160821A D PQ: 0 ANSI: 5
sd 2:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: [mac] sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14
sd 2:0:0:0: [sdb] Attached SCSI disk
EXT4-fs (sda12): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda12): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
VFS: Mounted root (ext3 filesystem) readonly on device 8:12.
Freeing unused kernel memory: 1224K
Kernel memory protection not selected by kernel config.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
findfs: unable to resolve 'LABEL=Debian_sid'
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...random: crng init done
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
done.
Setting up keyboard layout...done.
Activating swap...Adding 524284k swap on /dev/sda14. Priority:-2 extents:1 across:524284k
done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Checking root file system...Debian_sid: clean, 76261/524288 files, 1036537/2097152 blocks
done.
EXT4-fs (sda12): re-mounted. Opts: errors=remount-ro. Quota mode: disabled.
Checking file systems...data: clean, 83287/3325952 files, 2159937/13280326 blocks
done.
Cleaning up temporary files...
/tmp.
Loading kernel module lp.
modprobe: FATAL: Module lp not found in directory /lib/modules/5.12.0-rc3-pmac-00078-geb51c431b81
Loading kernel module ppdev.
modprobe: FATAL: Module ppdev not found in directory /lib/modules/5.12.0-rc3-pmac-00078-geb51c431b81
Loading kernel module parport_pc.
modprobe: FATAL: Module parport_pc not found in directory /lib/modules/5.12.0-rc3-pmac-00078-geb51c431b81
Loading kernel module apm_emu.
modprobe: FATAL: Module apm_emu not found in directory /lib/modules/5.12.0-rc3-pmac-00078-geb51c431b81
Loading kernel module bmac.
modprobe: FATAL: Module bmac not found in directory /lib/modules/5.12.0-rc3-pmac-00078-geb51c431b81
Loading kernel module mesh.
modprobe: FATAL: Module mesh not found in directory /lib/modules/5.12.0-rc3-pmac-00078-geb51c431b81
Loading kernel module snd-powermac.
modprobe: FATAL: Module snd-powermac not found in directory /lib/modules/5.12.0-rc3-pmac-00078-geb51c431b81
EXT4-fs (sda15): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda15): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
Mounting local filesystems...done.
Activating swapfile swap, if any...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Configuring network interfaces...done.
Cleaning up temporary files....
Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix
.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Setting up console font and keymap...done.
Recovering nvi editor sessions.
none found.
Starting enhanced syslogd: rsyslogd.
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd.
Starting S.M.A.R.T. daemon: smartd.
Starting WINGs display manager: wdm:.
Deconfiguring network interfaces...
done.
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Debian GNU/Linux 11 mac-server ttyS0
mac-server login: Kernel attempted to write user page (b3399774) - exploit attempt? (uid: 1000)
BUG: Unable to handle kernel data access on write at 0xb3399774
Faulting instruction address: 0xb21cb370
Oops: Kernel access of bad area, sig: 11 [#1]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1880 Comm: xfwm4 Not tainted 5.12.0-rc3-pmac-00078-geb51c431b81 #1
NIP: b21cb370 LR: b21cb34c CTR: b21cb340
REGS: e2e79f40 TRAP: 0300 Not tainted (5.12.0-rc3-pmac-00078-geb51c431b81)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 44004202 XER: 20000000
DAR: b3399774 DSISR: 42000000
GPR00: b7de5d50 bf8ab0e0 b559f720 b259b430 b3399774 b3302cb0 00000688 b3395d10
GPR08: b3395d00 00000000 b3395d20 b696c690 b21cb290 0055f694 00000000 bff67e04
GPR16: 00000000 00000000 0000002e 90000000 0075c718 0000001c 00000000 00200000
GPR24: 00000000 0000002b 00567880 bf8ad1a4 00000005 b326d24c b32f4d44 00000027
NIP [b21cb370] 0xb21cb370
LR [b21cb34c] 0xb21cb34c
Call Trace:
---[ end trace 8c58fa6ae8a8114e ]---
BUG: Unable to handle kernel instruction fetch
Faulting instruction address: 0x706d2e70
Oops: Kernel access of bad area, sig: 11 [#2]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1889 Comm: xfsettingsd Tainted: G D 5.12.0-rc3-pmac-00078-geb51c431b81 #1
NIP: 706d2e70 LR: 706d2e73 CTR: c0218ebc
REGS: e2e79e70 TRAP: 0400 Tainted: G D (5.12.0-rc3-pmac-00078-geb51c431b81)
MSR: 40001030 <ME,IR,DR> CR: 24048828 XER: 00000000
GPR00: 706d2e73 e2e79f30 c14f6ac0 00000000 00000000 00000000 00000001 c1c52400
GPR08: 00000000 402386ea 402387fb ffffffff 24048424 00c1fac8 00000000 bff67e04
GPR16: 00000000 00000000 00cba8c0 00000012 00000000 b7f99cb8 bf8e6470 00000000
GPR24: bf8e667c 00000002 90000002 b7f99cb8 00000000 00cba8c0 b7f9aff0 bf8e6400
NIP [706d2e70] 0x706d2e70
LR [706d2e73] 0x706d2e73
Call Trace:
[e2e79f30] [c0016058] ret_from_syscall+0xc/0x28 (unreliable)
--- interrupt: c00 at 0xb7f7ab14
NIP: b7f7ab14 LR: b7f62f08 CTR: c0152b1c
REGS: e2e79f40 TRAP: 0c00 Tainted: G D (5.12.0-rc3-pmac-00078-geb51c431b81)
MSR: 0000f932 <EE,PR,FP,ME,IR,DR,RI> CR: 44048224 XER: 00000000
GPR00: 0000011e bf8e63d0 b3b01db0 0000000f 00cba8c0 00090000 00000000 bf8e667c
GPR08: 00000000 676c6962 b7f80d74 00000000 00000005 00c1fac8 00000000 bff67e04
GPR16: 00000000 00000000 00cba8c0 00000012 00000000 b7f99cb8 bf8e6470 00000000
GPR24: bf8e667c 00000002 90000002 b7f99cb8 00000000 00cba8c0 b7f9aff0 bf8e6400
NIP [b7f7ab14] 0xb7f7ab14
LR [b7f62f08] 0xb7f62f08
--- interrupt: c00
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
---[ end trace 8c58fa6ae8a8114f ]---
BUG: Unable to handle kernel instruction fetch (NULL pointer?)
Faulting instruction address: 0x00000000
Oops: Kernel access of bad area, sig: 11 [#3]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1903 Comm: xfdesktop Tainted: G D 5.12.0-rc3-pmac-00078-geb51c431b81 #1
NIP: 00000000 LR: 00000000 CTR: 000003f7
REGS: e2eb1e70 TRAP: 0400 Tainted: G D (5.12.0-rc3-pmac-00078-geb51c431b81)
MSR: 40001030 <ME,IR,DR> CR: 28444468 XER: 20000000
GPR00: 00000000 e2eb1f30 cdc73400 00000000 00000000 00000000 00000062 c0000000
GPR08: 00000000 4025ef9a 4025f0ab c193ad48 24444268 009bf34c 00c01a90 bff67d14
GPR16: 00000000 00000064 80003555 00c0ca90 00000000 00c0e4b0 00000000 00c0e4b0
GPR24: b60c3cdc 00c0e490 00c0e470 00000001 00c0e470 b60c3cdc b6963ff4 00c0e4c0
NIP [00000000] 0x0
LR [00000000] 0x0
Call Trace:
[e2eb1f30] [c0016058] ret_from_syscall+0xc/0x28 (unreliable)
--- interrupt: c00 at 0xb6876048
NIP: b6876048 LR: b6096dc8 CTR: b6810b70
REGS: e2eb1f40 TRAP: 0c00 Tainted: G D (5.12.0-rc3-pmac-00078-geb51c431b81)
MSR: 0000f932 <EE,PR,FP,ME,IR,DR,RI> CR: 24444260 XER: 00000000
GPR00: 00000021 bfbf9440 b52bc4e0 00000000 00000004 00c0e4d4 00000000 7f7f7f7f
GPR08: 74732f00 00000000 00000000 b6810b70 44444260 009bf34c 00c01a90 bff67d14
GPR16: 00000000 00000064 80003555 00c0ca90 00000000 00c0e4b0 00000000 00c0e4b0
GPR24: b60c3cdc 00c0e490 00c0e470 00000001 00c0e470 b60c3cdc b6963ff4 00c0e4c0
NIP [b6876048] 0xb6876048
LR [b6096dc8] 0xb6096dc8
--- interrupt: c00
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
---[ end trace 8c58fa6ae8a81150 ]---
mac-server login: root
Password:
Linux mac-server 5.12.0-rc3-pmac-00078-geb51c431b81 #1 SMP Wed Aug 4 21:50:47 MDT 2021 ppc
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Aug 4 22:04:38 MDT 2021 on ttyS0
root@mac-server:~# shutdown -r now
Broadcast message from root@mac-server (ttyS0) (Wed Aug 4 22:33:07 2021):
The system is going down for reboot NOW!
Broadcast message from root@mac-server (ttyS0) (Wed Aug 4 22:33:07 2021):
The system is going down for reboot NOW!
INIT: Sending processes configured via /etc/iUsing makefile-style concurrent boot in runlevel 6.
Stopping mouse emulation daemon: mouseemu.
Stopping hotplug events dispatcher: systemd-udevd.
Stopping S.M.A.R.T. daemon: smartd.
BUG: Unable to handle kernel instruction fetch
Faulting instruction address: 0x7d6903a4
Oops: Kernel access of bad area, sig: 11 [#4]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1882 Comm: gdbus Tainted: G D 5.12.0-rc3-pmac-00078-geb51c431b81 #1
NIP: 7d6903a4 LR: 7d6903a6 CTR: c00d08ac
REGS: e2e7de70 TRAP: 0400 Tainted: G D (5.12.0-rc3-pmac-00078-geb51c431b81)
MSR: 40001030 <ME,IR,DR> CR: 20022248 XER: 20000000
GPR00: 7d6903a6 e2e7df30 c47720c0 00000000 00000000 00000000 cc7ae1de b9f4812a
GPR08: 00000000 401eed9a 401eeeab 00000000 20022248 0055f694 00801000 b6b5e308
GPR16: b6b5c2a8 00000000 00000000 00000000 00000008 b6fe77cc 00000001 00000000
GPR24: 00000000 b6fe77e0 b6fe780c b43fe35c b6fe79b0 b6fe79ac b6feea94 b6fe780c
NIP [7d6903a4] 0x7d6903a4
LR [7d6903a6] 0x7d6903a6
Call Trace:
[e2e7df30] [c0016058] ret_from_syscall+0xc/0x28 (unreliable)
--- interrupt: c00 at 0xb6a3b860
NIP: b6a3b860 LR: b6f2e648 CTR: 00000000
REGS: e2e7df40 TRAP: 0c00 Tainted: G D (5.12.0-rc3-pmac-00078-geb51c431b81)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 20022242 XER: 20000000
GPR00: 000000dd b43fe280 b44066e0 00000000 00000081 7fffffff 00000000 b3a02f58
GPR08: 00000140 00000425 b3a19df8 b69c64f0 44022228 0055f694 00801000 b6b5e308
GPR16: b6b5c2a8 00000000 00000000 00000000 00000008 b6fe77cc 00000001 00000000
GPR24: 00000000 b6fe77e0 b6fe780c b43fe35c b6fe79b0 b6fe79ac b6feea94 b6fe780c
NIP [b6a3b860] 0xb6a3b860
LR [b6f2e648] 0xb6f2e648
--- interrupt: c00
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
---[ end trace 8c58fa6ae8a81151 ]---
Stopping WINGs display manager: wdm:
(removing stale /var/run/wdm.pid).
Asking all remaining processes to terminate...done.
All processes ended within 4 seconds...done.
Stopping enhanced syslogd: rsyslogd.
Saving the system clock to /dev/rtc0.
Hardware Clock updated to Wed Aug 4 22:33:18 MDT 2021.
Deconfiguring network interfaces...done.
Deactivating swap...done.
Unmounting local filesystems...done.
mount: /: mount point is busy.
Will now restart.
sd 2:0:0:0: [sdb] Synchronizing SCSI cache
resetting MESH scsi bus(es)
reboot: Restarting system
[-- Attachment #3: Type: text/plain, Size: 21158 bytes --]
printk: console [ttyS0] enabled
printk: bootconsole [udbg0] disabled
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
devtmpfs: initialized
Duplicate name in PowerPC,750, renamed to "l2-cache#1"
Duplicate name in pci, renamed to "mac-io#1"
Duplicate name in pci, renamed to "pccard#1"
Found Grackle (MPC106) PCI host bridge at 0x0000000080000000. Firmware bus number: 0->0
PCI host bridge /pci (primary) ranges:
IO 0x00000000fe000000..0x00000000fe7fffff -> 0x0000000000000000
MEM 0x00000000fd000000..0x00000000fdffffff -> 0x0000000000000000
MEM 0x0000000080000000..0x00000000fcffffff -> 0x0000000080000000
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered protocol family 16
PMU i2c /pci/mac-io/via-pmu
channel 1 bus <multibus>
channel 2 bus <multibus>
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x7fffff]
pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfdffffff] (bus address [0x00000000-0x00ffffff])
pci_bus 0000:00: root bus resource [mem 0x80000000-0xfcffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
pci 0000:00:00.0: [1057:0002] type 00 class 0x060000
pci 0000:00:0d.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:0d.0: reg 0x10: [mem 0xf4000000-0xf407ffff]
pci 0000:00:10.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:10.0: reg 0x10: [mem 0xf3000000-0xf307ffff]
pci 0000:00:11.0: [1002:4c50] type 00 class 0x038000
pci 0000:00:11.0: reg 0x10: [mem 0x82000000-0x82ffffff]
pci 0000:00:11.0: reg 0x14: [io 0x0400-0x04ff]
pci 0000:00:11.0: reg 0x18: [mem 0x82fff000-0x82ffffff]
pci 0000:00:11.0: reg 0x30: [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: supports D1 D2
pci 0000:00:13.0: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.0: reg 0x10: [mem 0x81803000-0x81803fff]
pci 0000:00:13.1: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.1: reg 0x10: [mem 0x81802000-0x81802fff]
pci_bus 0000:01: extended config space not accessible
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 04
pci_bus 0000:05: extended config space not accessible
pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 08
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 08
PCI: Cannot allocate resource region 2 of device 0000:00:11.0, will remap
PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]
pci 0000:00:13.0: BAR 9: assigned [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: BAR 10: assigned [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: BAR 9: assigned [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: BAR 10: assigned [mem 0x90000000-0x93ffffff]
pci 0000:00:11.0: BAR 6: assigned [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: BAR 2: assigned [mem 0xfd020000-0xfd020fff]
pci 0000:00:13.0: BAR 7: assigned [io 0x1000-0x10ff]
pci 0000:00:13.0: BAR 8: assigned [io 0x1100-0x11ff]
pci 0000:00:13.1: BAR 7: assigned [io 0x1200-0x12ff]
pci 0000:00:13.1: BAR 8: assigned [io 0x1300-0x13ff]
pci 0000:00:13.0: CardBus bridge to [bus 01-04]
pci 0000:00:13.0: bridge window [io 0x1000-0x10ff]
pci 0000:00:13.0: bridge window [io 0x1100-0x11ff]
pci 0000:00:13.0: bridge window [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: bridge window [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: CardBus bridge to [bus 05-08]
pci 0000:00:13.1: bridge window [io 0x1200-0x12ff]
pci 0000:00:13.1: bridge window [io 0x1300-0x13ff]
pci 0000:00:13.1: bridge window [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: bridge window [mem 0x90000000-0x93ffffff]
pci_bus 0000:00: resource 4 [io 0x0000-0x7fffff]
pci_bus 0000:00: resource 5 [mem 0xfd000000-0xfdffffff]
pci_bus 0000:00: resource 6 [mem 0x80000000-0xfcffffff]
pci_bus 0000:01: resource 0 [io 0x1000-0x10ff]
pci_bus 0000:01: resource 1 [io 0x1100-0x11ff]
pci_bus 0000:01: resource 2 [mem 0x84000000-0x87ffffff pref]
pci_bus 0000:01: resource 3 [mem 0x88000000-0x8bffffff]
pci_bus 0000:05: resource 0 [io 0x1200-0x12ff]
pci_bus 0000:05: resource 1 [io 0x1300-0x13ff]
pci_bus 0000:05: resource 2 [mem 0x8c000000-0x8fffffff pref]
pci_bus 0000:05: resource 3 [mem 0x90000000-0x93ffffff]
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 32 bytes, default 32
Thermal assist unit using workqueue, shrink_timer: 2000 ms
workingset: timestamp_bits=30 max_order=17 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler mq-deadline registered
pci 0000:00:11.0: enabling device (0086 -> 0087)
Using unsupported 1024x768 (null) at 82801000, depth=32, pitch=4096
Console: switching to colour frame buffer device 128x48
fb0: Open Firmware frame buffer device on /pci/ATY,RageLTPro
pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
Non-volatile memory driver v1.3
brd: module loaded
loop: module loaded
MacIO PCI driver attached to Gatwick chipset
MacIO PCI driver attached to Heathrow chipset
swim3 0.00015000:floppy: [fd0] SWIM3 floppy controller in media bay
0.00013020:ch-a: ttyS0 at MMIO 0xf3013020 (irq = 16, base_baud = 230400) is a Z85c30 ESCC - Serial port
0.00013000:ch-b: ttyS1 at MMIO 0xf3013000 (irq = 17, base_baud = 230400) is a Z85c30 ESCC - Infrared port
macio: fixed media-bay irq on gatwick
macio: fixed left floppy irqs
swim3 1.00015000:floppy: [fd1] Couldn't request interrupt
swim3: probe of 1.00015000:floppy failed with error -16
macio: fixed left ide irqs
macio: fixed SCC irqs on gatwick
1.00013020:ch-a: ttyS2 at MMIO 0xf4013020 (irq = 79, base_baud = 230400) is a Z85c30 ESCC - Internal modem
mediabay0: Registered Heathrow media-bay
mediabay1: Registered Heathrow media-bay
mediabay0: Bay contains an ATA device
PMU Backlight initialized (pmubl)
mesh: configured for synchronous 5 MB/s
mediabay1: Bay contains a floppy drive
mesh: performing initial bus reset...
random: fast init done
adb device [2]: 2 0xC3
adb device [3]: 3 0x1
adb device [7]: 7 0x1F
ADB keyboard at 2 has handler 0xC3
Detected ADB keyboard, type ANSI.
input: ADB keyboard as /devices/virtual/input/input0
input: ADB Powerbook buttons as /devices/virtual/input/input1
ADB mouse (trackpad) at 3 has handler 0x4
input: ADB mouse as /devices/virtual/input/input2
scsi host0: MESH
pata-macio 0.00020000:ata0: Activating pata-macio chipset Heathrow ATA, Apple bus ID 0
scsi host1: pata_macio
ata1: PATA max MWDMA2 irq 30
ata1.00: ATA-7: SAMSUNG HM100JC, YN100-08, max UDMA/100
ata1.00: 195371568 sectors, multi 8: LBA48
scsi 1:0:0:0: Direct-Access ATA SAMSUNG HM100JC 0-08 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 195371568 512-byte logical blocks: (100 GB/93.2 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
pata-macio 0.00021000:ata1: Activating pata-macio chipset Heathrow ATA, Apple bus ID 1
scsi host2: pata_macio
ata2: PATA max MWDMA2 irq 36
pata-macio 1.00021000:ata4: Activating pata-macio chipset Heathrow ATA, Apple bus ID 4
genirq: Flags mismatch irq 36. 00000000 (pata-macio[1.00021000:ata4]) vs. 00000000 (pata-macio[0.00021000:ata1])
pata-macio: probe of 1.00021000:ata4 failed with error -16
ata2.00: ATA-6: ST9160821A, 3.ALD, max UDMA/100
ata2.00: 312581808 sectors, multi 0: LBA48
eth0: BMAC at 00:05:02:07:5a:a6
aoe: AoE v85 initialised.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-generic rtc-generic: registered as rtc0
i2c /dev entries driver
PowerMac i2c bus pmu 2 registered
PowerMac i2c bus pmu 1 registered
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
drmem: No dynamic reconfiguration memory found
sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15
sd 1:0:0:0: [sda] Attached SCSI disk
scsi 2:0:0:0: Direct-Access ATA ST9160821A D PQ: 0 ANSI: 5
sd 2:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: [mac] sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14
sd 2:0:0:0: [sdb] Attached SCSI disk
EXT4-fs (sda12): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda12): INFO: recovery required on readonly filesystem
EXT4-fs (sda12): write access will be enabled during recovery
EXT4-fs (sda12): recovery complete
EXT4-fs (sda12): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
VFS: Mounted root (ext3 filesystem) readonly on device 8:12.
Freeing unused kernel memory: 1228K
Kernel memory protection not selected by kernel config.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
findfs: unable to resolve 'LABEL=Debian_sid'
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...random: crng init done
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
done.
Setting up keyboard layout...done.
Activating swap...Adding 524284k swap on /dev/sda14. Priority:-2 extents:1 across:524284k
done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Checking root file system...Debian_sid: clean, 76261/524288 files, 1036569/2097152 blocks
done.
EXT4-fs (sda12): re-mounted. Opts: errors=remount-ro. Quota mode: disabled.
Checking file systems...data: clean, 83287/3325952 files, 2159937/13280326 blocks
done.
Cleaning up temporary files...
/tmp.
Loading kernel module lp.
modprobe: FATAL: Module lp not found in directory /lib/modules/5.12.0-rc3-pmac-00077-gc9f6e8dd045
Loading kernel module ppdev.
modprobe: FATAL: Module ppdev not found in directory /lib/modules/5.12.0-rc3-pmac-00077-gc9f6e8dd045
Loading kernel module parport_pc.
modprobe: FATAL: Module parport_pc not found in directory /lib/modules/5.12.0-rc3-pmac-00077-gc9f6e8dd045
Loading kernel module apm_emu.
modprobe: FATAL: Module apm_emu not found in directory /lib/modules/5.12.0-rc3-pmac-00077-gc9f6e8dd045
Loading kernel module bmac.
modprobe: FATAL: Module bmac not found in directory /lib/modules/5.12.0-rc3-pmac-00077-gc9f6e8dd045
Loading kernel module mesh.
modprobe: FATAL: Module mesh not found in directory /lib/modules/5.12.0-rc3-pmac-00077-gc9f6e8dd045
LoadinEXT4-fs (sda15): mounting ext3 file system using the ext4 subsystem
g kernel module snd-powermac.
modprobe: FATAL: Module snd-powermac not found in directory /lib/modules/5.12.0-rc3-pmac-00077-gc9f6e8dd045
EXT4-fs (sda15): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
Mounting local filesystems...done.
Activating swapfile swap, if any...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Configuring network interfaces...done.
Cleaning up temporary files....
Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix
.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Setting up console font and keymap...done.
Recovering nvi editor sessions.
none found.
Starting enhanced syslogd: rsyslogd.
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd.
Starting S.M.A.R.T. daemon: smartd.
Starting WINGs display manager: wdm:.
Deconfiguring network interfaces...
done.
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Debian GNU/Linux 11 mac-server ttyS0
mac-server login: xfce4-session[1775]: bus error (7) at b3976078 nip aefb1710 lr aefb16e0 code 3 in libLLVM-11.so.1[ae83e000+4d1b000
]
xfce4-session[1775]: code: 7fc802a6 807effac 7fc3f214 835e8054 82fe8134 82de8138 82be813c 80fe8140
xfce4-session[1775]: code: 38600020 90610014 a09a0006 7f45d378 <96e50030> 38da0048 548407fe 90da0034
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1657 at arch/powerpc/mm/fault.c:357 do_page_fault+0x70/0x6b4
Modules linked in:
CPU: 0 PID: 1657 Comm: Xorg Not tainted 5.12.0-rc3-pmac-00077-gc9f6e8dd045 #2
NIP: c001a094 LR: c001a1d4 CTR: b12622f4
REGS: e2c65e40 TRAP: 0700 Not tainted (5.12.0-rc3-pmac-00077-gc9f6e8dd045)
MSR: 00021032 <ME,IR,DR,RI> CR: 44c24f38 XER: 00000000
GPR00: c0004320 e2c65f00 c1562260 e2c65f40 00000000 40000000 04544060 00000000
GPR08: c1562260 38a00000 08000000 e2c65f30 44c65f30 0094fff0 00000000 00000000
GPR16: 00813458 008102f8 00000001 00000063 00000a7a 00000001 b7aee478 00000000
GPR24: 00000001 00000000 00000000 00000000 c1e71240 b12622f4 00000400 e2c65f40
NIP [c001a094] do_page_fault+0x70/0x6b4
LR [c001a1d4] do_page_fault+0x1b0/0x6b4
Call Trace:
[e2c65f00] [c001a164] do_page_fault+0x140/0x6b4 (unreliable)
[e2c65f30] [c0004320] InstructionAccess_virt+0xc4/0xc8
--- interrupt: 400 at 0xb12622f4
NIP: b12622f4 LR: b7941100 CTR: b12622f4
REGS: e2c65f40 TRAP: 0400 Not tainted (5.12.0-rc3-pmac-00077-gc9f6e8dd045)
MSR: 4000d032 <EE,PR,ME,IR,DR,RI> CR: 24000424 XER: 00000000
GPR00: b7941100 bfbd6eb0 b73f45c0 b52c8df8 00000000 b4ed8df8 04544060 00000007
GPR08: b7aed64c b12622f4 aceadebe b7999b70 b7999b70 0094fff0 00000000 00000000
GPR16: 00813458 008102f8 00000001 00000063 00000a7a 00000001 b7aee478 00000000
GPR24: 00000001 00000000 00000000 009e9290 b7aee530 b7aee538 b7aecff4 009e9380
NIP [b12622f4] 0xb12622f4
LR [b7941100] 0xb7941100
--- interrupt: 400
Instruction dump:
83c300a0 752a8410 83820298 553b018c 83a300a4 57de0034 2e0a0000 40920360
2d9b0000 408e0264 752a0800 4182025c <0fe00000> 41920254 81220594 7c4a1378
---[ end trace c40b220173ea820f ]---
------------[ cut here ]------------
kernel BUG at arch/powerpc/kernel/interrupt.c:49!
Oops: Exception in kernel mode, sig: 5 [#1]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1657 Comm: Xorg Tainted: G W 5.12.0-rc3-pmac-00077-gc9f6e8dd045 #2
NIP: c0010e4c LR: c0010e3c CTR: b79d2b10
REGS: e2c65e40 TRAP: 0700 Tainted: G W (5.12.0-rc3-pmac-00077-gc9f6e8dd045)
MSR: 00021032 <ME,IR,DR,RI> CR: 44002424 XER: 00000000
GPR00: c00150c0 e2c65f00 c1562260 b7323030 00000001 00000003 b7aeefec 00000004
GPR08: b716c994 00000001 50db435b 4e800020 c1562810 0094fff0 00000000 b716c994
GPR16: 00813458 009acf90 b7d5d058 bfbd6e40 00000000 b7d76cb8 bfbd6d9c 00000019
GPR24: b7323030 b716c994 00000004 b7aeefec 00000003 00000001 e2c65f40 00000014
NIP [c0010e4c] system_call_exception+0x60/0x164
LR [c0010e3c] system_call_exception+0x50/0x164
Call Trace:
[e2c65f00] [c001a164] do_page_fault+0x140/0x6b4 (unreliable)
[e2c65f30] [c00150c0] ret_from_syscall+0x0/0x28
--- interrupt: c00 at 0xb79d2b18
NIP: b79d2b18 LR: b71417f8 CTR: b7d50a94
REGS: e2c65f40 TRAP: 0c00 Tainted: G W (5.12.0-rc3-pmac-00077-gc9f6e8dd045)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 44002424 XER: 00000000
GPR00: 00000014 bfbd6cf0 b73f45c0 b7323030 00000001 00000003 b7aeefec 00000004
GPR08: b716c994 b716cf90 b7907684 00000003 44002424 0094fff0 00000000 b716c994
GPR16: 00813458 009acf90 b7d5d058 bfbd6e40 00000000 b7d76cb8 bfbd6d9c 00000019
GPR24: b7d78534 b7d78030 00000043 00000000 b7d78030 00000000 b7174be8 bfbd6e40
NIP [b79d2b18] 0xb79d2b18
LR [b71417f8] 0xb71417f8
--- interrupt: c00
Instruction dump:
7cdb3378 93810020 7cbc2b78 93a10024 7c9d2378 93e1002c 7d3f4b78 4800cacd
817e0084 931e0088 69690002 5529fffe <0f090000> 69694000 552997fe 0f090000
---[ end trace c40b220173ea8210 ]---
------------[ cut here ]------------
kernel BUG at arch/powerpc/kernel/interrupt.c:49!
Oops: Exception in kernel mode, sig: 5 [#2]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1850 Comm: Xorg Tainted: G D W 5.12.0-rc3-pmac-00077-gc9f6e8dd045 #2
NIP: c0010e4c LR: c0010e3c CTR: b7995b20
REGS: e1075e40 TRAP: 0700 Tainted: G D W (5.12.0-rc3-pmac-00077-gc9f6e8dd045)
MSR: 00021032 <ME,IR,DR,RI> CR: 420084ec XER: 00000000
GPR00: c00150c0 e1075f00 c2a9ace0 ada73280 0000000c b7ad60cc ada73904 b7ad57cc
GPR08: ada73900 00000001 50185ccb 7ca42378 c2a9b290 00d8fff0 00801000 00313308
GPR16: 003112a8 00000000 00e483d0 b5aeedc0 bfb3aef8 00313300 00000000 00000000
GPR24: ada73280 ada73900 b7ad57cc ada73904 b7ad60cc 0000000c e1075f40 0000012c
NIP [c0010e4c] system_call_exception+0x60/0x164
LR [c0010e3c] system_call_exception+0x50/0x164
Call Trace:
[e1075f00] [bfb3ae6c] 0xbfb3ae6c (unreliable)
[e1075f30] [c00150c0] ret_from_syscall+0x0/0x28
--- interrupt: c00 at 0x2d970c
NIP: 002d970c LR: 002d96dc CTR: b7a76874
REGS: e1075f40 TRAP: 0c00 Tainted: G D W (5.12.0-rc3-pmac-00077-gc9f6e8dd045)
MSR: 0000d932 <EE,PR,ME,IR,DR,RI> CR: 420084ec XER: 20000000
GPR00: 0000012c ada72b50 ada7a6e0 ada73280 0000000c b7ad60cc ada73904 b7ad57cc
GPR08: ada73900 ada73278 ffffffff b7a76874 280044ec 00d8fff0 00801000 00313308
GPR16: 003112a8 00000000 00e483d0 b5aeedc0 bfb3aef8 00313300 00000000 00000000
GPR24: ada73270 ada72d80 ada73210 bfb3ae6b 003d0f00 ada73210 00310ff4 ada72b50
NIP [002d970c] 0x2d970c
LR [002d96dc] 0x2d96dc
--- interrupt: c00
Instruction dump:
7cdb3378 93810020 7cbc2b78 93a10024 7c9d2378 93e1002c 7d3f4b78 4800cacd
817e0084 931e0088 69690002 5529fffe <0f090000> 69694000 552997fe 0f090000
---[ end trace c40b220173ea8211 ]---
mac-server login: root
Password:
Linux mac-server 5.12.0-rc3-pmac-00077-gc9f6e8dd045 #2 SMP Wed Aug 4 22:35:13 MDT 2021 ppc
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Aug 4 22:32:58 MDT 2021 on ttyS0
root@mac-server:~# shutdown -r now
Broadcast message from root@mac-server (ttyS0) (Wed Aug 4 22:50:57 2021):
The system is going down for reboot NOW!
INIT: Sending processes configured vUsing makefile-style concurrent boot in runlevel 6.
Stopping mouse emulation daemon: mouseemu.
Stopping hotplug events dispatcher: systemd-udevd.
Stopping S.M.A.R.T. daemon: smartd.
Stopping WINGs display manager: wdm:
Asking all remaining processes to terminate...done.
Currently running processes (pstree):
init-+-rc---startpar---sendsigs---pstree
|-rsyslogd---3*[{rsyslogd}]
`-wdm---wdm---Xorg---3*[{Xorg}]
Killing all remaining processes...failed.
Stopping enhanced syslogd: rsyslogd.
Saving the system clock to /dev/rtc0.
Hardware Clock updated to Wed Aug 4 22:51:21 MDT 2021.
Deconfiguring network interfaces...done.
Deactivating swap...done.
Unmounting local filesystems...done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Will now restart.
sd 2:0:0:0: [sdb] Synchronizing SCSI cache
resetting MESH scsi bus(es)
reboot: Restarting system
[-- Attachment #4: Type: text/plain, Size: 22621 bytes --]
printk: console [ttyS0] enabled
printk: bootconsole [udbg0] disabled
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
devtmpfs: initialized
Duplicate name in PowerPC,750, renamed to "l2-cache#1"
Duplicate name in pci, renamed to "mac-io#1"
Duplicate name in pci, renamed to "pccard#1"
Found Grackle (MPC106) PCI host bridge at 0x0000000080000000. Firmware bus number: 0->0
PCI host bridge /pci (primary) ranges:
IO 0x00000000fe000000..0x00000000fe7fffff -> 0x0000000000000000
MEM 0x00000000fd000000..0x00000000fdffffff -> 0x0000000000000000
MEM 0x0000000080000000..0x00000000fcffffff -> 0x0000000080000000
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered protocol family 16
PMU i2c /pci/mac-io/via-pmu
channel 1 bus <multibus>
channel 2 bus <multibus>
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x7fffff]
pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfdffffff] (bus address [0x00000000-0x00ffffff])
pci_bus 0000:00: root bus resource [mem 0x80000000-0xfcffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
pci 0000:00:00.0: [1057:0002] type 00 class 0x060000
pci 0000:00:0d.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:0d.0: reg 0x10: [mem 0xf4000000-0xf407ffff]
pci 0000:00:10.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:10.0: reg 0x10: [mem 0xf3000000-0xf307ffff]
pci 0000:00:11.0: [1002:4c50] type 00 class 0x038000
pci 0000:00:11.0: reg 0x10: [mem 0x82000000-0x82ffffff]
pci 0000:00:11.0: reg 0x14: [io 0x0400-0x04ff]
pci 0000:00:11.0: reg 0x18: [mem 0x82fff000-0x82ffffff]
pci 0000:00:11.0: reg 0x30: [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: supports D1 D2
pci 0000:00:13.0: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.0: reg 0x10: [mem 0x81803000-0x81803fff]
pci 0000:00:13.1: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.1: reg 0x10: [mem 0x81802000-0x81802fff]
pci_bus 0000:01: extended config space not accessible
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 04
pci_bus 0000:05: extended config space not accessible
pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 08
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 08
PCI: Cannot allocate resource region 2 of device 0000:00:11.0, will remap
PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]
pci 0000:00:13.0: BAR 9: assigned [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: BAR 10: assigned [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: BAR 9: assigned [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: BAR 10: assigned [mem 0x90000000-0x93ffffff]
pci 0000:00:11.0: BAR 6: assigned [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: BAR 2: assigned [mem 0xfd020000-0xfd020fff]
pci 0000:00:13.0: BAR 7: assigned [io 0x1000-0x10ff]
pci 0000:00:13.0: BAR 8: assigned [io 0x1100-0x11ff]
pci 0000:00:13.1: BAR 7: assigned [io 0x1200-0x12ff]
pci 0000:00:13.1: BAR 8: assigned [io 0x1300-0x13ff]
pci 0000:00:13.0: CardBus bridge to [bus 01-04]
pci 0000:00:13.0: bridge window [io 0x1000-0x10ff]
pci 0000:00:13.0: bridge window [io 0x1100-0x11ff]
pci 0000:00:13.0: bridge window [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: bridge window [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: CardBus bridge to [bus 05-08]
pci 0000:00:13.1: bridge window [io 0x1200-0x12ff]
pci 0000:00:13.1: bridge window [io 0x1300-0x13ff]
pci 0000:00:13.1: bridge window [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: bridge window [mem 0x90000000-0x93ffffff]
pci_bus 0000:00: resource 4 [io 0x0000-0x7fffff]
pci_bus 0000:00: resource 5 [mem 0xfd000000-0xfdffffff]
pci_bus 0000:00: resource 6 [mem 0x80000000-0xfcffffff]
pci_bus 0000:01: resource 0 [io 0x1000-0x10ff]
pci_bus 0000:01: resource 1 [io 0x1100-0x11ff]
pci_bus 0000:01: resource 2 [mem 0x84000000-0x87ffffff pref]
pci_bus 0000:01: resource 3 [mem 0x88000000-0x8bffffff]
pci_bus 0000:05: resource 0 [io 0x1200-0x12ff]
pci_bus 0000:05: resource 1 [io 0x1300-0x13ff]
pci_bus 0000:05: resource 2 [mem 0x8c000000-0x8fffffff pref]
pci_bus 0000:05: resource 3 [mem 0x90000000-0x93ffffff]
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 32 bytes, default 32
Thermal assist unit using workqueue, shrink_timer: 2000 ms
workingset: timestamp_bits=30 max_order=17 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler mq-deadline registered
pci 0000:00:11.0: enabling device (0086 -> 0087)
Using unsupported 1024x768 (null) at 82801000, depth=32, pitch=4096
Console: switching to colour frame buffer device 128x48
fb0: Open Firmware frame buffer device on /pci/ATY,RageLTPro
pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
Non-volatile memory driver v1.3
brd: module loaded
loop: module loaded
MacIO PCI driver attached to Gatwick chipset
MacIO PCI driver attached to Heathrow chipset
swim3 0.00015000:floppy: [fd0] SWIM3 floppy controller in media bay
0.00013020:ch-a: ttyS0 at MMIO 0xf3013020 (irq = 16, base_baud = 230400) is a Z85c30 ESCC - Serial port
0.00013000:ch-b: ttyS1 at MMIO 0xf3013000 (irq = 17, base_baud = 230400) is a Z85c30 ESCC - Infrared port
macio: fixed media-bay irq on gatwick
macio: fixed left floppy irqs
swim3 1.00015000:floppy: [fd1] Couldn't request interrupt
swim3: probe of 1.00015000:floppy failed with error -16
macio: fixed left ide irqs
macio: fixed SCC irqs on gatwick
1.00013020:ch-a: ttyS2 at MMIO 0xf4013020 (irq = 79, base_baud = 230400) is a Z85c30 ESCC - Internal modem
mediabay0: Registered Heathrow media-bay
mediabay1: Registered Heathrow media-bay
mediabay0: Bay contains an ATA device
PMU Backlight initialized (pmubl)
mesh: configured for synchronous 5 MB/s
mediabay1: Bay contains a floppy drive
mesh: performing initial bus reset...
random: fast init done
adb device [2]: 2 0xC3
adb device [3]: 3 0x1
adb device [7]: 7 0x1F
ADB keyboard at 2 has handler 0xC3
Detected ADB keyboard, type ANSI.
input: ADB keyboard as /devices/virtual/input/input0
input: ADB Powerbook buttons as /devices/virtual/input/input1
ADB mouse (trackpad) at 3 has handler 0x4
input: ADB mouse as /devices/virtual/input/input2
scsi host0: MESH
pata-macio 0.00020000:ata0: Activating pata-macio chipset Heathrow ATA, Apple bus ID 0
scsi host1: pata_macio
ata1: PATA max MWDMA2 irq 30
ata1.00: ATA-7: SAMSUNG HM100JC, YN100-08, max UDMA/100
ata1.00: 195371568 sectors, multi 8: LBA48
scsi 1:0:0:0: Direct-Access ATA SAMSUNG HM100JC 0-08 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 195371568 512-byte logical blocks: (100 GB/93.2 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
pata-macio 0.00021000:ata1: Activating pata-macio chipset Heathrow ATA, Apple bus ID 1
scsi host2: pata_macio
ata2: PATA max MWDMA2 irq 36
pata-macio 1.00021000:ata4: Activating pata-macio chipset Heathrow ATA, Apple bus ID 4
genirq: Flags mismatch irq 36. 00000000 (pata-macio[1.00021000:ata4]) vs. 00000000 (pata-macio[0.00021000:ata1])
pata-macio: probe of 1.00021000:ata4 failed with error -16
ata2.00: ATA-6: ST9160821A, 3.ALD, max UDMA/100
ata2.00: 312581808 sectors, multi 0: LBA48
eth0: BMAC at 00:05:02:07:5a:a6
aoe: AoE v85 initialised.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-generic rtc-generic: registered as rtc0
i2c /dev entries driver
PowerMac i2c bus pmu 2 registered
PowerMac i2c bus pmu 1 registered
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
drmem: No dynamic reconfiguration memory found
sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15
sd 1:0:0:0: [sda] Attached SCSI disk
scsi 2:0:0:0: Direct-Access ATA ST9160821A D PQ: 0 ANSI: 5
sd 2:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: [mac] sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14
sd 2:0:0:0: [sdb] Attached SCSI disk
EXT4-fs (sda12): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda12): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
VFS: Mounted root (ext3 filesystem) readonly on device 8:12.
Freeing unused kernel memory: 1228K
Kernel memory protection not selected by kernel config.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
findfs: unable to resolve 'LABEL=Debian_sid'
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...random: crng init done
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
done.
Setting up keyboard layout...done.
Activating swap...Adding 524284k swap on /dev/sda14. Priority:-2 extents:1 across:524284k
done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Checking root file system...Debian_sid: clean, 76262/524288 files, 1036605/2097152 blocks
done.
EXT4-fs (sda12): re-mounted. Opts: errors=remount-ro. Quota mode: disabled.
Checking file systems...data: clean, 83287/3325952 files, 2159937/13280326 blocks
done.
Cleaning up temporary files...
/tmp.
Loading kernel module lp.
modprobe: FATAL: Module lp not found in directory /lib/modules/5.12.0-rc3-pmac-00077-ge06b29ce146
Loading kernel module ppdev.
modprobe: FATAL: Module ppdev not found in directory /lib/modules/5.12.0-rc3-pmac-00077-ge06b29ce146
Loading kernel module parport_pc.
modprobe: FATAL: Module parport_pc not found in directory /lib/modules/5.12.0-rc3-pmac-00077-ge06b29ce146
Loading kernel module apm_emu.
modprobe: FATAL: Module apm_emu not found in directory /lib/modules/5.12.0-rc3-pmac-00077-ge06b29ce146
Loading kernel module bmac.
modprobe: FATAL: Module bmac not found in directory /lib/modules/5.12.0-rc3-pmac-00077-ge06b29ce146
Loading kernel module mesh.
modprobe: FATAL: Module mesh not found in directory /lib/modules/5.12.0-rc3-pmac-00077-ge06b29ce146
Loading kernel module snd-powermac.
modprobe: FATAL: Module snd-powermac not found in directory /lib/modules/5.12.0-rc3-pmac-00077-ge06b29ce146
EXT4-fs (sda15): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda15): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
Mounting local filesystems...done.
Activating swapfile swap, if any...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Configuring network interfaces...done.
Cleaning up temporary files....
Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix
.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Setting up console font and keymap...done.
Recovering nvi editor sessions.
none found.
Starting enhanced syslogd: rsyslogd.
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd.
Starting S.M.A.R.T. daemon: smartd.
Starting WINGs display manager: wdm:.
Deconfiguring network interfaces...
done.
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Debian GNU/Linux 11 mac-server ttyS0
mac-server login: ------------[ cut here ]------------
kernel BUG at arch/powerpc/kernel/interrupt.c:50!
Oops: Exception in kernel mode, sig: 5 [#1]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1878 Comm: xfdesktop Not tainted 5.12.0-rc3-pmac-00077-ge06b29ce146 #3
NIP: c0010e58 LR: c0010e3c CTR: b699b7b0
REGS: e2ec9e40 TRAP: 0700 Not tainted (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 00021032 <ME,IR,DR,RI> CR: 24422202 XER: 00000000
GPR00: c00150c0 e2ec9f00 ce430160 00000016 00000000 00000000 00000000 b09c1000
GPR08: 00000007 00000001 501894db 152233ff ce430710 0093f34c 00b93eb8 00000000
GPR16: 001cb710 00000004 00000185 00000000 00000400 00000002 0090a8c8 0090a8c0
GPR24: 00000016 00000007 b09c1000 00000000 00000000 00000000 e2ec9f40 00000075
NIP [c0010e58] system_call_exception+0x6c/0x164
LR [c0010e3c] system_call_exception+0x50/0x164
Call Trace:
[e2ec9f00] [e2ec9f04] 0xe2ec9f04 (unreliable)
[e2ec9f30] [c00150c0] ret_from_syscall+0x0/0x28
--- interrupt: c00 at 0xb699b7ec
NIP: b699b7ec LR: b6f76050 CTR: 00000004
REGS: e2ec9f40 TRAP: 0c00 Not tainted (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 24422202 XER: 20000000
GPR00: 00000075 bfe27390 b53e94e0 00000016 00000000 00000000 00000000 b09c1000
GPR08: 00000007 000000ff 00000015 b6eebef0 000002ff 0093f34c 00b93eb8 00000000
GPR16: 001cb710 00000004 00000185 00000000 00000400 00000002 0090a8c8 0090a8c0
GPR24: 00b01c80 00000300 00000400 00b52730 000001c4 00b48a30 b6a6fff4 00a20bd0
NIP [b699b7ec] 0xb699b7ec
LR [b6f76050] 0xb6f76050
--- interrupt: c00
Instruction dump:
93a10024 7c9d2378 93e1002c 7d3f4b78 4800cacd 817e0084 931e0088 69690002
5529fffe 0f090000 69694000 552997fe <0f090000> 696b8000 556b8ffe 0f0b0000
---[ end trace 97c12cfe3c8acf20 ]---
------------[ cut here ]------------
kernel BUG at arch/powerpc/kernel/interrupt.c:50!
Oops: Exception in kernel mode, sig: 5 [#2]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1881 Comm: gmain Tainted: G D 5.12.0-rc3-pmac-00077-ge06b29ce146 #3
NIP: c0010e58 LR: c0010e3c CTR: b699983c
REGS: e2ee1e40 TRAP: 0700 Tainted: G D (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 00021032 <ME,IR,DR,RI> CR: 48004444 XER: 00000000
GPR00: c00150c0 e2ee1f00 c1565540 0000000d 00b78a80 01002fce b4f66a34 b4602ef0
GPR08: b4602ef0 00000001 501894db 152233ff c1565af0 0093f34c 00801000 0018d308
GPR16: 0018b2a8 00000000 009806f0 00000000 b6add680 00000000 00a16130 b4f66a34
GPR24: 0000000d b4602ef0 b4602ef0 b4f66a34 01002fce 00b78a80 e2ee1f40 00000114
NIP [c0010e58] system_call_exception+0x6c/0x164
LR [c0010e3c] system_call_exception+0x50/0x164
Call Trace:
[e2ee1f00] [c0154c1c] ksys_read+0x70/0x118 (unreliable)
[e2ee1f30] [c00150c0] ret_from_syscall+0x0/0x28
--- interrupt: c00 at 0xb6999844
NIP: b6999844 LR: b6dc63cc CTR: b6abfc10
REGS: e2ee1f40 TRAP: 0c00 Tainted: G D (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 48004444 XER: 00000000
GPR00: 00000114 b4f66970 b4f6e6e0 0000000d 00b78a80 01002fce b4f66a34 b4602ef0
GPR08: b4602ef0 43300000 b6b54ea0 b6ad9ca0 28004444 0093f34c 00801000 0018d308
GPR16: 0018b2a8 00000000 009806f0 00000000 b6add680 00000000 00a16130 b4f66a34
GPR24: b4f66a38 00000000 b6ea5310 b6ea6370 00000000 b4f669a8 b6eabebc 00b8b850
NIP [b6999844] 0xb6999844
LR [b6dc63cc] 0xb6dc63cc
--- interrupt: c00
Instruction dump:
93a10024 7c9d2378 93e1002c 7d3f4b78 4800cacd 817e0084 931e0088 69690002
5529fffe 0f090000 69694000 552997fe <0f090000> 696b8000 556b8ffe 0f0b0000
---[ end trace 97c12cfe3c8acf21 ]---
------------[ cut here ]------------
kernel BUG at arch/powerpc/kernel/interrupt.c:50!
Oops: Exception in kernel mode, sig: 5 [#3]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1912 Comm: pool-xfdesktop Tainted: G D 5.12.0-rc3-pmac-00077-ge06b29ce146 #3
NIP: c0010e58 LR: c0010e3c CTR: c014069c
REGS: e2f09e40 TRAP: 0700 Tainted: G D (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 00021032 <ME,IR,DR,RI> CR: 284284ec XER: 20000000
GPR00: c00150c0 e2f09f00 ce562b60 00000000 00153978 484284ec b38d9000 00000000
GPR08: 00000000 00000001 501894db 152233ff ce563110 0093f34c 00801000 0018d308
GPR16: 0018b2a8 00000000 00b6ad30 b6b49eb0 00b6ad50 0018d300 00000000 00000000
GPR24: 00000000 00000000 00000000 b38d9000 484284ec 00153978 e2f09f40 00000001
NIP [c0010e58] system_call_exception+0x6c/0x164
LR [c0010e3c] system_call_exception+0x50/0x164
Call Trace:
[e2f09f00] [0018d300] 0x18d300 (unreliable)
[e2f09f30] [c00150c0] ret_from_syscall+0x0/0x28
--- interrupt: c00 at 0x15381c
NIP: 0015381c LR: 00153984 CTR: 00000000
REGS: e2f09f40 TRAP: 0c00 Tainted: G D (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 284284ec XER: 00000000
GPR00: 00000001 b38f9b50 b39016e0 00000000 00153978 484284ec b38d9000 00000000
GPR08: 00000000 b38f9a80 00000000 610b7076 ce563110 0093f34c 00801000 0018d308
GPR16: 0018b2a8 00000000 00b6ad30 b6b49eb0 00b6ad50 0018d300 00000000 00000000
GPR24: b38fa270 b38f9d80 b38fa210 bfe26d0b b30fa000 b38fa210 0018aff4 b38f9b50
NIP [0015381c] 0x15381c
LR [00153984] 0x153984
--- interrupt: c00
Instruction dump:
93a10024 7c9d2378 93e1002c 7d3f4b78 4800cacd 817e0084 931e0088 69690002
5529fffe 0f090000 69694000 552997fe <0f090000> 696b8000 556b8ffe 0f0b0000
---[ end trace 97c12cfe3c8acf22 ]---
mac-server login: root
Password:
Linux mac-server 5.12.0-rc3-pmac-00077-ge06b29ce146 #3 SMP Wed Aug 4 22:52:47 MDT 2021 ppc
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Aug 4 22:50:51 MDT 2021 on ttyS0
root@mac-server:~# shutdown -r now
Broadcast message from root@mac-server (ttyS0) (Wed Aug 4 23:01:42 2021):
The system is going down for reboot NOW!
Broadcast message from root@mac-server (ttyS0) (Wed Aug 4 23:01:42 2021):
The system is going down for reboot NOW!
INIT: Sending processes configured via /etUsing makefile-style concurrent boot in runlevel 6.
Stopping mouse emulation daemon: mouseemu.
Stopping S.M.A.R.T. daemon: smartd.
Stopping hotplug events dispatcher: systemd-udevd.
------------[ cut here ]------------
kernel BUG at arch/powerpc/kernel/interrupt.c:50!
Oops: Exception in kernel mode, sig: 5 [#4]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1882 Comm: gdbus Tainted: G D 5.12.0-rc3-pmac-00077-ge06b29ce146 #3
NIP: c0010e58 LR: c0010e3c CTR: 00000000
REGS: e2ee5e40 TRAP: 0700 Tainted: G D (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 00021032 <ME,IR,DR,RI> CR: 40004424 XER: 20000000
GPR00: c00150c0 e2ee5f00 ce4721a0 00000004 00162c38 20004424 00000000 00162c50
GPR08: 0000d032 00000001 501894db 152233ff ce472750 0093f34c 00801000 0018d308
GPR16: 0018b2a8 00000000 00980798 b6b49eb0 009807b8 0018d300 00000000 00000000
GPR24: 00000004 0000d032 00162c50 00000000 20004424 00162c38 e2ee5f40 00000077
NIP [c0010e58] system_call_exception+0x6c/0x164
LR [c0010e3c] system_call_exception+0x50/0x164
Call Trace:
[e2ee5f00] [c0154dd0] ksys_write+0x100/0x118 (unreliable)
[e2ee5f30] [c00150c0] ret_from_syscall+0x0/0x28
--- interrupt: c00 at 0x1013bc
NIP: 001013bc LR: 001013b4 CTR: 00000000
REGS: e2ee5f40 TRAP: 0c00 Tainted: G D (5.12.0-rc3-pmac-00077-ge06b29ce146)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 40004424 XER: 00000000
GPR00: 00000077 b45fe510 b46066e0 00000004 00162c38 20004424 00000000 00162c50
GPR08: 0000d032 43300000 b6b54ea0 b691cb70 40004424 0093f34c 00801000 0018d308
GPR16: 0018b2a8 00000000 00980798 b6b49eb0 009807b8 0018d300 00000000 00000000
GPR24: 00000001 ffffffff b45fea88 b6af0b80 00000000 009bb090 b6a6fff4 ffffffff
NIP [001013bc] 0x1013bc
LR [001013b4] 0x1013b4
--- interrupt: c00
Instruction dump:
93a10024 7c9d2378 93e1002c 7d3f4b78 4800cacd 817e0084 931e0088 69690002
5529fffe 0f090000 69694000 552997fe <0f090000> 696b8000 556b8ffe 0f0b0000
---[ end trace 97c12cfe3c8acf23 ]---
Stopping WINGs display manager: wdm: (removing stale /var/run/wdm.pid).
Asking all remaining processes to terminate...done.
All processes ended within 1 seconds...done.
Stopping enhanced syslogd: rsyslogd.
Saving the system clock to /dev/rtc0.
Hardware Clock updated to Wed Aug 4 23:01:48 MDT 2021.
Deconfiguring network interfaces...done.
Deactivating swap...done.
Unmounting local filesystems...done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Will now restart.
sd 2:0:0:0: [sdb] Synchronizing SCSI cache
resetting MESH scsi bus(es)
reboot: Restarting system
[-- Attachment #5: Type: text/plain, Size: 15149 bytes --]
printk: console [ttyS0] enabled
printk: bootconsole [udbg0] disabled
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
devtmpfs: initialized
Duplicate name in PowerPC,750, renamed to "l2-cache#1"
Duplicate name in pci, renamed to "mac-io#1"
Duplicate name in pci, renamed to "pccard#1"
Found Grackle (MPC106) PCI host bridge at 0x0000000080000000. Firmware bus number: 0->0
PCI host bridge /pci (primary) ranges:
IO 0x00000000fe000000..0x00000000fe7fffff -> 0x0000000000000000
MEM 0x00000000fd000000..0x00000000fdffffff -> 0x0000000000000000
MEM 0x0000000080000000..0x00000000fcffffff -> 0x0000000080000000
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered protocol family 16
PMU i2c /pci/mac-io/via-pmu
channel 1 bus <multibus>
channel 2 bus <multibus>
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x7fffff]
pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfdffffff] (bus address [0x00000000-0x00ffffff])
pci_bus 0000:00: root bus resource [mem 0x80000000-0xfcffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
pci 0000:00:00.0: [1057:0002] type 00 class 0x060000
pci 0000:00:0d.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:0d.0: reg 0x10: [mem 0xf4000000-0xf407ffff]
pci 0000:00:10.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:10.0: reg 0x10: [mem 0xf3000000-0xf307ffff]
pci 0000:00:11.0: [1002:4c50] type 00 class 0x038000
pci 0000:00:11.0: reg 0x10: [mem 0x82000000-0x82ffffff]
pci 0000:00:11.0: reg 0x14: [io 0x0400-0x04ff]
pci 0000:00:11.0: reg 0x18: [mem 0x82fff000-0x82ffffff]
pci 0000:00:11.0: reg 0x30: [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: supports D1 D2
pci 0000:00:13.0: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.0: reg 0x10: [mem 0x81803000-0x81803fff]
pci 0000:00:13.1: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.1: reg 0x10: [mem 0x81802000-0x81802fff]
pci_bus 0000:01: extended config space not accessible
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 04
pci_bus 0000:05: extended config space not accessible
pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 08
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 08
PCI: Cannot allocate resource region 2 of device 0000:00:11.0, will remap
PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]
pci 0000:00:13.0: BAR 9: assigned [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: BAR 10: assigned [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: BAR 9: assigned [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: BAR 10: assigned [mem 0x90000000-0x93ffffff]
pci 0000:00:11.0: BAR 6: assigned [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: BAR 2: assigned [mem 0xfd020000-0xfd020fff]
pci 0000:00:13.0: BAR 7: assigned [io 0x1000-0x10ff]
pci 0000:00:13.0: BAR 8: assigned [io 0x1100-0x11ff]
pci 0000:00:13.1: BAR 7: assigned [io 0x1200-0x12ff]
pci 0000:00:13.1: BAR 8: assigned [io 0x1300-0x13ff]
pci 0000:00:13.0: CardBus bridge to [bus 01-04]
pci 0000:00:13.0: bridge window [io 0x1000-0x10ff]
pci 0000:00:13.0: bridge window [io 0x1100-0x11ff]
pci 0000:00:13.0: bridge window [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: bridge window [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: CardBus bridge to [bus 05-08]
pci 0000:00:13.1: bridge window [io 0x1200-0x12ff]
pci 0000:00:13.1: bridge window [io 0x1300-0x13ff]
pci 0000:00:13.1: bridge window [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: bridge window [mem 0x90000000-0x93ffffff]
pci_bus 0000:00: resource 4 [io 0x0000-0x7fffff]
pci_bus 0000:00: resource 5 [mem 0xfd000000-0xfdffffff]
pci_bus 0000:00: resource 6 [mem 0x80000000-0xfcffffff]
pci_bus 0000:01: resource 0 [io 0x1000-0x10ff]
pci_bus 0000:01: resource 1 [io 0x1100-0x11ff]
pci_bus 0000:01: resource 2 [mem 0x84000000-0x87ffffff pref]
pci_bus 0000:01: resource 3 [mem 0x88000000-0x8bffffff]
pci_bus 0000:05: resource 0 [io 0x1200-0x12ff]
pci_bus 0000:05: resource 1 [io 0x1300-0x13ff]
pci_bus 0000:05: resource 2 [mem 0x8c000000-0x8fffffff pref]
pci_bus 0000:05: resource 3 [mem 0x90000000-0x93ffffff]
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 32 bytes, default 32
Thermal assist unit using workqueue, shrink_timer: 2000 ms
workingset: timestamp_bits=30 max_order=17 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler mq-deadline registered
pci 0000:00:11.0: enabling device (0086 -> 0087)
Using unsupported 1024x768 (null) at 82801000, depth=32, pitch=4096
Console: switching to colour frame buffer device 128x48
fb0: Open Firmware frame buffer device on /pci/ATY,RageLTPro
pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
Non-volatile memory driver v1.3
brd: module loaded
loop: module loaded
MacIO PCI driver attached to Gatwick chipset
MacIO PCI driver attached to Heathrow chipset
swim3 0.00015000:floppy: [fd0] SWIM3 floppy controller in media bay
0.00013020:ch-a: ttyS0 at MMIO 0xf3013020 (irq = 16, base_baud = 230400) is a Z85c30 ESCC - Serial port
0.00013000:ch-b: ttyS1 at MMIO 0xf3013000 (irq = 17, base_baud = 230400) is a Z85c30 ESCC - Infrared port
macio: fixed media-bay irq on gatwick
macio: fixed left floppy irqs
swim3 1.00015000:floppy: [fd1] Couldn't request interrupt
swim3: probe of 1.00015000:floppy failed with error -16
macio: fixed left ide irqs
macio: fixed SCC irqs on gatwick
1.00013020:ch-a: ttyS2 at MMIO 0xf4013020 (irq = 79, base_baud = 230400) is a Z85c30 ESCC - Internal modem
mediabay0: Registered Heathrow media-bay
mediabay1: Registered Heathrow media-bay
mediabay0: Bay contains an ATA device
PMU Backlight initialized (pmubl)
mesh: configured for synchronous 5 MB/s
mediabay1: Bay contains a floppy drive
mesh: performing initial bus reset...
random: fast init done
adb device [2]: 2 0xC3
adb device [3]: 3 0x1
adb device [7]: 7 0x1F
ADB keyboard at 2 has handler 0xC3
Detected ADB keyboard, type ANSI.
input: ADB keyboard as /devices/virtual/input/input0
input: ADB Powerbook buttons as /devices/virtual/input/input1
ADB mouse (trackpad) at 3 has handler 0x4
input: ADB mouse as /devices/virtual/input/input2
scsi host0: MESH
pata-macio 0.00020000:ata0: Activating pata-macio chipset Heathrow ATA, Apple bus ID 0
scsi host1: pata_macio
ata1: PATA max MWDMA2 irq 30
ata1.00: ATA-7: SAMSUNG HM100JC, YN100-08, max UDMA/100
ata1.00: 195371568 sectors, multi 8: LBA48
scsi 1:0:0:0: Direct-Access ATA SAMSUNG HM100JC 0-08 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 195371568 512-byte logical blocks: (100 GB/93.2 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
pata-macio 0.00021000:ata1: Activating pata-macio chipset Heathrow ATA, Apple bus ID 1
scsi host2: pata_macio
ata2: PATA max MWDMA2 irq 36
pata-macio 1.00021000:ata4: Activating pata-macio chipset Heathrow ATA, Apple bus ID 4
genirq: Flags mismatch irq 36. 00000000 (pata-macio[1.00021000:ata4]) vs. 00000000 (pata-macio[0.00021000:ata1])
pata-macio: probe of 1.00021000:ata4 failed with error -16
ata2.00: ATA-6: ST9160821A, 3.ALD, max UDMA/100
ata2.00: 312581808 sectors, multi 0: LBA48
eth0: BMAC at 00:05:02:07:5a:a6
aoe: AoE v85 initialised.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-generic rtc-generic: registered as rtc0
i2c /dev entries driver
PowerMac i2c bus pmu 2 registered
PowerMac i2c bus pmu 1 registered
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
drmem: No dynamic reconfiguration memory found
sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15
sd 1:0:0:0: [sda] Attached SCSI disk
scsi 2:0:0:0: Direct-Access ATA ST9160821A D PQ: 0 ANSI: 5
sd 2:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: [mac] sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14
sd 2:0:0:0: [sdb] Attached SCSI disk
EXT4-fs (sda12): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda12): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
VFS: Mounted root (ext3 filesystem) readonly on device 8:12.
Freeing unused kernel memory: 1284K
Kernel memory protection not selected by kernel config.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
findfs: unable to resolve 'LABEL=Debian_sid'
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...random: crng init done
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
done.
Setting up keyboard layout...done.
Activating swap...Adding 524284k swap on /dev/sda14. Priority:-2 extents:1 across:524284k
done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Checking root file system...Debian_sid: clean, 76261/524288 files, 1036636/2097152 blocks
done.
EXT4-fs (sda12): re-mounted. Opts: errors=remount-ro. Quota mode: disabled.
Checking file systems...data: clean, 83287/3325952 files, 2159937/13280326 blocks
done.
Cleaning up temporary files...
/tmp.
Loading kernel module lp.
modprobe: FATAL: Module lp not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module ppdev.
modprobe: FATAL: Module ppdev not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module parport_pc.
modprobe: FATAL: Module parport_pc not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module apm_emu.
modprobe: FATAL: Module apm_emu not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module bmac.
modprobe: FATAL: Module bmac not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module mesh.
modprobe: FATAL: Module mesh not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module snd-powermac.
modprobe: FATAL: Module snd-powermac not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
EXT4-fs (sda15): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda15): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
Mounting local filesystems...done.
Activating swapfile swap, if any...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Configuring network interfaces...done.
Cleaning up temporary files....
Setting up X socket directories...
/tmp/.X11-unix
/tmp/.ICE-unix
.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Setting up console font and keymap...done.
Recovering nvi editor sessions.
none found.
Starting enhanced syslogd: rsyslogd.
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
Starting S.M.A.R.T. daemon: smartd
.
Starting OpenBSD Secure Shell server: sshd.
Starting WINGs display manager: wdm:.
Deconfiguring network interfaces...
done.
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Debian GNU/Linux 11 mac-server ttyS0
mac-server login: root
Password:
Linux mac-server 5.12.0-rc3-pmac-00078-g5cac2bc3752 #4 SMP Thu Aug 5 06:51:39 MDT 2021 ppc
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Aug 4 23:01:38 MDT 2021 on ttyS0
root@mac-server:~# shutdown -r now
Broadcast message from root@mac-server (ttyS0) (Thu Aug 5 07:03:06 2021):
The system is going down for reboot NOW!
Broadcast message from root@mac-server (ttyS0) (Thu Aug 5 07:03:06 2021):
The system is going down for reboot NOW!
INIT: SenUsing makefile-style concurrent boot in runlevel 6.
Stopping mouse emulation daemon: mouseemu.
Stopping hotplug events dispatcher: systemd-udevd.
Stopping S.M.A.R.T. daemon: smartd.
Stopping WINGs display manager: wdm: (removing stale /var/run/wdm.pid).
Asking all remaining processes to terminate...done.
All processes ended within 4 seconds...done.
Stopping enhanced syslogd: rsyslogd.
Saving the system clock to /dev/rtc0.
Hardware Clock updated to Thu Aug 5 07:03:15 MDT 2021.
Deconfiguring network interfaces...done.
Deactivating swap...done.
Unmounting local filesystems...done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Will now restart.
sd 2:0:0:0: [sdb] Synchronizing SCSI cache
resetting MESH scsi bus(es)
reboot: Restarting system
[-- Attachment #6: Type: text/plain, Size: 16939 bytes --]
printk: console [ttyS0] enabled
printk: bootconsole [udbg0] disabled
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
devtmpfs: initialized
Duplicate name in PowerPC,750, renamed to "l2-cache#1"
Duplicate name in pci, renamed to "mac-io#1"
Duplicate name in pci, renamed to "pccard#1"
Found Grackle (MPC106) PCI host bridge at 0x0000000080000000. Firmware bus number: 0->0
PCI host bridge /pci (primary) ranges:
IO 0x00000000fe000000..0x00000000fe7fffff -> 0x0000000000000000
MEM 0x00000000fd000000..0x00000000fdffffff -> 0x0000000000000000
MEM 0x0000000080000000..0x00000000fcffffff -> 0x0000000080000000
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered protocol family 16
PMU i2c /pci/mac-io/via-pmu
channel 1 bus <multibus>
channel 2 bus <multibus>
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x7fffff]
pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfdffffff] (bus address [0x00000000-0x00ffffff])
pci_bus 0000:00: root bus resource [mem 0x80000000-0xfcffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
pci 0000:00:00.0: [1057:0002] type 00 class 0x060000
pci 0000:00:0d.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:0d.0: reg 0x10: [mem 0xf4000000-0xf407ffff]
pci 0000:00:10.0: [106b:0017] type 00 class 0xff0000
pci 0000:00:10.0: reg 0x10: [mem 0xf3000000-0xf307ffff]
pci 0000:00:11.0: [1002:4c50] type 00 class 0x038000
pci 0000:00:11.0: reg 0x10: [mem 0x82000000-0x82ffffff]
pci 0000:00:11.0: reg 0x14: [io 0x0400-0x04ff]
pci 0000:00:11.0: reg 0x18: [mem 0x82fff000-0x82ffffff]
pci 0000:00:11.0: reg 0x30: [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: supports D1 D2
pci 0000:00:13.0: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.0: reg 0x10: [mem 0x81803000-0x81803fff]
pci 0000:00:13.1: [104c:ac15] type 02 class 0x060700
pci 0000:00:13.1: reg 0x10: [mem 0x81802000-0x81802fff]
pci_bus 0000:01: extended config space not accessible
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 04
pci_bus 0000:05: extended config space not accessible
pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 08
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 08
PCI: Cannot allocate resource region 2 of device 0000:00:11.0, will remap
PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]
pci 0000:00:13.0: BAR 9: assigned [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: BAR 10: assigned [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: BAR 9: assigned [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: BAR 10: assigned [mem 0x90000000-0x93ffffff]
pci 0000:00:11.0: BAR 6: assigned [mem 0xfd000000-0xfd01ffff pref]
pci 0000:00:11.0: BAR 2: assigned [mem 0xfd020000-0xfd020fff]
pci 0000:00:13.0: BAR 7: assigned [io 0x1000-0x10ff]
pci 0000:00:13.0: BAR 8: assigned [io 0x1100-0x11ff]
pci 0000:00:13.1: BAR 7: assigned [io 0x1200-0x12ff]
pci 0000:00:13.1: BAR 8: assigned [io 0x1300-0x13ff]
pci 0000:00:13.0: CardBus bridge to [bus 01-04]
pci 0000:00:13.0: bridge window [io 0x1000-0x10ff]
pci 0000:00:13.0: bridge window [io 0x1100-0x11ff]
pci 0000:00:13.0: bridge window [mem 0x84000000-0x87ffffff pref]
pci 0000:00:13.0: bridge window [mem 0x88000000-0x8bffffff]
pci 0000:00:13.1: CardBus bridge to [bus 05-08]
pci 0000:00:13.1: bridge window [io 0x1200-0x12ff]
pci 0000:00:13.1: bridge window [io 0x1300-0x13ff]
pci 0000:00:13.1: bridge window [mem 0x8c000000-0x8fffffff pref]
pci 0000:00:13.1: bridge window [mem 0x90000000-0x93ffffff]
pci_bus 0000:00: resource 4 [io 0x0000-0x7fffff]
pci_bus 0000:00: resource 5 [mem 0xfd000000-0xfdffffff]
pci_bus 0000:00: resource 6 [mem 0x80000000-0xfcffffff]
pci_bus 0000:01: resource 0 [io 0x1000-0x10ff]
pci_bus 0000:01: resource 1 [io 0x1100-0x11ff]
pci_bus 0000:01: resource 2 [mem 0x84000000-0x87ffffff pref]
pci_bus 0000:01: resource 3 [mem 0x88000000-0x8bffffff]
pci_bus 0000:05: resource 0 [io 0x1200-0x12ff]
pci_bus 0000:05: resource 1 [io 0x1300-0x13ff]
pci_bus 0000:05: resource 2 [mem 0x8c000000-0x8fffffff pref]
pci_bus 0000:05: resource 3 [mem 0x90000000-0x93ffffff]
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 32 bytes, default 32
Thermal assist unit using workqueue, shrink_timer: 2000 ms
workingset: timestamp_bits=30 max_order=17 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler mq-deadline registered
pci 0000:00:11.0: enabling device (0086 -> 0087)
Using unsupported 1024x768 (null) at 82801000, depth=32, pitch=4096
Console: switching to colour frame buffer device 128x48
fb0: Open Firmware frame buffer device on /pci/ATY,RageLTPro
pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
Non-volatile memory driver v1.3
brd: module loaded
loop: module loaded
MacIO PCI driver attached to Gatwick chipset
MacIO PCI driver attached to Heathrow chipset
swim3 0.00015000:floppy: [fd0] SWIM3 floppy controller in media bay
0.00013020:ch-a: ttyS0 at MMIO 0xf3013020 (irq = 16, base_baud = 230400) is a Z85c30 ESCC - Serial port
0.00013000:ch-b: ttyS1 at MMIO 0xf3013000 (irq = 17, base_baud = 230400) is a Z85c30 ESCC - Infrared port
macio: fixed media-bay irq on gatwick
macio: fixed left floppy irqs
swim3 1.00015000:floppy: [fd1] Couldn't request interrupt
swim3: probe of 1.00015000:floppy failed with error -16
macio: fixed left ide irqs
macio: fixed SCC irqs on gatwick
1.00013020:ch-a: ttyS2 at MMIO 0xf4013020 (irq = 79, base_baud = 230400) is a Z85c30 ESCC - Internal modem
mediabay0: Registered Heathrow media-bay
mediabay1: Registered Heathrow media-bay
mediabay0: Bay contains an ATA device
PMU Backlight initialized (pmubl)
mesh: configured for synchronous 5 MB/s
mediabay1: Bay contains a floppy drive
mesh: performing initial bus reset...
random: fast init done
adb device [2]: 2 0xC3
adb device [3]: 3 0x1
adb device [7]: 7 0x1F
ADB keyboard at 2 has handler 0xC3
Detected ADB keyboard, type ANSI.
input: ADB keyboard as /devices/virtual/input/input0
input: ADB Powerbook buttons as /devices/virtual/input/input1
ADB mouse (trackpad) at 3 has handler 0x4
input: ADB mouse as /devices/virtual/input/input2
scsi host0: MESH
pata-macio 0.00020000:ata0: Activating pata-macio chipset Heathrow ATA, Apple bus ID 0
scsi host1: pata_macio
ata1: PATA max MWDMA2 irq 30
ata1.00: ATA-7: SAMSUNG HM100JC, YN100-08, max UDMA/100
ata1.00: 195371568 sectors, multi 8: LBA48
scsi 1:0:0:0: Direct-Access ATA SAMSUNG HM100JC 0-08 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 195371568 512-byte logical blocks: (100 GB/93.2 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
pata-macio 0.00021000:ata1: Activating pata-macio chipset Heathrow ATA, Apple bus ID 1
scsi host2: pata_macio
ata2: PATA max MWDMA2 irq 36
pata-macio 1.00021000:ata4: Activating pata-macio chipset Heathrow ATA, Apple bus ID 4
genirq: Flags mismatch irq 36. 00000000 (pata-macio[1.00021000:ata4]) vs. 00000000 (pata-macio[0.00021000:ata1])
pata-macio: probe of 1.00021000:ata4 failed with error -16
ata2.00: ATA-6: ST9160821A, 3.ALD, max UDMA/100
ata2.00: 312581808 sectors, multi 0: LBA48
eth0: BMAC at 00:05:02:07:5a:a6
aoe: AoE v85 initialised.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-generic rtc-generic: registered as rtc0
i2c /dev entries driver
PowerMac i2c bus pmu 2 registered
PowerMac i2c bus pmu 1 registered
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
drmem: No dynamic reconfiguration memory found
sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15
sd 1:0:0:0: [sda] Attached SCSI disk
scsi 2:0:0:0: Direct-Access ATA ST9160821A D PQ: 0 ANSI: 5
sd 2:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: [mac] sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14
sd 2:0:0:0: [sdb] Attached SCSI disk
EXT4-fs (sda12): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda12): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
VFS: Mounted root (ext3 filesystem) readonly on device 8:12.
Freeing unused kernel memory: 1224K
Kernel memory protection not selected by kernel config.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
findfs: unable to resolve 'LABEL=Debian_sid'
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...random: crng init done
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
done.
Setting up keyboard layout...done.
Activating swap...Adding 524284k swap on /dev/sda14. Priority:-2 extents:1 across:524284k
done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Checking root file system...Debian_sid: clean, 76261/524288 files, 1036661/2097152 blocks
done.
EXT4-fs (sda12): re-mounted. Opts: errors=remount-ro. Quota mode: disabled.
Checking file systems...data: clean, 83287/3325952 files, 2159937/13280326 blocks
done.
Cleaning up temporary files...
/tmp.
Loading kernel module lp.
modprobe: FATAL: Module lp not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module ppdev.
modprobe: FATAL: Module ppdev not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module parport_pc.
modprobe: FATAL: Module parport_pc not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module apm_emu.
modprobe: FATAL: Module apm_emu not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module bmac.
modprobe: FATAL: Module bmac not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module mesh.
modprobe: FATAL: Module mesh not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
Loading kernel module snd-powermac.
modprobe: FATAL: Module snd-powermac not found in directory /lib/modules/5.12.0-rc3-pmac-00078-g5cac2bc3752
EXT4-fs (sda15): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda15): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
Mounting local filesystems...done.
Activating swapfile swap, if any...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Configuring network interfaces...done.
Cleaning up temporary files....
Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix
.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Setting up console font and keymap...done.
Recovering nvi editor sessions.
none found.
Starting enhanced syslogd: rsyslogd.
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd.
Starting S.M.A.R.T. daemon: smartd.
Starting WINGs display manager: wdm:.
Deconfiguring network interfaces...
done.
phy registers:
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Debian GNU/Linux 11 mac-server ttyS0
mac-server login: BUG: Unable to handle kernel instruction fetch
Faulting instruction address: 0xfe88731c
Oops: Kernel access of bad area, sig: 11 [#1]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in:
CPU: 0 PID: 1775 Comm: xfce4-session Not tainted 5.12.0-rc3-pmac-00078-g5cac2bc3752 #5
NIP: fe88731c LR: fe88731c CTR: 00000000
REGS: e2ddde70 TRAP: 0400 Not tainted (5.12.0-rc3-pmac-00078-g5cac2bc3752)
MSR: 40001030 <ME,IR,DR> CR: 28024428 XER: 00000000
GPR00: fe88731c e2dddf30 c16820e0 00000000 00000000 00000000 c1a763a4 00000100
GPR08: 00000000 401239fa 40123b0b 00000000 88024428 008ef778 00000000 00000000
GPR16: 00c15b20 00c102f8 00000001 bfc1e248 00000000 b50ef658 0092d120 b4be3d60
GPR24: bfc1e188 0090093c 00000000 00000000 bfc1e0cc 00900930 b6cbcff4 0000005d
NIP [fe88731c] 0xfe88731c
LR [fe88731c] 0xfe88731c
Call Trace:
[e2dddf30] [c0016058] ret_from_syscall+0xc/0x28 (unreliable)
--- interrupt: c00 at 0xb6bd76f8
NIP: b6bd76f8 LR: b6bd76cc CTR: b6bd76c0
REGS: e2dddf40 TRAP: 0c00 Not tainted (5.12.0-rc3-pmac-00078-g5cac2bc3752)
MSR: 0000d032 <EE,PR,ME,IR,DR,RI> CR: 28024422 XER: 00000000
GPR00: 000000a7 bfc1e090 b579dca0 00000001 00000001 ffffffff 00000000 00000001
GPR08: 00000000 0090093c 00000000 b6bd76c0 44044248 008ef778 00000000 00000000
GPR16: 00c15b20 00c102f8 00000001 bfc1e248 00000000 b50ef658 0092d120 b4be3d60
GPR24: bfc1e188 0090093c 00000000 00000000 bfc1e0cc 00900930 b6cbcff4 0000005d
NIP [b6bd76f8] 0xb6bd76f8
LR [b6bd76cc] 0xb6bd76cc
--- interrupt: c00
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
---[ end trace 95647df21d0753a5 ]---
mac-server login: root
Password:
Linux mac-server 5.12.0-rc3-pmac-00078-g5cac2bc3752 #5 SMP Thu Aug 5 07:02:31 MDT 2021 ppc
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Aug 5 07:03:01 MDT 2021 on ttyS0
root@mac-server:~# shutdown -r now
Broadcast message from root@mac-server (ttyS0) (Thu Aug 5 07:16:20 2021):
The system is going down for reboot NOW!
Broadcast message from root@mac-server (ttyS0) (Thu Aug 5 07:16:20 2021):
The system is going down for reboot NOW!
INIT: Sending processes configured via /etUsing makefile-style concurrent boot in runlevel 6.
Stopping mouse emulation daemon: mouseemu.
Stopping S.M.A.R.T. daemon: smartd.
Stopping hotplug events dispatcher: systemd-udevd.
Stopping WINGs display manager: wdm: (removing stale /var/run/wdm.pid).
Asking all remaining processes to terminate...done.
All processes ended within 4 seconds...done.
Stopping enhanced syslogd: rsyslogd.
Deconfiguring network interfaces...done.
Saving the system clock to /dev/rtc0.
Hardware Clock updated to Thu Aug 5 07:16:28 MDT 2021.
Deactivating swap...done.
Unmounting local filesystems...done.
EXT4-fs (sda12): re-mounted. Opts: (null). Quota mode: disabled.
Will now restart.
sd 2:0:0:0: [sdb] Synchronizing SCSI cache
resetting MESH scsi bus(es)
reboot: Restarting system
^ permalink raw reply
* Re: [PATCH v1 02/55] KVM: PPC: Book3S HV P9: Fixes for TM softpatch interrupt
From: Michael Ellerman @ 2021-08-06 1:16 UTC (permalink / raw)
To: Nicholas Piggin, kvm-ppc; +Cc: linuxppc-dev, Nicholas Piggin
In-Reply-To: <20210726035036.739609-3-npiggin@gmail.com>
Nicholas Piggin <npiggin@gmail.com> writes:
> The softpatch interrupt sets HSRR0 to the faulting instruction +4, so
> it should subtract 4 for the faulting instruction address. Also have it
> emulate and deliver HFAC interrupts correctly, which is important for
> nested HV and facility demand-faulting in future.
The nip being off by 4 sounds bad. But I guess it's not that big a deal
because it's only used for reporting the instruction address?
Would also be good to have some more explanation of why it's OK to
change from illegal to HFAC, which is a guest visible change.
> diff --git a/arch/powerpc/kvm/book3s_hv_tm.c b/arch/powerpc/kvm/book3s_hv_tm.c
> index cc90b8b82329..e4fd4a9dee08 100644
> --- a/arch/powerpc/kvm/book3s_hv_tm.c
> +++ b/arch/powerpc/kvm/book3s_hv_tm.c
> @@ -74,19 +74,23 @@ int kvmhv_p9_tm_emulation(struct kvm_vcpu *vcpu)
> case PPC_INST_RFEBB:
> if ((msr & MSR_PR) && (vcpu->arch.vcore->pcr & PCR_ARCH_206)) {
> /* generate an illegal instruction interrupt */
> + vcpu->arch.regs.nip -= 4;
> kvmppc_core_queue_program(vcpu, SRR1_PROGILL);
> return RESUME_GUEST;
> }
> /* check EBB facility is available */
> if (!(vcpu->arch.hfscr & HFSCR_EBB)) {
> - /* generate an illegal instruction interrupt */
> - kvmppc_core_queue_program(vcpu, SRR1_PROGILL);
> - return RESUME_GUEST;
> + vcpu->arch.regs.nip -= 4;
> + vcpu->arch.hfscr &= ~HFSCR_INTR_CAUSE;
> + vcpu->arch.hfscr |= (u64)FSCR_EBB_LG << 56;
> + vcpu->arch.trap = BOOK3S_INTERRUPT_H_FAC_UNAVAIL;
> + return -1; /* rerun host interrupt handler */
This is EBB not TM. Probably OK to leave it in this patch as long as
it's mentioned in the change log?
> }
> if ((msr & MSR_PR) && !(vcpu->arch.fscr & FSCR_EBB)) {
> /* generate a facility unavailable interrupt */
> - vcpu->arch.fscr = (vcpu->arch.fscr & ~(0xffull << 56)) |
> - ((u64)FSCR_EBB_LG << 56);
> + vcpu->arch.regs.nip -= 4;
> + vcpu->arch.fscr &= ~FSCR_INTR_CAUSE;
> + vcpu->arch.fscr |= (u64)FSCR_EBB_LG << 56;
Same.
cheers
^ permalink raw reply
* [PATCH v4 0/2] make hvc pass dma capable memory to its backend
From: Xianting Tian @ 2021-08-06 3:01 UTC (permalink / raw)
To: gregkh, jirislaby, amit, arnd, osandov
Cc: Xianting Tian, guoren, linuxppc-dev, linux-kernel, virtualization
Dear all,
This patch series make hvc framework pass DMA capable memory to
put_chars() of hvc backend(eg, virtio-console), and revert commit
c4baad5029 ("virtio-console: avoid DMA from stack”)
V1
virtio-console: avoid DMA from vmalloc area
https://lkml.org/lkml/2021/7/27/494
For v1 patch, Arnd Bergmann suggests to fix the issue in the first
place:
Make hvc pass DMA capable memory to put_chars()
The fix suggestion is included in v2.
V2
[PATCH 1/2] tty: hvc: pass DMA capable memory to put_chars()
https://lkml.org/lkml/2021/8/1/8
[PATCH 2/2] virtio-console: remove unnecessary kmemdup()
https://lkml.org/lkml/2021/8/1/9
For v2 patch, Arnd Bergmann suggests to make new buf part of the
hvc_struct structure, and fix the compile issue.
The fix suggestion is included in v3.
V3
[PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()
https://lkml.org/lkml/2021/8/3/1347
[PATCH v3 2/2] virtio-console: remove unnecessary kmemdup()
https://lkml.org/lkml/2021/8/3/1348
For v3 patch, Jiri Slaby suggests to make 'char c[N_OUTBUF]' part of
hvc_struct, and make 'hp->outbuf' aligned and use struct_size() to
calculate the size of hvc_struct. The fix suggestion is included in
v4.
drivers/char/virtio_console.c | 12 ++----------
drivers/tty/hvc/hvc_console.c | 33 ++++++++++++++++++---------------
drivers/tty/hvc/hvc_console.h | 16 ++++++++++++++--
3 file changed
^ permalink raw reply
* [PATCH v4 1/2] tty: hvc: pass DMA capable memory to put_chars()
From: Xianting Tian @ 2021-08-06 3:01 UTC (permalink / raw)
To: gregkh, jirislaby, amit, arnd, osandov
Cc: Xianting Tian, guoren, linuxppc-dev, linux-kernel, virtualization
In-Reply-To: <20210806030138.123479-1-xianting.tian@linux.alibaba.com>
As well known, hvc backend can register its opertions to hvc backend.
the opertions contain put_chars(), get_chars() and so on.
Some hvc backend may do dma in its opertions. eg, put_chars() of
virtio-console. But in the code of hvc framework, it may pass DMA
incapable memory to put_chars() under a specific configuration, which
is explained in commit c4baad5029(virtio-console: avoid DMA from stack):
1, c[] is on stack,
hvc_console_print():
char c[N_OUTBUF] __ALIGNED__;
cons_ops[index]->put_chars(vtermnos[index], c, i);
2, ch is on stack,
static void hvc_poll_put_char(,,char ch)
{
struct tty_struct *tty = driver->ttys[0];
struct hvc_struct *hp = tty->driver_data;
int n;
do {
n = hp->ops->put_chars(hp->vtermno, &ch, 1);
} while (n <= 0);
}
Commit c4baad5029 is just the fix to avoid DMA from stack memory, which
is passed to virtio-console by hvc framework in above code. But I think
the fix is aggressive, it directly uses kmemdup() to alloc new buffer
from kmalloc area and do memcpy no matter the memory is in kmalloc area
or not. But most importantly, it should better be fixed in the hvc
framework, by changing it to never pass stack memory to the put_chars()
function in the first place. Otherwise, we still face the same issue if
a new hvc backend using dma added in the furture.
We make 'char c[N_OUTBUF]' part of 'struct hvc_struct', so hp->c is no
longer the stack memory. we can use it in above two cases.
Other cleanup is to make 'hp->outbuf' aligned and use struct_size() to
calculate the size of hvc_struct.
With the patch, we can remove the fix c4baad5029.
Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
Tested-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
drivers/tty/hvc/hvc_console.c | 33 ++++++++++++++++++---------------
drivers/tty/hvc/hvc_console.h | 16 ++++++++++++++--
2 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 5bb8c4e44..3afdb169c 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -41,16 +41,6 @@
*/
#define HVC_CLOSE_WAIT (HZ/100) /* 1/10 of a second */
-/*
- * These sizes are most efficient for vio, because they are the
- * native transfer size. We could make them selectable in the
- * future to better deal with backends that want other buffer sizes.
- */
-#define N_OUTBUF 16
-#define N_INBUF 16
-
-#define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))
-
static struct tty_driver *hvc_driver;
static struct task_struct *hvc_task;
@@ -151,9 +141,11 @@ static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] =
static void hvc_console_print(struct console *co, const char *b,
unsigned count)
{
- char c[N_OUTBUF] __ALIGNED__;
+ char *c;
unsigned i = 0, n = 0;
int r, donecr = 0, index = co->index;
+ unsigned long flags;
+ struct hvc_struct *hp;
/* Console access attempt outside of acceptable console range. */
if (index >= MAX_NR_HVC_CONSOLES)
@@ -163,6 +155,13 @@ static void hvc_console_print(struct console *co, const char *b,
if (vtermnos[index] == -1)
return;
+ list_for_each_entry(hp, &hvc_structs, next)
+ if (hp->vtermno == vtermnos[index])
+ break;
+
+ c = hp->c;
+
+ spin_lock_irqsave(&hp->c_lock, flags);
while (count > 0 || i > 0) {
if (count > 0 && i < sizeof(c)) {
if (b[n] == '\n' && !donecr) {
@@ -191,6 +190,7 @@ static void hvc_console_print(struct console *co, const char *b,
}
}
}
+ spin_unlock_irqrestore(&hp->c_lock, flags);
hvc_console_flush(cons_ops[index], vtermnos[index]);
}
@@ -878,9 +878,13 @@ static void hvc_poll_put_char(struct tty_driver *driver, int line, char ch)
struct tty_struct *tty = driver->ttys[0];
struct hvc_struct *hp = tty->driver_data;
int n;
+ unsigned long flags;
do {
- n = hp->ops->put_chars(hp->vtermno, &ch, 1);
+ spin_lock_irqsave(&hp->c_lock, flags);
+ hp->c[0] = ch;
+ n = hp->ops->put_chars(hp->vtermno, hp->c, 1);
+ spin_unlock_irqrestore(&hp->c_lock, flags);
} while (n <= 0);
}
#endif
@@ -922,8 +926,7 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
return ERR_PTR(err);
}
- hp = kzalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
- GFP_KERNEL);
+ hp = kzalloc(struct_size(hp, outbuf, outbuf_size), GFP_KERNEL);
if (!hp)
return ERR_PTR(-ENOMEM);
@@ -931,13 +934,13 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
hp->data = data;
hp->ops = ops;
hp->outbuf_size = outbuf_size;
- hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))];
tty_port_init(&hp->port);
hp->port.ops = &hvc_port_ops;
INIT_WORK(&hp->tty_resize, hvc_set_winsz);
spin_lock_init(&hp->lock);
+ spin_lock_init(&hp->c_lock);
mutex_lock(&hvc_structs_mutex);
/*
diff --git a/drivers/tty/hvc/hvc_console.h b/drivers/tty/hvc/hvc_console.h
index 18d005814..52374e2da 100644
--- a/drivers/tty/hvc/hvc_console.h
+++ b/drivers/tty/hvc/hvc_console.h
@@ -32,13 +32,21 @@
*/
#define HVC_ALLOC_TTY_ADAPTERS 8
+/*
+ * These sizes are most efficient for vio, because they are the
+ * native transfer size. We could make them selectable in the
+ * future to better deal with backends that want other buffer sizes.
+ */
+#define N_OUTBUF 16
+#define N_INBUF 16
+
+#define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))
+
struct hvc_struct {
struct tty_port port;
spinlock_t lock;
int index;
int do_wakeup;
- char *outbuf;
- int outbuf_size;
int n_outbuf;
uint32_t vtermno;
const struct hv_ops *ops;
@@ -48,6 +56,10 @@ struct hvc_struct {
struct work_struct tty_resize;
struct list_head next;
unsigned long flags;
+ spinlock_t c_lock;
+ char c[N_OUTBUF] __ALIGNED__;
+ int outbuf_size;
+ char outbuf[0] __ALIGNED__;
};
/* implemented by a low level driver */
--
2.17.1
^ permalink raw reply related
* [PATCH v4 2/2] virtio-console: remove unnecessary kmemdup()
From: Xianting Tian @ 2021-08-06 3:01 UTC (permalink / raw)
To: gregkh, jirislaby, amit, arnd, osandov
Cc: Xianting Tian, guoren, linuxppc-dev, linux-kernel, virtualization
In-Reply-To: <20210806030138.123479-1-xianting.tian@linux.alibaba.com>
hvc framework will never pass stack memory to the put_chars() function,
So the calling of kmemdup() is unnecessary, we can remove it.
This revert commit c4baad5029 ("virtio-console: avoid DMA from stack")
Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
drivers/char/virtio_console.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 7eaf303a7..4ed3ffb1d 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1117,8 +1117,6 @@ static int put_chars(u32 vtermno, const char *buf, int count)
{
struct port *port;
struct scatterlist sg[1];
- void *data;
- int ret;
if (unlikely(early_put_chars))
return early_put_chars(vtermno, buf, count);
@@ -1127,14 +1125,8 @@ static int put_chars(u32 vtermno, const char *buf, int count)
if (!port)
return -EPIPE;
- data = kmemdup(buf, count, GFP_ATOMIC);
- if (!data)
- return -ENOMEM;
-
- sg_init_one(sg, data, count);
- ret = __send_to_port(port, sg, 1, count, data, false);
- kfree(data);
- return ret;
+ sg_init_one(sg, buf, count);
+ return __send_to_port(port, sg, 1, count, (void *)buf, false);
}
/*
--
2.17.1
^ permalink raw reply related
* Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register
From: Xiongwei Song @ 2021-08-06 3:16 UTC (permalink / raw)
To: Christophe Leroy
Cc: ravi.bangoria, Xiongwei Song, oleg, npiggin,
Linux Kernel Mailing List, efremov, Paul Mackerras, aneesh.kumar,
peterx, PowerPC, akpm, sandipan
In-Reply-To: <5e2336aa-90bf-b820-b5e4-e9a63088930f@csgroup.eu>
On Thu, Aug 5, 2021 at 6:06 PM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
>
>
>
> Le 26/07/2021 à 16:30, sxwjean@me.com a écrit :
> > From: Xiongwei Song <sxwjean@gmail.com>
> >
> > Create an anonymous union for dsisr and esr regsiters, we can reference
> > esr to get the exception detail when CONFIG_4xx=y or CONFIG_BOOKE=y.
> > Otherwise, reference dsisr. This makes code more clear.
>
> I'm not sure it is worth doing that.
Why don't we use "esr" as reference manauls mentioned?
>
> What is the point in doing the following when you know that regs->esr and regs->dsisr are exactly
> the same:
>
> > - err = ___do_page_fault(regs, regs->dar, regs->dsisr);
> > + if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > + err = ___do_page_fault(regs, regs->dar, regs->esr);
> > + else
> > + err = ___do_page_fault(regs, regs->dar, regs->dsisr);
> > +
Yes, we can drop this. But it's a bit vague.
> Or even
>
> > - int is_write = page_fault_is_write(regs->dsisr);
> > + unsigned long err_reg;
> > + int is_write;
> > +
> > + if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > + err_reg = regs->esr;
> > + else
> > + err_reg = regs->dsisr;
> > +
> > + is_write = page_fault_is_write(err_reg);
>
>
> Artificially growing the code for that makes no sense to me.
We can drop this too.
>
>
> To avoid anbiguity, maybe the best would be to rename regs->dsisr to something like regs->sr , so
> that we know it represents the status register, which is DSISR or ESR depending on the platform.
If so, this would make other people more confused. My consideration is
to follow what the reference
manuals represent.
Thank you so much for your comments.
Regards,
Xiongwei
>
>
> >
> > Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> > ---
> > arch/powerpc/include/asm/ptrace.h | 5 ++++-
> > arch/powerpc/include/uapi/asm/ptrace.h | 5 ++++-
> > arch/powerpc/kernel/process.c | 2 +-
> > arch/powerpc/kernel/ptrace/ptrace.c | 2 ++
> > arch/powerpc/kernel/traps.c | 2 +-
> > arch/powerpc/mm/fault.c | 16 ++++++++++++++--
> > arch/powerpc/platforms/44x/machine_check.c | 4 ++--
> > arch/powerpc/platforms/4xx/machine_check.c | 2 +-
> > 8 files changed, 29 insertions(+), 9 deletions(-)
> >
> > diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
> > index 3e5d470a6155..c252d04b1206 100644
> > --- a/arch/powerpc/include/asm/ptrace.h
> > +++ b/arch/powerpc/include/asm/ptrace.h
> > @@ -44,7 +44,10 @@ struct pt_regs
> > #endif
> > unsigned long trap;
> > unsigned long dar;
> > - unsigned long dsisr;
> > + union {
> > + unsigned long dsisr;
> > + unsigned long esr;
> > + };
> > unsigned long result;
> > };
> > };
> > diff --git a/arch/powerpc/include/uapi/asm/ptrace.h b/arch/powerpc/include/uapi/asm/ptrace.h
> > index 7004cfea3f5f..e357288b5f34 100644
> > --- a/arch/powerpc/include/uapi/asm/ptrace.h
> > +++ b/arch/powerpc/include/uapi/asm/ptrace.h
> > @@ -53,7 +53,10 @@ struct pt_regs
> > /* N.B. for critical exceptions on 4xx, the dar and dsisr
> > fields are overloaded to hold srr0 and srr1. */
> > unsigned long dar; /* Fault registers */
> > - unsigned long dsisr; /* on 4xx/Book-E used for ESR */
> > + union {
> > + unsigned long dsisr; /* on Book-S used for DSISR */
> > + unsigned long esr; /* on 4xx/Book-E used for ESR */
> > + };
> > unsigned long result; /* Result of a system call */
> > };
> >
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index 185beb290580..f74af8f9133c 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -1499,7 +1499,7 @@ static void __show_regs(struct pt_regs *regs)
> > trap == INTERRUPT_DATA_STORAGE ||
> > trap == INTERRUPT_ALIGNMENT) {
> > if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > - pr_cont("DEAR: "REG" ESR: "REG" ", regs->dar, regs->dsisr);
> > + pr_cont("DEAR: "REG" ESR: "REG" ", regs->dar, regs->esr);
> > else
> > pr_cont("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr);
> > }
> > diff --git a/arch/powerpc/kernel/ptrace/ptrace.c b/arch/powerpc/kernel/ptrace/ptrace.c
> > index 0a0a33eb0d28..00789ad2c4a3 100644
> > --- a/arch/powerpc/kernel/ptrace/ptrace.c
> > +++ b/arch/powerpc/kernel/ptrace/ptrace.c
> > @@ -375,6 +375,8 @@ void __init pt_regs_check(void)
> > offsetof(struct user_pt_regs, dar));
> > BUILD_BUG_ON(offsetof(struct pt_regs, dsisr) !=
> > offsetof(struct user_pt_regs, dsisr));
> > + BUILD_BUG_ON(offsetof(struct pt_regs, esr) !=
> > + offsetof(struct user_pt_regs, esr));
> > BUILD_BUG_ON(offsetof(struct pt_regs, result) !=
> > offsetof(struct user_pt_regs, result));
> >
> > diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> > index dfbce527c98e..2164f5705a0b 100644
> > --- a/arch/powerpc/kernel/traps.c
> > +++ b/arch/powerpc/kernel/traps.c
> > @@ -562,7 +562,7 @@ static inline int check_io_access(struct pt_regs *regs)
> > #ifdef CONFIG_PPC_ADV_DEBUG_REGS
> > /* On 4xx, the reason for the machine check or program exception
> > is in the ESR. */
> > -#define get_reason(regs) ((regs)->dsisr)
> > +#define get_reason(regs) ((regs)->esr)
> > #define REASON_FP ESR_FP
> > #define REASON_ILLEGAL (ESR_PIL | ESR_PUO)
> > #define REASON_PRIVILEGED ESR_PPR
> > diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
> > index a8d0ce85d39a..62953d4e7c93 100644
> > --- a/arch/powerpc/mm/fault.c
> > +++ b/arch/powerpc/mm/fault.c
> > @@ -541,7 +541,11 @@ static __always_inline void __do_page_fault(struct pt_regs *regs)
> > {
> > long err;
> >
> > - err = ___do_page_fault(regs, regs->dar, regs->dsisr);
> > + if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > + err = ___do_page_fault(regs, regs->dar, regs->esr);
> > + else
> > + err = ___do_page_fault(regs, regs->dar, regs->dsisr);
> > +
> > if (unlikely(err))
> > bad_page_fault(regs, err);
> > }
> > @@ -567,7 +571,15 @@ NOKPROBE_SYMBOL(hash__do_page_fault);
> > */
> > static void __bad_page_fault(struct pt_regs *regs, int sig)
> > {
> > - int is_write = page_fault_is_write(regs->dsisr);
> > + unsigned long err_reg;
> > + int is_write;
> > +
> > + if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > + err_reg = regs->esr;
> > + else
> > + err_reg = regs->dsisr;
> > +
> > + is_write = page_fault_is_write(err_reg);
> >
> > /* kernel has accessed a bad area */
> >
> > diff --git a/arch/powerpc/platforms/44x/machine_check.c b/arch/powerpc/platforms/44x/machine_check.c
> > index a5c898bb9bab..5d19daacd78a 100644
> > --- a/arch/powerpc/platforms/44x/machine_check.c
> > +++ b/arch/powerpc/platforms/44x/machine_check.c
> > @@ -11,7 +11,7 @@
> >
> > int machine_check_440A(struct pt_regs *regs)
> > {
> > - unsigned long reason = regs->dsisr;
> > + unsigned long reason = regs->esr;
> >
> > printk("Machine check in kernel mode.\n");
> > if (reason & ESR_IMCP){
> > @@ -48,7 +48,7 @@ int machine_check_440A(struct pt_regs *regs)
> > #ifdef CONFIG_PPC_47x
> > int machine_check_47x(struct pt_regs *regs)
> > {
> > - unsigned long reason = regs->dsisr;
> > + unsigned long reason = regs->esr;
> > u32 mcsr;
> >
> > printk(KERN_ERR "Machine check in kernel mode.\n");
> > diff --git a/arch/powerpc/platforms/4xx/machine_check.c b/arch/powerpc/platforms/4xx/machine_check.c
> > index a71c29892a91..a905da1d6f41 100644
> > --- a/arch/powerpc/platforms/4xx/machine_check.c
> > +++ b/arch/powerpc/platforms/4xx/machine_check.c
> > @@ -10,7 +10,7 @@
> >
> > int machine_check_4xx(struct pt_regs *regs)
> > {
> > - unsigned long reason = regs->dsisr;
> > + unsigned long reason = regs->esr;
> >
> > if (reason & ESR_IMCP) {
> > printk("Instruction");
> >
^ permalink raw reply
* Re: [RFC PATCH 3/4] powerpc: Optimize register usage for dear register
From: Xiongwei Song @ 2021-08-06 3:16 UTC (permalink / raw)
To: Christophe Leroy
Cc: ravi.bangoria, Xiongwei Song, oleg, npiggin,
Linux Kernel Mailing List, efremov, Paul Mackerras, aneesh.kumar,
peterx, PowerPC, akpm, sandipan
In-Reply-To: <56d9e3ce-f303-fd41-bd16-5655d9dc5e52@csgroup.eu>
On Thu, Aug 5, 2021 at 6:09 PM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
>
>
>
> Le 26/07/2021 à 16:30, sxwjean@me.com a écrit :
> > From: Xiongwei Song <sxwjean@gmail.com>
> >
> > Create an anonymous union for dar and dear regsiters, we can reference
> > dear to get the effective address when CONFIG_4xx=y or CONFIG_BOOKE=y.
> > Otherwise, reference dar. This makes code more clear.
>
> Same comment here as for patch 1.
Same reply for the patch 1.
Thank you.
>
>
> >
> > Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> > ---
> > arch/powerpc/include/asm/ptrace.h | 5 ++++-
> > arch/powerpc/include/uapi/asm/ptrace.h | 5 ++++-
> > arch/powerpc/kernel/process.c | 2 +-
> > arch/powerpc/kernel/ptrace/ptrace.c | 2 ++
> > arch/powerpc/kernel/traps.c | 5 ++++-
> > arch/powerpc/mm/fault.c | 2 +-
> > 6 files changed, 16 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
> > index c252d04b1206..fa725e3238c2 100644
> > --- a/arch/powerpc/include/asm/ptrace.h
> > +++ b/arch/powerpc/include/asm/ptrace.h
> > @@ -43,7 +43,10 @@ struct pt_regs
> > unsigned long mq;
> > #endif
> > unsigned long trap;
> > - unsigned long dar;
> > + union {
> > + unsigned long dar;
> > + unsigned long dear;
> > + };
> > union {
> > unsigned long dsisr;
> > unsigned long esr;
> > diff --git a/arch/powerpc/include/uapi/asm/ptrace.h b/arch/powerpc/include/uapi/asm/ptrace.h
> > index e357288b5f34..9ae150fb4c4b 100644
> > --- a/arch/powerpc/include/uapi/asm/ptrace.h
> > +++ b/arch/powerpc/include/uapi/asm/ptrace.h
> > @@ -52,7 +52,10 @@ struct pt_regs
> > unsigned long trap; /* Reason for being here */
> > /* N.B. for critical exceptions on 4xx, the dar and dsisr
> > fields are overloaded to hold srr0 and srr1. */
> > - unsigned long dar; /* Fault registers */
> > + union {
> > + unsigned long dar; /* Fault registers */
> > + unsigned long dear;
> > + };
> > union {
> > unsigned long dsisr; /* on Book-S used for DSISR */
> > unsigned long esr; /* on 4xx/Book-E used for ESR */
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index f74af8f9133c..50436b52c213 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -1499,7 +1499,7 @@ static void __show_regs(struct pt_regs *regs)
> > trap == INTERRUPT_DATA_STORAGE ||
> > trap == INTERRUPT_ALIGNMENT) {
> > if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > - pr_cont("DEAR: "REG" ESR: "REG" ", regs->dar, regs->esr);
> > + pr_cont("DEAR: "REG" ESR: "REG" ", regs->dear, regs->esr);
> > else
> > pr_cont("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr);
> > }
> > diff --git a/arch/powerpc/kernel/ptrace/ptrace.c b/arch/powerpc/kernel/ptrace/ptrace.c
> > index 00789ad2c4a3..969dca8b0718 100644
> > --- a/arch/powerpc/kernel/ptrace/ptrace.c
> > +++ b/arch/powerpc/kernel/ptrace/ptrace.c
> > @@ -373,6 +373,8 @@ void __init pt_regs_check(void)
> > offsetof(struct user_pt_regs, trap));
> > BUILD_BUG_ON(offsetof(struct pt_regs, dar) !=
> > offsetof(struct user_pt_regs, dar));
> > + BUILD_BUG_ON(offsetof(struct pt_regs, dear) !=
> > + offsetof(struct user_pt_regs, dear));
> > BUILD_BUG_ON(offsetof(struct pt_regs, dsisr) !=
> > offsetof(struct user_pt_regs, dsisr));
> > BUILD_BUG_ON(offsetof(struct pt_regs, esr) !=
> > diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> > index 2164f5705a0b..0796630d3d23 100644
> > --- a/arch/powerpc/kernel/traps.c
> > +++ b/arch/powerpc/kernel/traps.c
> > @@ -1609,7 +1609,10 @@ DEFINE_INTERRUPT_HANDLER(alignment_exception)
> > }
> > bad:
> > if (user_mode(regs))
> > - _exception(sig, regs, code, regs->dar);
> > + if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > + _exception(sig, regs, code, regs->dear);
> > + else
> > + _exception(sig, regs, code, regs->dar);
> > else
> > bad_page_fault(regs, sig);
> > }
> > diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
> > index 62953d4e7c93..3db6b39a1178 100644
> > --- a/arch/powerpc/mm/fault.c
> > +++ b/arch/powerpc/mm/fault.c
> > @@ -542,7 +542,7 @@ static __always_inline void __do_page_fault(struct pt_regs *regs)
> > long err;
> >
> > if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > - err = ___do_page_fault(regs, regs->dar, regs->esr);
> > + err = ___do_page_fault(regs, regs->dear, regs->esr);
> > else
> > err = ___do_page_fault(regs, regs->dar, regs->dsisr);
> >
> >
^ permalink raw reply
* Re: [PATCH v4] soc: fsl: qe: convert QE interrupt controller to platform_device
From: Maxim Kochetkov @ 2021-08-06 4:37 UTC (permalink / raw)
To: Saravana Kannan
Cc: kernel test robot, gregkh, linux-kernel, leoyang.li,
Dan Carpenter, linuxppc-dev, linux-arm-kernel, qiang.zhao
In-Reply-To: <CAGETcx8QC+AMXvmk4RB=LGp00QLVVX4uCeeruAjFnGq_irMh4Q@mail.gmail.com>
03.08.2021 20:51, Saravana Kannan wrote:
>> So lets convert this driver to simple platform_device with probe().
>> Also use platform_get_ and devm_ family function to get/allocate
>> resources and drop unused .compatible = "qeic".
> Yes, please!
Should I totally drop { .type = "qeic"}, or keep?
^ permalink raw reply
* Re: [PATCH v4] soc: fsl: qe: convert QE interrupt controller to platform_device
From: Saravana Kannan @ 2021-08-06 4:39 UTC (permalink / raw)
To: Maxim Kochetkov
Cc: kernel test robot, gregkh, linux-kernel, leoyang.li,
Dan Carpenter, linuxppc-dev, linux-arm-kernel, qiang.zhao
In-Reply-To: <dff603dc-9038-71cb-bfcb-5abc24f17109@inbox.ru>
On Thu, Aug 5, 2021 at 9:35 PM Maxim Kochetkov <fido_max@inbox.ru> wrote:
>
> 03.08.2021 20:51, Saravana Kannan wrote:
> >> So lets convert this driver to simple platform_device with probe().
> >> Also use platform_get_ and devm_ family function to get/allocate
> >> resources and drop unused .compatible = "qeic".
> > Yes, please!
>
> Should I totally drop { .type = "qeic"}, or keep?
Sorry for the confusion. My "Yes, please"!" was a show of support for
switching this to a proper platform driver. Not a response to that
specific question.
I didn't look at the code/DT close enough to know/care about the "type" part.
-Saravana
^ permalink raw reply
* Re: [PATCH v4] soc: fsl: qe: convert QE interrupt controller to platform_device
From: Christophe Leroy @ 2021-08-06 4:53 UTC (permalink / raw)
To: Saravana Kannan, Maxim Kochetkov
Cc: kernel test robot, gregkh, linux-kernel, leoyang.li,
linux-arm-kernel, linuxppc-dev, Dan Carpenter, qiang.zhao
In-Reply-To: <CAGETcx-evuv-A+A5v3-ubFZNvn_i+QSvg+tSW0OOgAd82-pytg@mail.gmail.com>
Le 06/08/2021 à 06:39, Saravana Kannan a écrit :
> On Thu, Aug 5, 2021 at 9:35 PM Maxim Kochetkov <fido_max@inbox.ru> wrote:
>>
>> 03.08.2021 20:51, Saravana Kannan wrote:
>>>> So lets convert this driver to simple platform_device with probe().
>>>> Also use platform_get_ and devm_ family function to get/allocate
>>>> resources and drop unused .compatible = "qeic".
>>> Yes, please!
>>
>> Should I totally drop { .type = "qeic"}, or keep?
>
> Sorry for the confusion. My "Yes, please"!" was a show of support for
> switching this to a proper platform driver. Not a response to that
> specific question.
>
> I didn't look at the code/DT close enough to know/care about the "type" part.
>
As far as I understand, Leo told it needs to remain, based on his answer below:
"From the original code, this should be type = "qeic". It is not
defined in current binding but probably needed for backward
compatibility."
Christophe
^ permalink raw reply
* Re: [PATCHv2 1/3] powerpc/cacheinfo: Lookup cache by dt node and thread-group id
From: Srikar Dronamraju @ 2021-08-06 5:43 UTC (permalink / raw)
To: Parth Shah; +Cc: ego, mikey, parths1229, svaidy, linuxppc-dev
In-Reply-To: <20210728175607.591679-2-parth@linux.ibm.com>
* Parth Shah <parth@linux.ibm.com> [2021-07-28 23:26:05]:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
>
> Currently the cacheinfo code on powerpc indexes the "cache" objects
> (modelling the L1/L2/L3 caches) where the key is device-tree node
> corresponding to that cache. On some of the POWER server platforms
> thread-groups within the core share different sets of caches (Eg: On
> SMT8 POWER9 systems, threads 0,2,4,6 of a core share L1 cache and
> threads 1,3,5,7 of the same core share another L1 cache). On such
> platforms, there is a single device-tree node corresponding to that
> cache and the cache-configuration within the threads of the core is
> indicated via "ibm,thread-groups" device-tree property.
>
> Since the current code is not aware of the "ibm,thread-groups"
> property, on the aforementoined systems, cacheinfo code still treats
> all the threads in the core to be sharing the cache because of the
> single device-tree node (In the earlier example, the cacheinfo code
> would says CPUs 0-7 share L1 cache).
>
> In this patch, we make the powerpc cacheinfo code aware of the
> "ibm,thread-groups" property. We indexe the "cache" objects by the
> key-pair (device-tree node, thread-group id). For any CPUX, for a
> given level of cache, the thread-group id is defined to be the first
> CPU in the "ibm,thread-groups" cache-group containing CPUX. For levels
> of cache which are not represented in "ibm,thread-groups" property,
> the thread-group id is -1.
>
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> [parth: Remove "static" keyword for the definition of "thread_group_l1_cache_map"
> and "thread_group_l2_cache_map" to get rid of the compile error.]
> Signed-off-by: Parth Shah <parth@linux.ibm.com>
Looks good to me.
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> ---
> arch/powerpc/include/asm/smp.h | 3 ++
> arch/powerpc/kernel/cacheinfo.c | 80 ++++++++++++++++++++++++---------
> arch/powerpc/kernel/smp.c | 4 +-
> 3 files changed, 63 insertions(+), 24 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
> index 03b3d010cbab..1259040cc3a4 100644
> --- a/arch/powerpc/include/asm/smp.h
> +++ b/arch/powerpc/include/asm/smp.h
> @@ -33,6 +33,9 @@ extern bool coregroup_enabled;
> extern int cpu_to_chip_id(int cpu);
> extern int *chip_id_lookup_table;
>
> +DECLARE_PER_CPU(cpumask_var_t, thread_group_l1_cache_map);
> +DECLARE_PER_CPU(cpumask_var_t, thread_group_l2_cache_map);
> +
> #ifdef CONFIG_SMP
>
> struct smp_ops_t {
> diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
> index 6f903e9aa20b..5a6925d87424 100644
> --- a/arch/powerpc/kernel/cacheinfo.c
> +++ b/arch/powerpc/kernel/cacheinfo.c
> @@ -120,6 +120,7 @@ struct cache {
> struct cpumask shared_cpu_map; /* online CPUs using this cache */
> int type; /* split cache disambiguation */
> int level; /* level not explicit in device tree */
> + int group_id; /* id of the group of threads that share this cache */
> struct list_head list; /* global list of cache objects */
> struct cache *next_local; /* next cache of >= level */
> };
> @@ -142,22 +143,24 @@ static const char *cache_type_string(const struct cache *cache)
> }
>
> static void cache_init(struct cache *cache, int type, int level,
> - struct device_node *ofnode)
> + struct device_node *ofnode, int group_id)
> {
> cache->type = type;
> cache->level = level;
> cache->ofnode = of_node_get(ofnode);
> + cache->group_id = group_id;
> INIT_LIST_HEAD(&cache->list);
> list_add(&cache->list, &cache_list);
> }
>
> -static struct cache *new_cache(int type, int level, struct device_node *ofnode)
> +static struct cache *new_cache(int type, int level,
> + struct device_node *ofnode, int group_id)
> {
> struct cache *cache;
>
> cache = kzalloc(sizeof(*cache), GFP_KERNEL);
> if (cache)
> - cache_init(cache, type, level, ofnode);
> + cache_init(cache, type, level, ofnode, group_id);
>
> return cache;
> }
> @@ -309,20 +312,24 @@ static struct cache *cache_find_first_sibling(struct cache *cache)
> return cache;
>
> list_for_each_entry(iter, &cache_list, list)
> - if (iter->ofnode == cache->ofnode && iter->next_local == cache)
> + if (iter->ofnode == cache->ofnode &&
> + iter->group_id == cache->group_id &&
> + iter->next_local == cache)
> return iter;
>
> return cache;
> }
>
> -/* return the first cache on a local list matching node */
> -static struct cache *cache_lookup_by_node(const struct device_node *node)
> +/* return the first cache on a local list matching node and thread-group id */
> +static struct cache *cache_lookup_by_node_group(const struct device_node *node,
> + int group_id)
> {
> struct cache *cache = NULL;
> struct cache *iter;
>
> list_for_each_entry(iter, &cache_list, list) {
> - if (iter->ofnode != node)
> + if (iter->ofnode != node ||
> + iter->group_id != group_id)
> continue;
> cache = cache_find_first_sibling(iter);
> break;
> @@ -352,14 +359,15 @@ static int cache_is_unified_d(const struct device_node *np)
> CACHE_TYPE_UNIFIED_D : CACHE_TYPE_UNIFIED;
> }
>
> -static struct cache *cache_do_one_devnode_unified(struct device_node *node, int level)
> +static struct cache *cache_do_one_devnode_unified(struct device_node *node, int group_id,
> + int level)
> {
> pr_debug("creating L%d ucache for %pOFP\n", level, node);
>
> - return new_cache(cache_is_unified_d(node), level, node);
> + return new_cache(cache_is_unified_d(node), level, node, group_id);
> }
>
> -static struct cache *cache_do_one_devnode_split(struct device_node *node,
> +static struct cache *cache_do_one_devnode_split(struct device_node *node, int group_id,
> int level)
> {
> struct cache *dcache, *icache;
> @@ -367,8 +375,8 @@ static struct cache *cache_do_one_devnode_split(struct device_node *node,
> pr_debug("creating L%d dcache and icache for %pOFP\n", level,
> node);
>
> - dcache = new_cache(CACHE_TYPE_DATA, level, node);
> - icache = new_cache(CACHE_TYPE_INSTRUCTION, level, node);
> + dcache = new_cache(CACHE_TYPE_DATA, level, node, group_id);
> + icache = new_cache(CACHE_TYPE_INSTRUCTION, level, node, group_id);
>
> if (!dcache || !icache)
> goto err;
> @@ -382,31 +390,32 @@ static struct cache *cache_do_one_devnode_split(struct device_node *node,
> return NULL;
> }
>
> -static struct cache *cache_do_one_devnode(struct device_node *node, int level)
> +static struct cache *cache_do_one_devnode(struct device_node *node, int group_id, int level)
> {
> struct cache *cache;
>
> if (cache_node_is_unified(node))
> - cache = cache_do_one_devnode_unified(node, level);
> + cache = cache_do_one_devnode_unified(node, group_id, level);
> else
> - cache = cache_do_one_devnode_split(node, level);
> + cache = cache_do_one_devnode_split(node, group_id, level);
>
> return cache;
> }
>
> static struct cache *cache_lookup_or_instantiate(struct device_node *node,
> + int group_id,
> int level)
> {
> struct cache *cache;
>
> - cache = cache_lookup_by_node(node);
> + cache = cache_lookup_by_node_group(node, group_id);
>
> WARN_ONCE(cache && cache->level != level,
> "cache level mismatch on lookup (got %d, expected %d)\n",
> cache->level, level);
>
> if (!cache)
> - cache = cache_do_one_devnode(node, level);
> + cache = cache_do_one_devnode(node, group_id, level);
>
> return cache;
> }
> @@ -443,7 +452,27 @@ static void do_subsidiary_caches_debugcheck(struct cache *cache)
> of_node_get_device_type(cache->ofnode));
> }
>
> -static void do_subsidiary_caches(struct cache *cache)
> +/*
> + * If sub-groups of threads in a core containing @cpu_id share the
> + * L@level-cache (information obtained via "ibm,thread-groups"
> + * device-tree property), then we identify the group by the first
> + * thread-sibling in the group. We define this to be the group-id.
> + *
> + * In the absence of any thread-group information for L@level-cache,
> + * this function returns -1.
> + */
> +static int get_group_id(unsigned int cpu_id, int level)
> +{
> + if (has_big_cores && level == 1)
> + return cpumask_first(per_cpu(thread_group_l1_cache_map,
> + cpu_id));
> + else if (thread_group_shares_l2 && level == 2)
> + return cpumask_first(per_cpu(thread_group_l2_cache_map,
> + cpu_id));
> + return -1;
> +}
> +
> +static void do_subsidiary_caches(struct cache *cache, unsigned int cpu_id)
> {
> struct device_node *subcache_node;
> int level = cache->level;
> @@ -452,9 +481,11 @@ static void do_subsidiary_caches(struct cache *cache)
>
> while ((subcache_node = of_find_next_cache_node(cache->ofnode))) {
> struct cache *subcache;
> + int group_id;
>
> level++;
> - subcache = cache_lookup_or_instantiate(subcache_node, level);
> + group_id = get_group_id(cpu_id, level);
> + subcache = cache_lookup_or_instantiate(subcache_node, group_id, level);
> of_node_put(subcache_node);
> if (!subcache)
> break;
> @@ -468,6 +499,7 @@ static struct cache *cache_chain_instantiate(unsigned int cpu_id)
> {
> struct device_node *cpu_node;
> struct cache *cpu_cache = NULL;
> + int group_id;
>
> pr_debug("creating cache object(s) for CPU %i\n", cpu_id);
>
> @@ -476,11 +508,13 @@ static struct cache *cache_chain_instantiate(unsigned int cpu_id)
> if (!cpu_node)
> goto out;
>
> - cpu_cache = cache_lookup_or_instantiate(cpu_node, 1);
> + group_id = get_group_id(cpu_id, 1);
> +
> + cpu_cache = cache_lookup_or_instantiate(cpu_node, group_id, 1);
> if (!cpu_cache)
> goto out;
>
> - do_subsidiary_caches(cpu_cache);
> + do_subsidiary_caches(cpu_cache, cpu_id);
>
> cache_cpu_set(cpu_cache, cpu_id);
> out:
> @@ -848,13 +882,15 @@ static struct cache *cache_lookup_by_cpu(unsigned int cpu_id)
> {
> struct device_node *cpu_node;
> struct cache *cache;
> + int group_id;
>
> cpu_node = of_get_cpu_node(cpu_id, NULL);
> WARN_ONCE(!cpu_node, "no OF node found for CPU %i\n", cpu_id);
> if (!cpu_node)
> return NULL;
>
> - cache = cache_lookup_by_node(cpu_node);
> + group_id = get_group_id(cpu_id, 1);
> + cache = cache_lookup_by_node_group(cpu_node, group_id);
> of_node_put(cpu_node);
>
> return cache;
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 447b78a87c8f..a7fcac44a8e2 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -122,14 +122,14 @@ static struct thread_groups_list tgl[NR_CPUS] __initdata;
> * On big-cores system, thread_group_l1_cache_map for each CPU corresponds to
> * the set its siblings that share the L1-cache.
> */
> -static DEFINE_PER_CPU(cpumask_var_t, thread_group_l1_cache_map);
> +DEFINE_PER_CPU(cpumask_var_t, thread_group_l1_cache_map);
>
> /*
> * On some big-cores system, thread_group_l2_cache_map for each CPU
> * corresponds to the set its siblings within the core that share the
> * L2-cache.
> */
> -static DEFINE_PER_CPU(cpumask_var_t, thread_group_l2_cache_map);
> +DEFINE_PER_CPU(cpumask_var_t, thread_group_l2_cache_map);
>
> /* SMP operations for this machine */
> struct smp_ops_t *smp_ops;
> --
> 2.26.3
>
--
Thanks and Regards
Srikar Dronamraju
^ permalink raw reply
* Re: [PATCHv2 2/3] powerpc/cacheinfo: Remove the redundant get_shared_cpu_map()
From: Srikar Dronamraju @ 2021-08-06 5:44 UTC (permalink / raw)
To: Parth Shah; +Cc: ego, mikey, parths1229, svaidy, linuxppc-dev
In-Reply-To: <20210728175607.591679-3-parth@linux.ibm.com>
* Parth Shah <parth@linux.ibm.com> [2021-07-28 23:26:06]:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
>
> The helper function get_shared_cpu_map() was added in
>
> 'commit 500fe5f550ec ("powerpc/cacheinfo: Report the correct
> shared_cpu_map on big-cores")'
>
> and subsequently expanded upon in
>
> 'commit 0be47634db0b ("powerpc/cacheinfo: Print correct cache-sibling
> map/list for L2 cache")'
>
> in order to help report the correct groups of threads sharing these caches
> on big-core systems where groups of threads within a core can share
> different sets of caches.
>
> Now that powerpc/cacheinfo is aware of "ibm,thread-groups" property,
> cache->shared_cpu_map contains the correct set of thread-siblings
> sharing the cache. Hence we no longer need the functions
> get_shared_cpu_map(). This patch removes this function. We also remove
> the helper function index_dir_to_cpu() which was only called by
> get_shared_cpu_map().
>
> With these functions removed, we can still see the correct
> cache-sibling map/list for L1 and L2 caches on systems with L1 and L2
> caches distributed among groups of threads in a core.
>
> With this patch, on a SMT8 POWER10 system where the L1 and L2 caches
> are split between the two groups of threads in a core, for CPUs 8,9,
> the L1-Data, L1-Instruction, L2, L3 cache CPU sibling list is as
> follows:
>
> $ grep . /sys/devices/system/cpu/cpu[89]/cache/index[0123]/shared_cpu_list
> /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list:8,10,12,14
> /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list:8,10,12,14
> /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list:8,10,12,14
> /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list:8-15
> /sys/devices/system/cpu/cpu9/cache/index0/shared_cpu_list:9,11,13,15
> /sys/devices/system/cpu/cpu9/cache/index1/shared_cpu_list:9,11,13,15
> /sys/devices/system/cpu/cpu9/cache/index2/shared_cpu_list:9,11,13,15
> /sys/devices/system/cpu/cpu9/cache/index3/shared_cpu_list:8-15
>
> $ ppc64_cpu --smt=4
> $ grep . /sys/devices/system/cpu/cpu[89]/cache/index[0123]/shared_cpu_list
> /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list:8,10
> /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list:8,10
> /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list:8,10
> /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list:8-11
> /sys/devices/system/cpu/cpu9/cache/index0/shared_cpu_list:9,11
> /sys/devices/system/cpu/cpu9/cache/index1/shared_cpu_list:9,11
> /sys/devices/system/cpu/cpu9/cache/index2/shared_cpu_list:9,11
> /sys/devices/system/cpu/cpu9/cache/index3/shared_cpu_list:8-11
>
> $ ppc64_cpu --smt=2
> $ grep . /sys/devices/system/cpu/cpu[89]/cache/index[0123]/shared_cpu_list
> /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list:8
> /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list:8
> /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list:8
> /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list:8-9
> /sys/devices/system/cpu/cpu9/cache/index0/shared_cpu_list:9
> /sys/devices/system/cpu/cpu9/cache/index1/shared_cpu_list:9
> /sys/devices/system/cpu/cpu9/cache/index2/shared_cpu_list:9
> /sys/devices/system/cpu/cpu9/cache/index3/shared_cpu_list:8-9
>
> $ ppc64_cpu --smt=1
> $ grep . /sys/devices/system/cpu/cpu[89]/cache/index[0123]/shared_cpu_list
> /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list:8
> /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list:8
> /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list:8
> /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list:8
>
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Looks good to me.
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> ---
> arch/powerpc/kernel/cacheinfo.c | 41 +--------------------------------
> 1 file changed, 1 insertion(+), 40 deletions(-)
>
> diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
> index 5a6925d87424..20d91693eac1 100644
> --- a/arch/powerpc/kernel/cacheinfo.c
> +++ b/arch/powerpc/kernel/cacheinfo.c
> @@ -675,45 +675,6 @@ static ssize_t level_show(struct kobject *k, struct kobj_attribute *attr, char *
> static struct kobj_attribute cache_level_attr =
> __ATTR(level, 0444, level_show, NULL);
>
> -static unsigned int index_dir_to_cpu(struct cache_index_dir *index)
> -{
> - struct kobject *index_dir_kobj = &index->kobj;
> - struct kobject *cache_dir_kobj = index_dir_kobj->parent;
> - struct kobject *cpu_dev_kobj = cache_dir_kobj->parent;
> - struct device *dev = kobj_to_dev(cpu_dev_kobj);
> -
> - return dev->id;
> -}
> -
> -/*
> - * On big-core systems, each core has two groups of CPUs each of which
> - * has its own L1-cache. The thread-siblings which share l1-cache with
> - * @cpu can be obtained via cpu_smallcore_mask().
> - *
> - * On some big-core systems, the L2 cache is shared only between some
> - * groups of siblings. This is already parsed and encoded in
> - * cpu_l2_cache_mask().
> - *
> - * TODO: cache_lookup_or_instantiate() needs to be made aware of the
> - * "ibm,thread-groups" property so that cache->shared_cpu_map
> - * reflects the correct siblings on platforms that have this
> - * device-tree property. This helper function is only a stop-gap
> - * solution so that we report the correct siblings to the
> - * userspace via sysfs.
> - */
> -static const struct cpumask *get_shared_cpu_map(struct cache_index_dir *index, struct cache *cache)
> -{
> - if (has_big_cores) {
> - int cpu = index_dir_to_cpu(index);
> - if (cache->level == 1)
> - return cpu_smallcore_mask(cpu);
> - if (cache->level == 2 && thread_group_shares_l2)
> - return cpu_l2_cache_mask(cpu);
> - }
> -
> - return &cache->shared_cpu_map;
> -}
> -
> static ssize_t
> show_shared_cpumap(struct kobject *k, struct kobj_attribute *attr, char *buf, bool list)
> {
> @@ -724,7 +685,7 @@ show_shared_cpumap(struct kobject *k, struct kobj_attribute *attr, char *buf, bo
> index = kobj_to_cache_index_dir(k);
> cache = index->cache;
>
> - mask = get_shared_cpu_map(index, cache);
> + mask = &cache->shared_cpu_map;
>
> return cpumap_print_to_pagebuf(list, buf, mask);
> }
> --
> 2.26.3
>
--
Thanks and Regards
Srikar Dronamraju
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox