In order to use vdso_test_getrandom with analysis tools like 'perf' it
can be useful to perform only one kind of test, for instead only vdso.
Add an optional argument that allows telling which of the three API
you want to benchmark.
Signed-off-by: Christophe Leroy
---
.../self
Le 19/04/2024 à 17:49, Mike Rapoport a écrit :
> Hi Masami,
>
> On Thu, Apr 18, 2024 at 06:16:15AM +0900, Masami Hiramatsu wrote:
>> Hi Mike,
>>
>> On Thu, 11 Apr 2024 19:00:50 +0300
>> Mike Rapoport wrote:
>>
>>> From: "Mike Rapoport (IBM)"
>>>
>>> kprobes depended on CONFIG_MODULES because i
Le 11/04/2024 à 18:05, Mike Rapoport a écrit :
> From: "Mike Rapoport (IBM)"
>
> vmalloc allocations with VM_ALLOW_HUGE_VMAP that do not explictly
> specify node ID will use huge pages only if size_per_node is larger than
> PMD_SIZE.
> Still the actual allocated memory is not distributed betwee
Le 26/03/2024 à 14:46, Jarkko Sakkinen a écrit :
> Tacing with kprobes while running a monolithic kernel is currently
> impossible due the kernel module allocator dependency.
>
> Address the issue by implementing textmem API for RISC-V.
>
> Link: https://www.sochub.fi # for power on testing new
Le 26/03/2024 à 14:46, Jarkko Sakkinen a écrit :
> Tracing with kprobes while running a monolithic kernel is currently
> impossible because CONFIG_KPROBES depends on CONFIG_MODULES.
>
> Introduce alloc_execmem() and free_execmem() for allocating executable
> memory. If an arch implements these f
Le 06/03/2024 à 21:05, Calvin Owens a écrit :
> [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com.
> Découvrez pourquoi ceci est important à
> https://aka.ms/LearnAboutSenderIdentification ]
>
> If something like this is merged down the road, it can go in at leisure
> once th
Le 06/03/2024 à 21:05, Calvin Owens a écrit :
> [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com.
> Découvrez pourquoi ceci est important à
> https://aka.ms/LearnAboutSenderIdentification ]
>
> No BPF code has to change, except in struct_ops (for module refs).
>
> This conf
Hi Calvin,
Le 06/03/2024 à 21:05, Calvin Owens a écrit :
> [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com.
> Découvrez pourquoi ceci est important à
> https://aka.ms/LearnAboutSenderIdentification ]
>
> Both BPF_JIT and KPROBES depend on CONFIG_MODULES, but only require
> m
Le 31/01/2024 à 16:17, Marek Szyprowski a écrit :
> [Vous ne recevez pas souvent de courriers de m.szyprow...@samsung.com.
> Découvrez pourquoi ceci est important à
> https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi Christophe,
>
> On 31.01.2024 12:58, Christophe
Hi,
Le 30/01/2024 à 18:48, Marek Szyprowski a écrit :
> [Vous ne recevez pas souvent de courriers de m.szyprow...@samsung.com.
> Découvrez pourquoi ceci est important à
> https://aka.ms/LearnAboutSenderIdentification ]
>
> Dear All,
>
> On 30.01.2024 12:03, Christophe Ler
Le 30/01/2024 à 21:27, Luis Chamberlain a écrit :
> On Tue, Jan 30, 2024 at 06:48:11PM +0100, Marek Szyprowski wrote:
>> Dear All,
>>
>> On 30.01.2024 12:03, Christophe Leroy wrote:
>>> Le 30/01/2024 à 10:16, Chen-Yu Tsai a écrit :
>>>> [Vous
n wrote:
>> On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote:
>>> Declaring rodata_enabled and mark_rodata_ro() at all time
>>> helps removing related #ifdefery in C files.
>>>
>>> Signed-off-by: Christophe Leroy
>>
>> Very nice
Le 18/04/2022 à 06:38, Shivaprasad G Bhat a écrit :
> papr_scm and ndtest share common PDSM payload structs like
> nd_papr_pdsm_health. Presently these structs are duplicated across
> papr_pdsm.h and ndtest.h header files. Since 'ndtest' is essentially
> arch independent and can run on platforms
Kees
>>
>> Christophe Leroy writes:
>>> Declaring rodata_enabled and mark_rodata_ro() at all time
>>> helps removing related #ifdefery in C files.
>>>
>>> Signed-off-by: Christophe Leroy
>>> ---
>>> include/linux/init.h |
Now that rodata_enabled is always declared, remove #ifdef
and define a single version of strict_kernel_rwx_enabled().
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/mmu.h | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/mmu.h b
Now that rodata_enabled is declared at all time, the #ifdef
CONFIG_STRICT_MODULE_RWX can be removed.
Signed-off-by: Christophe Leroy
---
kernel/module/strict_rwx.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c
Declaring rodata_enabled and mark_rodata_ro() at all time
helps removing related #ifdefery in C files.
Signed-off-by: Christophe Leroy
---
include/linux/init.h | 4
init/main.c | 21 +++--
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/include
.
Signed-off-by: Christophe Leroy
---
kernel/module/internal.h | 6 ++---
kernel/module/main.c | 18 ++
kernel/module/strict_rwx.c | 48 ++
3 files changed, 50 insertions(+), 22 deletions(-)
diff --git a/kernel/module/internal.h b/kernel
It's a bit puzzling to see a call to module_enable_nx() followed by a
call to module_enable_x(). This is because one applies on text while
the other applies on data.
Change name to make that more clear.
Signed-off-by: Christophe Leroy
---
kernel/module/internal.h | 6 +++---
kernel/m
ry_rox()")
Use set_memory_rox() in modules when STRICT_MODULES_RWX is set.
Signed-off-by: Christophe Leroy
---
kernel/module/internal.h | 2 +-
kernel/module/main.c | 2 +-
kernel/module/strict_rwx.c | 12 +++-
3 files changed, 9 insertions(+), 7 deletions(-)
diff -
Le 06/12/2023 à 08:36, Jiri Slaby (SUSE) a écrit :
> Switch character types to u8 and sizes to size_t. To conform to
> characters/sizes in the rest of the tty layer.
>
> Signed-off-by: Jiri Slaby (SUSE)
> Cc: Michael Ellerman
> Cc: Nicholas Piggin
> Cc: Christophe L
Hi Mike,
Le 18/09/2023 à 09:29, Mike Rapoport a écrit :
> From: "Mike Rapoport (IBM)"
>
> powerpc overrides kprobes::alloc_insn_page() to remove writable
> permissions when STRICT_MODULE_RWX is on.
>
> Add definition of EXECMEM_KRPOBES to execmem_params to allow using the
> generic kprobes::all
Le 22/09/2023 à 10:55, Song Liu a écrit :
> On Fri, Sep 22, 2023 at 12:17 AM Christophe Leroy
> wrote:
>>
>>
>>
>> Le 22/09/2023 à 00:52, Song Liu a écrit :
>>> On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote:
>>>>
>>> [..
Le 22/09/2023 à 00:52, Song Liu a écrit :
> On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote:
>>
> [...]
>> diff --git a/include/linux/execmem.h b/include/linux/execmem.h
>> index 519bdfdca595..09d45ac786e9 100644
>> --- a/include/linux/execmem.h
>> +++ b/include/linux/execmem.h
>> @@ -29,6
Le 09/04/2021 à 03:23, Daniel Walker a écrit :
On Thu, Apr 08, 2021 at 02:04:08PM -0500, Rob Herring wrote:
On Tue, Apr 06, 2021 at 10:38:36AM -0700, Daniel Walker wrote:
On Fri, Apr 02, 2021 at 03:18:21PM +, Christophe Leroy wrote:
-config CMDLINE_BOOL
- bool "Built-in k
In order to simplify use on PPC32, change ppc_inst_as_u64()
into ppc_inst_as_ulong() that returns the 32 bits instruction
on PPC32.
Will be used when porting OPTPROBES to PPC32.
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/inst.h | 13 +++--
arch/powerpc/kernel
and use stmw/lmw to
save/restore registers.
Signed-off-by: Christophe Leroy
---
v2: Comments from Naveen.
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/optprobes.c | 24 --
arch/powerpc/kernel/optprobes_head.S | 65 +++-
3 files changed
Le 20/04/2021 à 15:32, Christophe Leroy a écrit :
From: Christophe Leroy
Oops, I forgot to reset the Author. Michael if you apply this patch please update the author and
remove the old Signed-off-by
Thanks
[0.00] ioremap() called early from
find_legacy_serial_ports+0x3cc
Le 20/04/2021 à 08:51, Naveen N. Rao a écrit :
Christophe Leroy wrote:
For that, create a 32 bits version of patch_imm64_load_insns()
and create a patch_imm_load_insns() which calls
patch_imm32_load_insns() on PPC32 and patch_imm64_load_insns()
on PPC64.
Adapt optprobes_head.S for PPC32
From: Christophe Leroy
[0.00] ioremap() called early from
find_legacy_serial_ports+0x3cc/0x474. Use early_ioremap() instead
find_legacy_serial_ports() is called early from setup_arch(), before
paging_init(). vmalloc is not available yet, ioremap shouldn't be
used that early.
a fixed size
AREA at the top of the I/O space for fixmap and ensure during
build that the size is big enough.
Fixes: 265c3491c4bc ("powerpc: Add support for GENERIC_EARLY_IOREMAP")
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 4 +++-
arch/powerpc/i
Hi Chris,
Le 10/08/2020 à 04:01, Chris Packham a écrit :
On 24/03/20 10:54 am, Chris Packham wrote:
Hi Christophe,
On Wed, 2020-02-05 at 12:03 +, Christophe Leroy wrote:
[0.00] ioremap() called early from
find_legacy_serial_ports+0x3cc/0x474. Use early_ioremap() instead
I was
unction-declaration]
660 | get_vr(rn, &u.v);
| ^~
In theory ALTIVEC is independent of PPC_FPU but in practice nobody
is going to build such a machine, so make ALTIVEC require PPC_FPU
by depending on PPC_FPU.
Signed-off-by: Randy Dunlap
Reported-by: kernel test robot
Cc: Michael
Le 19/04/2021 à 16:00, Steven Price a écrit :
On 19/04/2021 14:14, Christophe Leroy wrote:
Le 16/04/2021 à 12:51, Steven Price a écrit :
On 16/04/2021 11:38, Christophe Leroy wrote:
Le 16/04/2021 à 11:28, Steven Price a écrit :
On 15/04/2021 18:18, Christophe Leroy wrote:
To be
This patch makes use of trap types in irq.c
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/interrupt.h | 1 +
arch/powerpc/kernel/irq.c| 13 +
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/interrupt.h
b/arch
This patch makes use of trap types in head_8xx.S
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/interrupt.h | 29
arch/powerpc/kernel/head_8xx.S | 49 ++--
2 files changed, 47 insertions(+), 31 deletions(-)
diff --git a/arch/powerpc
This patch makes use of trap types in head_book3s_32.S
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/interrupt.h | 6
arch/powerpc/kernel/head_book3s_32.S | 43 ++--
2 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/arch/powerpc
Le 19/04/2021 à 15:32, Segher Boessenkool a écrit :
Hi!
On Sun, Apr 18, 2021 at 01:17:26PM -0700, Randy Dunlap wrote:
Add ldstfp.o to the Makefile for CONFIG_ALTIVEC and add
externs for get_vr() and put_vr() in lib/sstep.c to fix the
build errors.
obj-$(CONFIG_PPC_FPU) += ldstfp.o
+obj-
Le 16/04/2021 à 12:51, Steven Price a écrit :
On 16/04/2021 11:38, Christophe Leroy wrote:
Le 16/04/2021 à 11:28, Steven Price a écrit :
On 15/04/2021 18:18, Christophe Leroy wrote:
To be honest I don't fully understand why powerpc requires the page_size - it appears to be usin
This patch converts powerpc to the generic PTDUMP implementation.
Signed-off-by: Christophe Leroy
---
arch/powerpc/Kconfig | 2 +
arch/powerpc/Kconfig.debug| 30 --
arch/powerpc/mm/Makefile | 2 +-
arch/powerpc/mm/mmu_decl.h| 2 +-
arch/powerpc
ent
dirty accessed
...
0xf95ac000-0xf95a 0x042b16K rw present
dirty accessed
0xfef5c000-0xfeff 0x0143400016K rpresent
accessed
---[ kasan shadow mem end ]---
Signed-off-by: Christoph
Pagewalk ignores hugepd entries and walk down the tables
as if it was traditionnal entries, leading to crazy result.
Add walk_hugepd_range() and use it to walk hugepage tables.
Signed-off-by: Christophe Leroy
---
v2:
- Add a guard for NULL ops->pte_entry
- Take mm->page_table_lock when w
gic that checked for contiguous physical memory
- Removed the articial level calculation in ptdump_pte_entry(), level 4 is ok
for all.
- Removed page_size argument to note_page()
Christophe Leroy (4):
mm: pagewalk: Fix walk for hugepage tables
powerpc/mm: Leave a gap between early allocated IO ar
Vmalloc system leaves a gap between allocated areas. It helps catching
overflows.
Do the same for IO areas which are allocated with early_ioremap_range()
until slab_is_available().
Signed-off-by: Christophe Leroy
---
arch/powerpc/mm/ioremap_32.c | 4 ++--
arch/powerpc/mm/ioremap_64.c | 2 +-
2
Le 18/04/2021 à 19:15, Randy Dunlap a écrit :
On 4/18/21 3:43 AM, Christophe Leroy wrote:
Le 18/04/2021 à 02:02, Randy Dunlap a écrit :
HI--
I no longer see this build error.
Fixed by
https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16
However:
On 2/27
Le 17/04/2021 à 22:17, Randy Dunlap a écrit :
Hi,
kernel test robot reports:
drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function
'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration]
enable_kernel_fp();
^
when
# CONFIG_PPC_FPU is
Le 18/04/2021 à 02:02, Randy Dunlap a écrit :
HI--
I no longer see this build error.
Fixed by
https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16
However:
On 2/27/21 2:24 AM, kernel test robot wrote:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/
Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit :
On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet wrote:
2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann
On 4/15/21 11:32 AM, Jianlin Lv wrote:
For debugging JITs, dumping the JITed image to kernel log is discouraged,
"bpftool prog dump jited"
Le 16/04/2021 à 17:04, Christophe Leroy a écrit :
Le 16/04/2021 à 16:40, Christophe Leroy a écrit :
Le 16/04/2021 à 15:00, Steven Price a écrit :
On 16/04/2021 12:08, Christophe Leroy wrote:
Le 16/04/2021 à 12:51, Steven Price a écrit :
On 16/04/2021 11:38, Christophe Leroy wrote
Le 16/04/2021 à 16:40, Christophe Leroy a écrit :
Le 16/04/2021 à 15:00, Steven Price a écrit :
On 16/04/2021 12:08, Christophe Leroy wrote:
Le 16/04/2021 à 12:51, Steven Price a écrit :
On 16/04/2021 11:38, Christophe Leroy wrote:
Le 16/04/2021 à 11:28, Steven Price a écrit :
To be
Le 16/04/2021 à 15:00, Steven Price a écrit :
On 16/04/2021 12:08, Christophe Leroy wrote:
Le 16/04/2021 à 12:51, Steven Price a écrit :
On 16/04/2021 11:38, Christophe Leroy wrote:
Le 16/04/2021 à 11:28, Steven Price a écrit :
On 15/04/2021 18:18, Christophe Leroy wrote:
In order to
Le 16/04/2021 à 12:51, Steven Price a écrit :
On 16/04/2021 11:38, Christophe Leroy wrote:
Le 16/04/2021 à 11:28, Steven Price a écrit :
On 15/04/2021 18:18, Christophe Leroy wrote:
In order to support large pages on powerpc, notepage()
needs to know the page size of the page.
Add a
Le 16/04/2021 à 11:28, Steven Price a écrit :
On 15/04/2021 18:18, Christophe Leroy wrote:
In order to support large pages on powerpc, notepage()
needs to know the page size of the page.
Add a page_size argument to notepage().
Signed-off-by: Christophe Leroy
---
arch/arm64/mm/ptdump.c
Le 16/04/2021 à 08:57, Daniel Axtens a écrit :
Hi Jiapeng,
Fix the following clang warning:
You are not fixing a warning, you are removing a function in order to fix a
warning ...
drivers/soc/fsl/qe/qe_ic.c:234:29: warning: unused function
'qe_ic_from_irq' [-Wunused-function].
Would
immediately and delete it!
Le 16/04/2021 à 08:08, Christophe Leroy a écrit :
Hi,
This mail is unreadable.
Please send your patch as raw text mail, not as attached file.
Thanks
Christophe
Le 16/04/2021 à 05:12, 韩大鹏(Han Dapeng) a écrit
Hi,
This mail is unreadable.
Please send your patch as raw text mail, not as attached file.
Thanks
Christophe
Le 16/04/2021 à 05:12, 韩大鹏(Han Dapeng) a écrit :
*OPPO*
*
*
本电子邮件及其附件含有OPPO公司的保密信息
Le 16/04/2021 à 00:43, Daniel Axtens a écrit :
Hi Christophe,
Pagewalk ignores hugepd entries and walk down the tables
as if it was traditionnal entries, leading to crazy result.
Add walk_hugepd_range() and use it to walk hugepage tables.
Signed-off-by: Christophe Leroy
---
mm
Hi Daniel,
Le 16/04/2021 à 01:29, Daniel Axtens a écrit :
Hi Christophe,
Which hugepd, page table entries can be at any level
and can be of any size.
Add support for them.
Signed-off-by: Christophe Leroy
---
mm/ptdump.c | 17 +++--
1 file changed, 15 insertions(+), 2
Le 16/04/2021 à 01:12, Daniel Axtens a écrit :
Hi Christophe,
static void note_page(struct ptdump_state *pt_st, unsigned long addr, int
level,
- u64 val)
+ u64 val, unsigned long page_size)
Compilers can warn about unused parameters at -Wextra lev
In order to support large pages on powerpc, notepage()
needs to know the page size of the page.
Add a page_size argument to notepage().
Signed-off-by: Christophe Leroy
---
arch/arm64/mm/ptdump.c | 2 +-
arch/riscv/mm/ptdump.c | 2 +-
arch/s390/mm/dump_pagetables.c | 3
make[2]: *** [mm/ptdump.o] Error 1
READ_ONCE() cannot be used for reading PTEs. Use ptep_get()
instead. See commit 481e980a7c19 ("mm: Allow arches to provide ptep_get()")
and commit c0e1c8c22beb ("powerpc/8xx: Provide ptep_get() with 16k pages")
for details.
Fixes: 30d621f6
Which hugepd, page table entries can be at any level
and can be of any size.
Add support for them.
Signed-off-by: Christophe Leroy
---
mm/ptdump.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/mm/ptdump.c b/mm/ptdump.c
index 61cd16afb1c8..6efdb8c15a7d
This patch converts powerpc to the generic PTDUMP implementation.
Signed-off-by: Christophe Leroy
---
arch/powerpc/Kconfig | 2 +
arch/powerpc/Kconfig.debug| 30 --
arch/powerpc/mm/Makefile | 2 +-
arch/powerpc/mm/mmu_decl.h| 2 +-
arch/powerpc
Pagewalk ignores hugepd entries and walk down the tables
as if it was traditionnal entries, leading to crazy result.
Add walk_hugepd_range() and use it to walk hugepage tables.
Signed-off-by: Christophe Leroy
---
mm/pagewalk.c | 54 +--
1 file
This series converts powerpc to generic PTDUMP.
For that, we first need to add missing hugepd support
to pagewalk and ptdump.
Christophe Leroy (5):
mm: pagewalk: Fix walk for hugepage tables
mm: ptdump: Fix build failure
mm: ptdump: Provide page size to notepage()
mm: ptdump: Support
Hi Nick,
Le 17/03/2021 à 07:24, Nicholas Piggin a écrit :
This reduces TLB misses by nearly 30x on a `git diff` workload on a
2-node POWER9 (59,800 -> 2,100) and reduces CPU cycles by 0.54%, due
to vfs hashes being allocated with 2MB pages.
Cc: linuxppc-...@lists.ozlabs.org
Acked-by: Michael El
Le 15/04/2021 à 12:08, Christophe Leroy a écrit :
Le 15/04/2021 à 12:07, Christophe Leroy a écrit :
Le 15/04/2021 à 11:58, Stephen Rothwell a écrit :
Hi all,
On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell
wrote:
Today's linux-next merge of the akpm-current tree got a con
Le 15/04/2021 à 12:07, Christophe Leroy a écrit :
Le 15/04/2021 à 11:58, Stephen Rothwell a écrit :
Hi all,
On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell
wrote:
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/kernel/module.c
between c
Le 15/04/2021 à 11:58, Stephen Rothwell a écrit :
Hi all,
On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell
wrote:
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/kernel/module.c
between commit:
2ec13df16704 ("powerpc/modules: Load modules clos
make[2]: *** [mm/ptdump.o] Error 1
READ_ONCE() cannot be used for reading PTEs. Use ptep_get()
instead. See commit 481e980a7c19 ("mm: Allow arches to provide ptep_get()")
and commit c0e1c8c22beb ("powerpc/8xx: Provide ptep_get() with 16k pages")
for details.
Fixes: 30d621f6
atomic_fetch_add_unless() which now handles immediate operands.
Signed-off-by: Christophe Leroy
---
v2: New
---
arch/powerpc/include/asm/atomic.h | 95 ---
1 file changed, 95 deletions(-)
diff --git a/arch/powerpc/include/asm/atomic.h
b/arch/powerpc/include/asm/atomic.h
text by approx another 8 kbytes.
Signed-off-by: Christophe Leroy
Acked-by: Segher Boessenkool
---
v2: Use "addc/addic"
---
arch/powerpc/include/asm/atomic.h | 56 +++
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/arch/powerpc/include/asm/a
2048
c0009fe8: 7d 00 51 2d stwcx. r8,0,r10
c000d558: 7c e0 40 28 lwarx r7,0,r8
c000d55c: 54 e7 05 64 rlwinm r7,r7,0,21,18
c000d560: 7c e0 41 2d stwcx. r7,0,r8
On pmac32_defconfig, it reduces the text by approx 10 kbytes.
When probe_kernel_read_inst() was created, it was to mimic
probe_kernel_read() function.
Since then, probe_kernel_read() has been renamed
copy_from_kernel_nofault().
Rename probe_kernel_read_inst() into copy_inst_from_kernel_nofault().
Signed-off-by: Christophe Leroy
---
v3
ed to copy_from_kernel_nofault().
Move copy_from_kernel_nofault_inst() into mm/maccess.c
Signed-off-by: Christophe Leroy
---
v2: Remove inst.o from Makefile
---
arch/powerpc/lib/Makefile | 2 +-
arch/powerpc/lib/inst.c | 26 --
arch/powerpc/mm/maccess.c
PPC64 part opted out via a IS_ENABLED(CONFIG_PPC64).
The only need is to add a version of ppc_inst_prefix() for PPC32.
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/inst.h | 2 ++
arch/powerpc/lib/inst.c | 17 +
2 files changed, 3 insertions(+), 16 deletions
other hand, it is not used for the time being. So remove it
for now. If one day it is really needed, we can give it a new name
more in line with today's naming, and implement it using get_user_inst()
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/inst.h | 3 ---
arch/powerpc/lib/i
Le 14/04/2021 à 07:23, Aneesh Kumar K.V a écrit :
Christophe Leroy writes:
When probe_kernel_read_inst() was created, it was to mimic
probe_kernel_read() function.
Since then, probe_kernel_read() has been renamed
copy_from_kernel_nofault().
Rename probe_kernel_read_inst() into
Le 14/04/2021 à 14:24, Segher Boessenkool a écrit :
On Wed, Apr 14, 2021 at 12:01:21PM +1000, Nicholas Piggin wrote:
Would be nice if we could let the compiler deal with it all...
static inline unsigned long lr(unsigned long *mem)
{
unsigned long val;
/*
* This d
Le 14/04/2021 à 10:58, Jisheng Zhang a écrit :
Many architectures implement the trap_init() as NOP, since there is
no such default for trap_init(), this empty stub is duplicated among
these architectures. Provide a generic but weak NOP implementation
to drop the empty stubs of trap_init() in t
Le 14/04/2021 à 07:59, Anshuman Khandual a écrit :
On 4/14/21 10:52 AM, Christophe Leroy wrote:
Le 14/04/2021 à 04:54, Anshuman Khandual a écrit :
Currently most platforms define FIRST_USER_ADDRESS as 0UL duplicating the
same code all over. Instead define a new option
Le 14/04/2021 à 04:54, Anshuman Khandual a écrit :
Currently most platforms define FIRST_USER_ADDRESS as 0UL duplicating the
same code all over. Instead define a new option ARCH_HAS_FIRST_USER_ADDRESS
for those platforms which would override generic default FIRST_USER_ADDRESS
value 0UL. This m
When probe_kernel_read_inst() was created, it was to mimic
probe_kernel_read() function.
Since then, probe_kernel_read() has been renamed
copy_from_kernel_nofault().
Rename probe_kernel_read_inst() into copy_from_kernel_nofault_inst().
Signed-off-by: Christophe Leroy
---
arch/powerpc/include
ed to copy_from_kernel_nofault().
Move copy_from_kernel_nofault_inst() into mm/maccess.c
Signed-off-by: Christophe Leroy
---
v2: Remove inst.o from Makefile
---
arch/powerpc/lib/Makefile | 2 +-
arch/powerpc/lib/inst.c | 26 --
arch/powerpc/mm/maccess.c
PPC64 part opted out via a IS_ENABLED(CONFIG_PPC64).
The only need is to add a version of ppc_inst_prefix() for PPC32.
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/inst.h | 2 ++
arch/powerpc/lib/inst.c | 17 +
2 files changed, 3 insertions(+), 16 deletions
other hand, it is not used for the time being. So remove it
for now. If one day it is really needed, we can give it a new name
more in line with today's naming, and implement it using get_user_inst()
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/inst.h | 3 ---
arch/powerpc/lib/i
a test
and a branch in the likely path in addition to the trap.
We've got some WARN_ON() in .softirqentry.text section so it needs
to be added in the OTHER_TEXT_SECTIONS in modpost.c
Signed-off-by: Christophe Leroy
---
v2: Fix build failure when CONFIG_BUG is not selected.
---
arch/powerp
24: 0f 00 00 00 twnei r0,0
28: 69 6b 80 00 xorir11,r11,32768
2c: 55 6b 8f fe rlwinm r11,r11,17,31,31
30: 0f 0b 00 00 twnei r11,0
34: 7d 8c 42 e6 mftbr12
Signed-off-by: Christophe Leroy
---
arch/powerpc/incl
atomic_fetch_add_unless() which now handles immediate operands.
Signed-off-by: Christophe Leroy
---
v2: New
---
arch/powerpc/include/asm/atomic.h | 95 ---
1 file changed, 95 deletions(-)
diff --git a/arch/powerpc/include/asm/atomic.h
b/arch/powerpc/include/asm/atomic.h
8: 7c e0 40 28 lwarx r7,0,r8
c000d55c: 54 e7 05 64 rlwinm r7,r7,0,21,18
c000d560: 7c e0 41 2d stwcx. r7,0,r8
On pmac32_defconfig, it reduces the text by approx 10 kbytes.
Signed-off-by: Christophe Leroy
---
v2:
- Use "n" instead of "
text by approx another 8 kbytes.
Signed-off-by: Christophe Leroy
Acked-by: Segher Boessenkool
---
v2: Use "addc/addic"
---
arch/powerpc/include/asm/atomic.h | 56 +++
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/arch/powerpc/include/asm/a
Le 13/04/2021 à 00:08, Segher Boessenkool a écrit :
Hi!
On Thu, Apr 08, 2021 at 03:33:45PM +, Christophe Leroy wrote:
+#define ATOMIC_OP(op, asm_op, dot, sign) \
static __inline__ void atomic_##op(int a, atomic_t *v
Le 12/04/2021 à 23:54, Segher Boessenkool a écrit :
Hi!
On Thu, Apr 08, 2021 at 03:33:44PM +, Christophe Leroy wrote:
For clear bits, on 32 bits 'rlwinm' can be used instead or 'andc' for
when all bits to be cleared are consecutive.
Also on 64-bits, as long as bot
a test
and a branch in the likely path in addition to the trap.
We've got some WARN_ON() in .softirqentry.text section so it needs
to be added in the OTHER_TEXT_SECTIONS in modpost.c
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/book3s/64/kup.h | 2 +-
ar
24: 0f 00 00 00 twnei r0,0
28: 69 6b 80 00 xorir11,r11,32768
2c: 55 6b 8f fe rlwinm r11,r11,17,31,31
30: 0f 0b 00 00 twnei r11,0
34: 7d 8c 42 e6 mftbr12
Signed-off-by: Christophe Leroy
---
arch/powerpc/incl
calculate the amount of memory to allocate for the EBPF code, so
assume the 4 instructions sequence is required, so that enough memory
is allocated.
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/net/bpf_jit.h| 3 +++
arch/powerpc/
Re-implement BPF_ALU64 | BPF_{LSH/RSH/ARSH} | BPF_X with branchless
implementation copied from misc_32.S.
Signed-off-by: Christophe Leroy
---
arch/powerpc/net/bpf_jit_comp32.c | 39 +++
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/net
Replace <<== by <<=
Signed-off-by: Christophe Leroy
---
arch/powerpc/net/bpf_jit_comp32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/net/bpf_jit_comp32.c
b/arch/powerpc/net/bpf_jit_comp32.c
index 003843273b43..ca6fe1583460 100644
--- a/arch
ed to copy_from_kernel_nofault().
Move copy_from_kernel_nofault_inst() into mm/maccess.c
Signed-off-by: Christophe Leroy
---
arch/powerpc/lib/inst.c | 26 --
arch/powerpc/mm/maccess.c | 21 +
2 files changed, 21 insertions(+), 26 deletions(-)
delete
When probe_kernel_read_inst() was created, it was to mimic
probe_kernel_read() function.
Since then, probe_kernel_read() has been renamed
copy_from_kernel_nofault().
Rename probe_kernel_read_inst() into copy_from_kernel_nofault_inst().
Signed-off-by: Christophe Leroy
---
arch/powerpc/include
1 - 100 of 1636 matches
Mail list logo