* Re: [PATCH] powerpc: Fix instruction encoding for lis in ppc_function_entry()
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: linuxppc-dev, Naveen N. Rao; +Cc: Jiri Olsa
In-Reply-To: <20210304020411.16796-1-naveen.n.rao@linux.vnet.ibm.com>
On Thu, 4 Mar 2021 07:34:11 +0530, Naveen N. Rao wrote:
> 'lis r2,N' is 'addis r2,0,N' and the instruction encoding in the macro
> LIS_R2 is incorrect (it currently maps to 'addis 0,r2,N'). Fix the same.
Applied to powerpc/fixes.
[1/1] powerpc/64s: Fix instruction encoding for lis in ppc_function_entry()
https://git.kernel.org/powerpc/c/cea15316ceee2d4a51dfdecd79e08a438135416c
cheers
^ permalink raw reply
* Re: [RFC PATCH 0/8] WIP support for the LLVM integrated assembler
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: linuxppc-dev, llvmlinux, Daniel Axtens
In-Reply-To: <20210225031006.1204774-1-dja@axtens.net>
On Thu, 25 Feb 2021 14:09:58 +1100, Daniel Axtens wrote:
> To support Clang's CFI we need LTO. For LTO, we need to be able to compile
> with the LLVM integrated assembler.
>
> Currently, we can't.
>
> This series gets us a bit closer, but I'm still stuck and I'm hoping
> someone can point me in the right direction.
>
> [...]
Patch 1 applied to powerpc/fixes.
[1/8] powerpc/64s/exception: Clean up a missed SRR specifier
https://git.kernel.org/powerpc/c/c080a173301ffc62cb6c76308c803c7fee05517a
cheers
^ permalink raw reply
* Re: [PATCH v2] powerpc/pseries: Don't enforce MSI affinity with kdump
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: Greg Kurz, Michael Ellerman
Cc: lvivier, linuxppc-dev, linux-kernel, stable,
Cédric Le Goater
In-Reply-To: <20210215094506.1196119-1-groug@kaod.org>
On Mon, 15 Feb 2021 10:45:06 +0100, Greg Kurz wrote:
> Depending on the number of online CPUs in the original kernel, it is
> likely for CPU #0 to be offline in a kdump kernel. The associated IRQs
> in the affinity mappings provided by irq_create_affinity_masks() are
> thus not started by irq_startup(), as per-design with managed IRQs.
>
> This can be a problem with multi-queue block devices driven by blk-mq :
> such a non-started IRQ is very likely paired with the single queue
> enforced by blk-mq during kdump (see blk_mq_alloc_tag_set()). This
> causes the device to remain silent and likely hangs the guest at
> some point.
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/pseries: Don't enforce MSI affinity with kdump
https://git.kernel.org/powerpc/c/f9619d5e5174867536b7e558683bc4408eab833f
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/4xx: Fix build errors from mfdcr()
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman; +Cc: feng.tang
In-Reply-To: <20210218123058.748882-1-mpe@ellerman.id.au>
On Thu, 18 Feb 2021 23:30:58 +1100, Michael Ellerman wrote:
> lkp reported a build error in fsp2.o:
>
> CC arch/powerpc/platforms/44x/fsp2.o
> {standard input}:577: Error: unsupported relocation against base
>
> Which comes from:
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/4xx: Fix build errors from mfdcr()
https://git.kernel.org/powerpc/c/eead089311f4d935ab5d1d8fbb0c42ad44699ada
cheers
^ permalink raw reply
* Re: [PATCH v2 00/43] powerpc/32: Switch to interrupt entry/exit in C
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: Michael Ellerman, Paul Mackerras, Benjamin Herrenschmidt, npiggin,
Christophe Leroy
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <cover.1615291471.git.christophe.leroy@csgroup.eu>
On Tue, 9 Mar 2021 12:09:25 +0000 (UTC), Christophe Leroy wrote:
> This series aims at porting interrupt entry/exit in C on PPC32, using
> the work already merged for PPC64.
>
> First two patches are a fix and an optimisation of unrecoverable_exception() function.
>
> Six following patches do minimal changes in 40x in order to be able to enable MMU
> earlier in exception entry.
>
> [...]
Patch 1 applied to powerpc/fixes.
[01/43] powerpc/traps: unrecoverable_exception() is not an interrupt handler
https://git.kernel.org/powerpc/c/0b736881c8f1a6cd912f7a9162b9e097b28c1c30
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/sstep: Fix VSX instruction emulation
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: linuxppc-dev, Jordan Niethe; +Cc: ravi.bangoria, bala24
In-Reply-To: <20210225031946.1458206-1-jniethe5@gmail.com>
On Thu, 25 Feb 2021 14:19:46 +1100, Jordan Niethe wrote:
> Commit af99da74333b ("powerpc/sstep: Support VSX vector paired storage
> access instructions") added loading and storing 32 word long data into
> adjacent VSRs. However the calculation used to determine if two VSRs
> needed to be loaded/stored inadvertently prevented the load/storing
> taking place for instructions with a data length less than 16 words.
>
> This causes the emulation to not function correctly, which can be seen
> by the alignment_handler selftest:
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/sstep: Fix VSX instruction emulation
https://git.kernel.org/powerpc/c/5c88a17e15795226b56d83f579cbb9b7a4864f79
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/syscall: Force inlining of __prep_irq_for_enabled_exit()
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: Michael Ellerman, Paul Mackerras, Benjamin Herrenschmidt, npiggin,
Christophe Leroy
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <53f3a1f719441761000c41154602bf097d4350b5.1614148356.git.christophe.leroy@csgroup.eu>
On Wed, 24 Feb 2021 06:34:22 +0000 (UTC), Christophe Leroy wrote:
> As reported by kernel test robot, a randconfig with high amount of
> debuging options can lead to build failure for undefined reference
> to replay_soft_interrupts() on ppc32.
>
> This is due to gcc not seeing that __prep_irq_for_enabled_exit()
> always returns true on ppc32 because it doesn't inline it for
> some reason.
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/syscall: Force inlining of __prep_irq_for_enabled_exit()
https://git.kernel.org/powerpc/c/91b6c5dbe9e072dbdb181eed89c5c824e92ac0f5
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/603: Fix protection of user pages mapped with PROT_NONE
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: Michael Ellerman, Paul Mackerras, Benjamin Herrenschmidt,
Christoph Plattner, Christophe Leroy
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <4a0c6e3bb8f0c162457bf54d9bc6fd8d7b55129f.1612160907.git.christophe.leroy@csgroup.eu>
On Mon, 1 Feb 2021 06:29:50 +0000 (UTC), Christophe Leroy wrote:
> On book3s/32, page protection is defined by the PP bits in the PTE
> which provide the following protection depending on the access
> keys defined in the matching segment register:
> - PP 00 means RW with key 0 and N/A with key 1.
> - PP 01 means RW with key 0 and RO with key 1.
> - PP 10 means RW with both key 0 and key 1.
> - PP 11 means RO with both key 0 and key 1.
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/603: Fix protection of user pages mapped with PROT_NONE
https://git.kernel.org/powerpc/c/c119565a15a628efdfa51352f9f6c5186e506a1c
cheers
^ permalink raw reply
* Re: [PATCH V2] powerpc/perf: Fix handling of privilege level checks in perf interrupt context
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: Athira Rajeev, mpe
Cc: maddy, peterz, omosnace, acme, jolsa, linuxppc-dev, kan.liang
In-Reply-To: <1614247839-1428-1-git-send-email-atrajeev@linux.vnet.ibm.com>
On Thu, 25 Feb 2021 05:10:39 -0500, Athira Rajeev wrote:
> Running "perf mem record" in powerpc platforms with selinux enabled
> resulted in soft lockup's. Below call-trace was seen in the logs:
>
> CPU: 58 PID: 3751 Comm: sssd_nss Not tainted 5.11.0-rc7+ #2
> NIP: c000000000dff3d4 LR: c000000000dff3d0 CTR: 0000000000000000
> REGS: c000007fffab7d60 TRAP: 0100 Not tainted (5.11.0-rc7+)
> <<>>
> NIP [c000000000dff3d4] _raw_spin_lock_irqsave+0x94/0x120
> LR [c000000000dff3d0] _raw_spin_lock_irqsave+0x90/0x120
> Call Trace:
> [c00000000fd471a0] [c00000000fd47260] 0xc00000000fd47260 (unreliable)
> [c00000000fd471e0] [c000000000b5fbbc] skb_queue_tail+0x3c/0x90
> [c00000000fd47220] [c000000000296edc] audit_log_end+0x6c/0x180
> [c00000000fd47260] [c0000000006a3f20] common_lsm_audit+0xb0/0xe0
> [c00000000fd472a0] [c00000000066c664] slow_avc_audit+0xa4/0x110
> [c00000000fd47320] [c00000000066cff4] avc_has_perm+0x1c4/0x260
> [c00000000fd47430] [c00000000066e064] selinux_perf_event_open+0x74/0xd0
> [c00000000fd47450] [c000000000669888] security_perf_event_open+0x68/0xc0
> [c00000000fd47490] [c00000000013d788] record_and_restart+0x6e8/0x7f0
> [c00000000fd476c0] [c00000000013dabc] perf_event_interrupt+0x22c/0x560
> [c00000000fd477d0] [c00000000002d0fc] performance_monitor_exception0x4c/0x60
> [c00000000fd477f0] [c00000000000b378] performance_monitor_common_virt+0x1c8/0x1d0
> interrupt: f00 at _raw_spin_lock_irqsave+0x38/0x120
> NIP: c000000000dff378 LR: c000000000b5fbbc CTR: c0000000007d47f0
> REGS: c00000000fd47860 TRAP: 0f00 Not tainted (5.11.0-rc7+)
> <<>>
> NIP [c000000000dff378] _raw_spin_lock_irqsave+0x38/0x120
> LR [c000000000b5fbbc] skb_queue_tail+0x3c/0x90
> interrupt: f00
> [c00000000fd47b00] [0000000000000038] 0x38 (unreliable)
> [c00000000fd47b40] [c00000000aae6200] 0xc00000000aae6200
> [c00000000fd47b80] [c000000000296edc] audit_log_end+0x6c/0x180
> [c00000000fd47bc0] [c00000000029f494] audit_log_exit+0x344/0xf80
> [c00000000fd47d10] [c0000000002a2b00] __audit_syscall_exit+0x2c0/0x320
> [c00000000fd47d60] [c000000000032878] do_syscall_trace_leave+0x148/0x200
> [c00000000fd47da0] [c00000000003d5b4] syscall_exit_prepare+0x324/0x390
> [c00000000fd47e10] [c00000000000d76c] system_call_common+0xfc/0x27c
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/perf: Fix handling of privilege level checks in perf interrupt context
https://git.kernel.org/powerpc/c/5ae5fbd2107959b68ac69a8b75412208663aea88
cheers
^ permalink raw reply
* Re: [PATCH] powerpc: Force inlining of mmu_has_feature to fix build failure
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: Michael Ellerman, Paul Mackerras, Christophe Leroy,
Benjamin Herrenschmidt
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <cf61345912c078c96f171afd0fcc48ef27cbdc3f.1614443418.git.christophe.leroy@csgroup.eu>
On Sat, 27 Feb 2021 16:30:48 +0000 (UTC), Christophe Leroy wrote:
> The test robot has managed to generate a random config leading
> to following build failure:
>
> LD .tmp_vmlinux.kallsyms1
> powerpc64-linux-ld: arch/powerpc/mm/pgtable.o: in function `ptep_set_access_flags':
> pgtable.c:(.text.ptep_set_access_flags+0xf0): undefined reference to `hash__flush_tlb_page'
> powerpc64-linux-ld: arch/powerpc/mm/book3s32/mmu.o: in function `MMU_init_hw_patch':
> mmu.c:(.init.text+0x452): undefined reference to `patch__hash_page_A0'
> powerpc64-linux-ld: mmu.c:(.init.text+0x45e): undefined reference to `patch__hash_page_A0'
> powerpc64-linux-ld: mmu.c:(.init.text+0x46a): undefined reference to `patch__hash_page_A1'
> powerpc64-linux-ld: mmu.c:(.init.text+0x476): undefined reference to `patch__hash_page_A1'
> powerpc64-linux-ld: mmu.c:(.init.text+0x482): undefined reference to `patch__hash_page_A2'
> powerpc64-linux-ld: mmu.c:(.init.text+0x48e): undefined reference to `patch__hash_page_A2'
> powerpc64-linux-ld: mmu.c:(.init.text+0x49e): undefined reference to `patch__hash_page_B'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4aa): undefined reference to `patch__hash_page_B'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4b6): undefined reference to `patch__hash_page_C'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4c2): undefined reference to `patch__hash_page_C'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4ce): undefined reference to `patch__flush_hash_A0'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4da): undefined reference to `patch__flush_hash_A0'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4e6): undefined reference to `patch__flush_hash_A1'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4f2): undefined reference to `patch__flush_hash_A1'
> powerpc64-linux-ld: mmu.c:(.init.text+0x4fe): undefined reference to `patch__flush_hash_A2'
> powerpc64-linux-ld: mmu.c:(.init.text+0x50a): undefined reference to `patch__flush_hash_A2'
> powerpc64-linux-ld: mmu.c:(.init.text+0x522): undefined reference to `patch__flush_hash_B'
> powerpc64-linux-ld: mmu.c:(.init.text+0x532): undefined reference to `patch__flush_hash_B'
> powerpc64-linux-ld: arch/powerpc/mm/book3s32/mmu.o: in function `update_mmu_cache':
> mmu.c:(.text.update_mmu_cache+0xa0): undefined reference to `add_hash_page'
> powerpc64-linux-ld: mm/memory.o: in function `zap_pte_range':
> memory.c:(.text.zap_pte_range+0x160): undefined reference to `flush_hash_pages'
> powerpc64-linux-ld: mm/memory.o: in function `handle_pte_fault':
> memory.c:(.text.handle_pte_fault+0x180): undefined reference to `hash__flush_tlb_page'
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc: Force inlining of mmu_has_feature to fix build failure
https://git.kernel.org/powerpc/c/acdad8fb4a1574323db88f98a38b630691574e16
cheers
^ permalink raw reply
* Re: [PATCH] powerpc: Fix missing declaration of [en/dis]able_kernel_vsx()
From: Michael Ellerman @ 2021-03-14 10:01 UTC (permalink / raw)
To: Michael Ellerman, geert, Paul Mackerras, Benjamin Herrenschmidt,
Christophe Leroy
Cc: alexdeucher, linuxppc-dev, christian.koenig, amd-gfx,
linux-kernel
In-Reply-To: <8d7d285a027e9d21f5ff7f850fa71a2655b0c4af.1615279170.git.christophe.leroy@csgroup.eu>
On Tue, 9 Mar 2021 08:39:39 +0000 (UTC), Christophe Leroy wrote:
> Add stub instances of enable_kernel_vsx() and disable_kernel_vsx()
> when CONFIG_VSX is not set, to avoid following build failure.
>
> CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o
> In file included from ./drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
> from ./drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:37,
> from drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:27:
> drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c: In function 'dcn_bw_apply_registry_override':
> ./drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:64:3: error: implicit declaration of function 'enable_kernel_vsx'; did you mean 'enable_kernel_fp'? [-Werror=implicit-function-declaration]
> 64 | enable_kernel_vsx(); \
> | ^~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:640:2: note: in expansion of macro 'DC_FP_START'
> 640 | DC_FP_START();
> | ^~~~~~~~~~~
> ./drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:75:3: error: implicit declaration of function 'disable_kernel_vsx'; did you mean 'disable_kernel_fp'? [-Werror=implicit-function-declaration]
> 75 | disable_kernel_vsx(); \
> | ^~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:676:2: note: in expansion of macro 'DC_FP_END'
> 676 | DC_FP_END();
> | ^~~~~~~~~
> cc1: some warnings being treated as errors
> make[5]: *** [drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o] Error 1
Applied to powerpc/fixes.
[1/1] powerpc: Fix missing declaration of [en/dis]able_kernel_vsx()
https://git.kernel.org/powerpc/c/bd73758803c2eedc037c2268b65a19542a832594
cheers
^ permalink raw reply
* [PATCH] powerpc/fsl-pci: Fix section mismatch warning
From: Michael Ellerman @ 2021-03-14 9:33 UTC (permalink / raw)
To: linuxppc-dev
Section mismatch in reference from the function .fsl_add_bridge() to
the function .init.text:.setup_pci_cmd()
fsl_add_bridge() is not __init, and can't be, and is the only caller
of setup_pci_cmd(). Fix it by making setup_pci_cmd() non-init.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/sysdev/fsl_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 040b9d01c079..69af73765783 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -455,7 +455,7 @@ static void setup_pci_atmu(struct pci_controller *hose)
}
}
-static void __init setup_pci_cmd(struct pci_controller *hose)
+static void setup_pci_cmd(struct pci_controller *hose)
{
u16 cmd;
int cap_x;
--
2.25.1
^ permalink raw reply related
* [PATCH] powerpc: Fix section mismatch warning in smp_setup_pacas()
From: Michael Ellerman @ 2021-03-14 9:33 UTC (permalink / raw)
To: linuxppc-dev
Section mismatch in reference from the function .smp_setup_pacas() to
the function .init.text:.allocate_paca()
The only caller of smp_setup_pacas() is setup_arch() which is __init,
so mark smp_setup_pacas() __init.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/kernel/setup-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index bee984b1887b..55caaa211b9f 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -829,7 +829,7 @@ static __init void print_system_info(void)
}
#ifdef CONFIG_SMP
-static void smp_setup_pacas(void)
+static void __init smp_setup_pacas(void)
{
int cpu;
--
2.25.1
^ permalink raw reply related
* [PATCH] powerpc/64s: Fold update_current_thread_[i]amr() into their only callers
From: Michael Ellerman @ 2021-03-14 9:33 UTC (permalink / raw)
To: linuxppc-dev
lkp reported warnings in some configuration due to
update_current_thread_amr() being unused:
arch/powerpc/mm/book3s64/pkeys.c:284:20: error: unused function 'update_current_thread_amr'
static inline void update_current_thread_amr(u64 value)
Which is because it's only use is inside an ifdef. We could move it
inside the ifdef, but it's a single line function and only has one
caller, so just fold it in.
Similarly update_current_thread_iamr() is small and only called once,
so fold it in also.
Fixes: 48a8ab4eeb82 ("powerpc/book3s64/pkeys: Don't update SPRN_AMR when in kernel mode.")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/mm/book3s64/pkeys.c | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c
index 15dcc5ad91c5..a2d9ad138709 100644
--- a/arch/powerpc/mm/book3s64/pkeys.c
+++ b/arch/powerpc/mm/book3s64/pkeys.c
@@ -301,19 +301,6 @@ void setup_kuap(bool disabled)
}
#endif
-static inline void update_current_thread_amr(u64 value)
-{
- current->thread.regs->amr = value;
-}
-
-static inline void update_current_thread_iamr(u64 value)
-{
- if (!likely(pkey_execute_disable_supported))
- return;
-
- current->thread.regs->iamr = value;
-}
-
#ifdef CONFIG_PPC_MEM_KEYS
void pkey_mm_init(struct mm_struct *mm)
{
@@ -328,7 +315,7 @@ static inline void init_amr(int pkey, u8 init_bits)
u64 new_amr_bits = (((u64)init_bits & 0x3UL) << pkeyshift(pkey));
u64 old_amr = current_thread_amr() & ~((u64)(0x3ul) << pkeyshift(pkey));
- update_current_thread_amr(old_amr | new_amr_bits);
+ current->thread.regs->amr = old_amr | new_amr_bits;
}
static inline void init_iamr(int pkey, u8 init_bits)
@@ -336,7 +323,10 @@ static inline void init_iamr(int pkey, u8 init_bits)
u64 new_iamr_bits = (((u64)init_bits & 0x1UL) << pkeyshift(pkey));
u64 old_iamr = current_thread_iamr() & ~((u64)(0x1ul) << pkeyshift(pkey));
- update_current_thread_iamr(old_iamr | new_iamr_bits);
+ if (!likely(pkey_execute_disable_supported))
+ return;
+
+ current->thread.regs->iamr = old_iamr | new_iamr_bits;
}
/*
--
2.25.1
^ permalink raw reply related
* [PATCH] powerpc/eeh: Fix build failure with CONFIG_PROC_FS=n
From: Michael Ellerman @ 2021-03-14 9:33 UTC (permalink / raw)
To: linuxppc-dev
The build fails with CONFIG_PROC_FS=n:
arch/powerpc/kernel/eeh.c:1571:12: error: ‘proc_eeh_show’ defined but not used
1571 | static int proc_eeh_show(struct seq_file *m, void *v)
Wrap proc_eeh_show() in an ifdef to avoid it.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/kernel/eeh.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index cd60bc1c8701..01dbb44a0fe3 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -1568,6 +1568,7 @@ int eeh_pe_inject_err(struct eeh_pe *pe, int type, int func,
}
EXPORT_SYMBOL_GPL(eeh_pe_inject_err);
+#ifdef CONFIG_PROC_FS
static int proc_eeh_show(struct seq_file *m, void *v)
{
if (!eeh_enabled()) {
@@ -1594,6 +1595,7 @@ static int proc_eeh_show(struct seq_file *m, void *v)
return 0;
}
+#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_DEBUG_FS
--
2.25.1
^ permalink raw reply related
* Re: [PATCH] sound: soc: fsl: Remove unnecessary THIS_MODULE
From: Fabio Estevam @ 2021-03-13 20:25 UTC (permalink / raw)
To: Wang Qing
Cc: Linux-ALSA, linuxppc-dev, linux-kernel, Timur Tabi, Xiubo Li,
Shawn Guo, Sascha Hauer, Takashi Iwai, Liam Girdwood,
Jaroslav Kysela, Nicolin Chen, Mark Brown, NXP Linux Team,
Pengutronix Kernel Team, Shengjiu Wang,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
In-Reply-To: <1615623820-16592-1-git-send-email-wangqing@vivo.com>
Hi Wang,
On Sat, Mar 13, 2021 at 5:25 AM Wang Qing <wangqing@vivo.com> wrote:
>
> As THIS_MODULE has been set in module_platform_driver(), so remove it.
>
> Signed-off-by: Wang Qing <wangqing@vivo.com>
Thanks for the patch, but someone else has already sent the same.
^ permalink raw reply
* Re: [PATCH v2] ASoC: imx-hdmi: fix platform_no_drv_owner.cocci warnings
From: Fabio Estevam @ 2021-03-13 20:25 UTC (permalink / raw)
To: Yang Li
Cc: Linux-ALSA, linuxppc-dev, linux-kernel, Timur Tabi, Xiubo Li,
Shawn Guo, Sascha Hauer, Takashi Iwai, Liam Girdwood,
Jaroslav Kysela, Nicolin Chen, Mark Brown, NXP Linux Team,
Sascha Hauer, Shengjiu Wang,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
In-Reply-To: <1614848881-29637-1-git-send-email-yang.lee@linux.alibaba.com>
Hi Yang,
On Thu, Mar 4, 2021 at 6:08 AM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> ./sound/soc/fsl/imx-hdmi.c:226:3-8: No need to set .owner here. The core
> will do it.
>
> Remove .owner field if calls are used which set it automatically
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply
* Re: [PATCH v2 4/7] CMDLINE: powerpc: convert to generic builtin command line
From: Christophe Leroy @ 2021-03-13 9:29 UTC (permalink / raw)
To: Daniel Walker
Cc: Rob Herring, Ruslan Ruslichenko, Ruslan Bilovol,
Daniel Gimpelevich, linuxppc-dev, x86, linux-mips, linux-kernel,
Paul Mackerras, xe-linux-external, Andrew Morton, Will Deacon
In-Reply-To: <20210309214051.GS109100@zorba>
Le 09/03/2021 à 22:40, Daniel Walker a écrit :
> On Tue, Mar 09, 2021 at 08:56:47AM +0100, Christophe Leroy wrote:
>>
>> So we are referencing a function that doesn't exist (namely prom_strlcat).
>> But it works because cmdline_add_builtin_custom() looks like a function but
>> is in fact an obscure macro that doesn't use prom_strlcat() unless
>> GENERIC_CMDLINE_NEED_STRLCAT is defined.
>>
>> IMHO that's awful for readability and code maintenance.
>
> powerpc is a special case, there's no other users like this. The reason is
> because of all the difficulty in this prom_init.c code. A lot of the generic
> code has similar kind of changes to work across architectures.
>
I'd suggest the following (sorry if Thunderbird damages whitespaces, you'll get the idea anyway)
diff --git a/include/linux/cmdline.h b/include/linux/cmdline.h
new file mode 100644
index 000000000000..30b9eefc802f
--- /dev/null
+++ b/include/linux/cmdline.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_CMDLINE_H
+#define _LINUX_CMDLINE_H
+
+#ifdef CONFIG_GENERIC_CMDLINE
+
+#ifndef cmdline_strlcpy
+#define cmdline_strlcpy strlcpy
+#endif
+#ifndef cmdline_strlcat
+#define cmdline_strlcat strlcat
+#endif
+
+static __always_inline void
+cmdline_add_builtin_custom(char *dest, const char *src, char *tmp, unsigned long length)
+{
+ if (WARN_ON(sizeof(CONFIG_CMDLINE_PREPEND) > 1 &&
+ !IS_ENABLED(CONFIG_CMDLINE_OVERRIDE) &&
+ !tmp && src == dest))
+ return;
+
+ if (sizeof(CONFIG_CMDLINE_PREPEND) > 1 &&
+ !IS_ENABLED(CONFIG_CMDLINE_OVERRIDE) && src == dest)
+ cmdline_strlcpy(tmp, src, length);
+ else
+ tmp = (char *)src;
+
+ cmdline_strlcpy(dest, CONFIG_CMDLINE_PREPEND " ", length);
+ if (!IS_ENABLED(CONFIG_CMDLINE_OVERRIDE) && tmp)
+ cmdline_strlcat(dest, tmp, length);
+ cmdline_strlcat(dest, " " CONFIG_CMDLINE_APPEND, length);
+}
+
+#define cmdline_add_builtin(dest, src, length) do { \
+ static __init char cmdline_tmp[length]; \
+ \
+ cmdline_add_builtin_custom(dest, src, cmdline_tmp, length); \
+} while (0)
+
+#endif /* CONFIG_GENERIC_CMDLINE */
+
+#endif /* _LINUX_CMDLINE_H */
diff --git a/init/Kconfig b/init/Kconfig
index 22946fe5ded9..aeb134f0703b 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -2035,6 +2035,27 @@ config PROFILING
config TRACEPOINTS
bool
+config GENERIC_CMDLINE
+ bool
+
+if GENERIC_CMDLINE
+
+config CMDLINE_BOOL
+ bool "Built-in kernel command line"
+
+config CMDLINE_APPEND
+ string "Built-in kernel command string append" if CMDLINE_BOOL
+ default ""
+
+config CMDLINE_PREPEND
+ string "Built-in kernel command string prepend" if CMDLINE_BOOL
+ default ""
+
+config CMDLINE_OVERRIDE
+ bool "Built-in command line overrides boot loader arguments" if CMDLINE_BOOL
+
+endif
+
endmenu # General setup
source "arch/Kconfig"
--
Then on powerpc you do:
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 2c2f33155317..1649787c3953 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -152,7 +152,7 @@ static struct prom_t __prombss prom;
static unsigned long __prombss prom_entry;
static char __prombss of_stdout_device[256];
-static char __prombss prom_scratch[256];
+static char __prombss prom_scratch[COMMAND_LINE_SIZE];
static unsigned long __prombss dt_header_start;
static unsigned long __prombss dt_struct_start, dt_struct_end;
@@ -770,6 +770,12 @@ static unsigned long prom_memparse(const char *ptr, const char **retptr)
* Early parsing of the command line passed to the kernel, used for
* "mem=x" and the options that affect the iommu
*/
+
+#define cmdline_strlcpy prom_strlcpy
+#define cmdline_strlcat prom_strlcat
+
+#include <linux/cmdline.h>
+
static void __init early_cmdline_parse(void)
{
const char *opt;
@@ -780,12 +786,11 @@ static void __init early_cmdline_parse(void)
prom_cmd_line[0] = 0;
p = prom_cmd_line;
- if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && (long)prom.chosen > 0)
+ if ((long)prom.chosen > 0)
l = prom_getprop(prom.chosen, "bootargs", p, COMMAND_LINE_SIZE-1);
- if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) || l <= 0 || p[0] == '\0')
- prom_strlcat(prom_cmd_line, " " CONFIG_CMDLINE,
- sizeof(prom_cmd_line));
+ cmdline_add_builtin_custom(prom_cmd_line, (l > 0 ? p : NULL),
+ prom_scratch, sizeof(prom_cmd_line));
prom_printf("command line: %s\n", prom_cmd_line);
--
2.25.0
Christophe
^ permalink raw reply related
* Re: [PATCH] rpadlpar: fix potential drc_name corruption in store functions
From: Michal Suchánek @ 2021-03-13 9:17 UTC (permalink / raw)
To: Tyrel Datwyler; +Cc: bhelgaas, linux-pci, mmc, linuxppc-dev, linux-kernel
In-Reply-To: <20210310223021.423155-1-tyreld@linux.ibm.com>
On Wed, Mar 10, 2021 at 04:30:21PM -0600, Tyrel Datwyler wrote:
> Both add_slot_store() and remove_slot_store() try to fix up the drc_name
> copied from the store buffer by placing a NULL terminator at nbyte + 1
> or in place of a '\n' if present. However, the static buffer that we
> copy the drc_name data into is not zeored and can contain anything past
> the n-th byte. This is problematic if a '\n' byte appears in that buffer
> after nbytes and the string copied into the store buffer was not NULL
> terminated to start with as the strchr() search for a '\n' byte will mark
> this incorrectly as the end of the drc_name string resulting in a drc_name
> string that contains garbage data after the n-th byte. The following
> debugging shows an example of the drmgr utility writing "PHB 4543" to
> the add_slot sysfs attribute, but add_slot_store logging a corrupted
> string value.
>
> [135823.702864] drmgr: drmgr: -c phb -a -s PHB 4543 -d 1
> [135823.702879] add_slot_store: drc_name = PHB 4543°|<82>!, rc = -19
>
> Fix this by NULL terminating the string when we copy it into our static
> buffer by coping nbytes + 1 of data from the store buffer. The code has
Why is it OK to copy nbytes + 1 and why is it expected that the buffer
contains a nul after the content?
Isn't it much saner to just nul terminate the string after copying?
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c
index cdbfa5df3a51..cfbad67447da 100644
--- a/drivers/pci/hotplug/rpadlpar_sysfs.c
+++ b/drivers/pci/hotplug/rpadlpar_sysfs.c
@@ -35,11 +35,11 @@ static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr,
return 0;
memcpy(drc_name, buf, nbytes);
+ &drc_name[nbytes] = '\0';
end = strchr(drc_name, '\n');
- if (!end)
- end = &drc_name[nbytes];
- *end = '\0';
+ if (end)
+ *end = '\0';
rc = dlpar_add_slot(drc_name);
if (rc)
@@ -66,11 +66,11 @@ static ssize_t remove_slot_store(struct kobject *kobj,
return 0;
memcpy(drc_name, buf, nbytes);
+ &drc_name[nbytes] = '\0';
end = strchr(drc_name, '\n');
- if (!end)
- end = &drc_name[nbytes];
- *end = '\0';
+ if (end)
+ *end = '\0';
rc = dlpar_remove_slot(drc_name);
if (rc)
Thanks
Michal
> already made sure that nbytes is not >= MAX_DRC_NAME_LEN and the store
> buffer is guaranteed to be zeroed beyond the nth-byte of data copied
> from the user. Further, since the string is now NULL terminated the code
> only needs to change '\n' to '\0' when present.
>
> Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
> ---
> drivers/pci/hotplug/rpadlpar_sysfs.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c
> index cdbfa5df3a51..375087921284 100644
> --- a/drivers/pci/hotplug/rpadlpar_sysfs.c
> +++ b/drivers/pci/hotplug/rpadlpar_sysfs.c
> @@ -34,12 +34,11 @@ static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr,
> if (nbytes >= MAX_DRC_NAME_LEN)
> return 0;
>
> - memcpy(drc_name, buf, nbytes);
> + memcpy(drc_name, buf, nbytes + 1);
>
> end = strchr(drc_name, '\n');
> - if (!end)
> - end = &drc_name[nbytes];
> - *end = '\0';
> + if (end)
> + *end = '\0';
>
> rc = dlpar_add_slot(drc_name);
> if (rc)
> @@ -65,12 +64,11 @@ static ssize_t remove_slot_store(struct kobject *kobj,
> if (nbytes >= MAX_DRC_NAME_LEN)
> return 0;
>
> - memcpy(drc_name, buf, nbytes);
> + memcpy(drc_name, buf, nbytes + 1);
>
> end = strchr(drc_name, '\n');
> - if (!end)
> - end = &drc_name[nbytes];
> - *end = '\0';
> + if (end)
> + *end = '\0';
>
> rc = dlpar_remove_slot(drc_name);
> if (rc)
> --
> 2.27.0
>
^ permalink raw reply related
* [PATCH] sound: soc: fsl: Remove unnecessary THIS_MODULE
From: Wang Qing @ 2021-03-13 8:23 UTC (permalink / raw)
To: Timur Tabi, Nicolin Chen, Xiubo Li, Fabio Estevam, Shengjiu Wang,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team,
alsa-devel, linuxppc-dev, linux-arm-kernel, linux-kernel
Cc: Wang Qing
As THIS_MODULE has been set in module_platform_driver(), so remove it.
Signed-off-by: Wang Qing <wangqing@vivo.com>
---
sound/soc/fsl/imx-hdmi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/fsl/imx-hdmi.c b/sound/soc/fsl/imx-hdmi.c
index dbbb761..cd0235a
--- a/sound/soc/fsl/imx-hdmi.c
+++ b/sound/soc/fsl/imx-hdmi.c
@@ -223,7 +223,6 @@ MODULE_DEVICE_TABLE(of, imx_hdmi_dt_ids);
static struct platform_driver imx_hdmi_driver = {
.driver = {
.name = "imx-hdmi",
- .owner = THIS_MODULE,
.pm = &snd_soc_pm_ops,
.of_match_table = imx_hdmi_dt_ids,
},
--
2.7.4
^ permalink raw reply related
* [PATCH] powerpc: define the variable 'uaccess_flush' as static
From: He Ying @ 2021-03-12 11:06 UTC (permalink / raw)
To: mpe, benh, paulus, npiggin, dja, akpm, rppt, aneesh.kumar, clg
Cc: johnny.chenyi, linuxppc-dev, linux-kernel
The variable 'uaccess_fulsh' is not referenced outside the file. Perhaps we
should define it as static to avoid the warning as follows:
arch/powerpc/kernel/setup_64.c:953:6: warning: symbol 'uaccess_flush'
was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: He Ying <heying24@huawei.com>
---
arch/powerpc/kernel/setup_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 560ed8b975e7..22aca271496b 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -950,7 +950,7 @@ static bool no_entry_flush;
static bool no_uaccess_flush;
bool rfi_flush;
bool entry_flush;
-bool uaccess_flush;
+static bool uaccess_flush;
DEFINE_STATIC_KEY_FALSE(uaccess_flush_key);
EXPORT_SYMBOL(uaccess_flush_key);
--
2.17.1
^ permalink raw reply related
* Re: [PATCH] ASoC: fsl_asrc_dma: request dma channel from specific controller
From: Mark Brown @ 2021-03-12 23:00 UTC (permalink / raw)
To: perex, Xiubo.Lee, Shengjiu Wang, timur, alsa-devel, nicoleotsuka,
festevam, tiwai
Cc: Mark Brown, linuxppc-dev, linux-kernel
In-Reply-To: <1614935977-21638-1-git-send-email-shengjiu.wang@nxp.com>
On Fri, 5 Mar 2021 17:19:37 +0800, Shengjiu Wang wrote:
> Request dma channel from specific dma controller instead of generic
> dma controller list, otherwise, may get the wrong dma controller
> if there are multi dma controllers such as i.MX8MP.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: fsl_asrc_dma: request dma channel from specific controller
commit: ee427ea4f12672e5d7874abaa634ddee0ff2bb97
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* Re: [PATCH] powerpc: mm: book3s64: Fix a typo in the file mmu_context.c
From: Randy Dunlap @ 2021-03-12 16:41 UTC (permalink / raw)
To: Bhaskar Chowdhury, mpe, benh, paulus, npiggin, aneesh.kumar,
linuxppc-dev, linux-kernel
In-Reply-To: <20210312112537.4585-1-unixbhaskar@gmail.com>
On 3/12/21 3:25 AM, Bhaskar Chowdhury wrote:
>
> s/detalis/details/
>
> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> arch/powerpc/mm/book3s64/mmu_context.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/book3s64/mmu_context.c b/arch/powerpc/mm/book3s64/mmu_context.c
> index 0c8557220ae2..c10fc8a72fb3 100644
> --- a/arch/powerpc/mm/book3s64/mmu_context.c
> +++ b/arch/powerpc/mm/book3s64/mmu_context.c
> @@ -119,7 +119,7 @@ static int hash__init_new_context(struct mm_struct *mm)
> /* This is fork. Copy hash_context details from current->mm */
> memcpy(mm->context.hash_context, current->mm->context.hash_context, sizeof(struct hash_mm_context));
> #ifdef CONFIG_PPC_SUBPAGE_PROT
> - /* inherit subpage prot detalis if we have one. */
> + /* inherit subpage prot details if we have one. */
> if (current->mm->context.hash_context->spt) {
> mm->context.hash_context->spt = kmalloc(sizeof(struct subpage_prot_table),
> GFP_KERNEL);
> --
--
~Randy
^ permalink raw reply
* Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE
From: Robin Murphy @ 2021-03-12 16:18 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, Will Deacon, Joerg Roedel, linuxppc-dev, dri-devel, Li Yang,
iommu, netdev, linux-arm-kernel, virtualization, freedreno,
David Woodhouse, linux-arm-msm
In-Reply-To: <20210311082609.GA6990@lst.de>
On 2021-03-11 08:26, Christoph Hellwig wrote:
> On Wed, Mar 10, 2021 at 06:39:57PM +0000, Robin Murphy wrote:
>>> Actually... Just mirroring the iommu_dma_strict value into
>>> struct iommu_domain should solve all of that with very little
>>> boilerplate code.
>>
>> Yes, my initial thought was to directly replace the attribute with a
>> common flag at iommu_domain level, but since in all cases the behaviour
>> is effectively global rather than actually per-domain, it seemed
>> reasonable to take it a step further. This passes compile-testing for
>> arm64 and x86, what do you think?
>
> It seems to miss a few bits, and also generally seems to be not actually
> apply to recent mainline or something like it due to different empty
> lines in a few places.
Yeah, that was sketched out on top of some other development patches,
and in being so focused on not breaking any of the x86 behaviours I did
indeed overlook fully converting the SMMU drivers... oops!
(my thought was to do the conversion for its own sake, then clean up the
redundant attribute separately, but I guess it's fine either way)
> Let me know what you think of the version here:
>
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/iommu-cleanup
>
> I'll happily switch the patch to you as the author if you're fine with
> that as well.
I still have reservations about removing the attribute API entirely and
pretending that io_pgtable_cfg is anything other than a SoC-specific
private interface, but the reworked patch on its own looks reasonable to
me, thanks! (I wasn't too convinced about the iommu_cmd_line wrappers
either...) Just iommu_get_dma_strict() needs an export since the SMMU
drivers can be modular - I consciously didn't add that myself since I
was mistakenly thinking only iommu-dma would call it.
Robin.
^ permalink raw reply
* [PATCH] powerpc/numa: Fix topology_physical_package_id() on pSeries
From: Cédric Le Goater @ 2021-03-12 14:31 UTC (permalink / raw)
To: linuxppc-dev
Cc: Nathan Lynch, Srikar Dronamraju, Daniel Henrique Barboza,
Greg Kurz, Vasant Hegde, Cédric Le Goater, David Gibson
Initial commit 15863ff3b8da ("powerpc: Make chip-id information
available to userspace") introduce a cpu_to_chip_id() routine for the
PowerNV platform using the "ibm,chip-id" property to query the chip id
of a CPU. But PAPR does not specify such a property and the node id
query is broken.
Use cpu_to_node() instead which guarantees to have a correct value on
all platforms, PowerNV an pSeries.
Cc: Nathan Lynch <nathanl@linux.ibm.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/include/asm/topology.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 3beeb030cd78..887c42a4e43d 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -123,7 +123,7 @@ static inline int cpu_to_coregroup_id(int cpu)
#ifdef CONFIG_PPC64
#include <asm/smp.h>
-#define topology_physical_package_id(cpu) (cpu_to_chip_id(cpu))
+#define topology_physical_package_id(cpu) (cpu_to_node(cpu))
#define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
#define topology_core_cpumask(cpu) (cpu_cpu_mask(cpu))
--
2.26.2
^ permalink raw reply related
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