Re: [PATCH v4 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-05-26 Thread Tianjia Zhang
On 2020/4/27 13:40, Huacai Chen wrote: Reviewed-by: Huacai Chen On Mon, Apr 27, 2020 at 12:35 PM Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and

Re: [PATCH v3 1/3] riscv: Move kernel mapping to vmalloc zone

2020-05-26 Thread Zong Li
On Wed, May 27, 2020 at 1:06 AM Alex Ghiti wrote: > > Hi Zong, > > Le 5/26/20 à 5:43 AM, Zong Li a écrit : > > On Sun, May 24, 2020 at 4:54 PM Alexandre Ghiti wrote: > >> This is a preparatory patch for relocatable kernel. > >> > >> The kernel used to be linked at PAGE_OFFSET address and used to

Re: [PATCH v4 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-05-26 Thread Tianjia Zhang
On 2020/5/27 12:20, Paul Mackerras wrote: On Mon, Apr 27, 2020 at 12:35:10PM +0800, Tianjia Zhang wrote: The 'kvm_run' field already exists in the 'vcpu' structure, which is the same structure as the 'kvm_run' in the 'vcpu_arch' and should be deleted. Signed-off-by: Tianjia Zhang Thanks,

Re: [PATCH] media: omap3isp: Shuffle cacheflush.h and include mm.h

2020-05-26 Thread Christoph Hellwig
On Tue, May 26, 2020 at 09:34:27PM -0700, Nathan Chancellor wrote: > After mm.h was removed from the asm-generic version of cacheflush.h, > s390 allyesconfig shows several warnings of the following nature: Hmm, I'm pretty sure I sent the same fix a few days ago in response to a build bot report.

[PATCH] media: omap3isp: Shuffle cacheflush.h and include mm.h

2020-05-26 Thread Nathan Chancellor
After mm.h was removed from the asm-generic version of cacheflush.h, s390 allyesconfig shows several warnings of the following nature: In file included from ./arch/s390/include/generated/asm/cacheflush.h:1, from drivers/media/platform/omap3isp/isp.c:42: ./include/asm-generic/cache

Re: [PATCH] KVM: PPC: Book3S HV: read ibm,secure-memory nodes

2020-05-26 Thread Paul Mackerras
On Thu, Apr 16, 2020 at 06:27:15PM +0200, Laurent Dufour wrote: > The newly introduced ibm,secure-memory nodes supersede the > ibm,uv-firmware's property secure-memory-ranges. > > Firmware will no more expose the secure-memory-ranges property so first > read the new one and if not found rollback t

Re: [PATCH v4 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-05-26 Thread Paul Mackerras
On Mon, Apr 27, 2020 at 12:35:10PM +0800, Tianjia Zhang wrote: > The 'kvm_run' field already exists in the 'vcpu' structure, which > is the same structure as the 'kvm_run' in the 'vcpu_arch' and > should be deleted. > > Signed-off-by: Tianjia Zhang Thanks, patches 3 and 4 of this series applied

Re: [PATCH -next] KVM: PPC: Book3S HV: remove redundant NULL check

2020-05-26 Thread Paul Mackerras
On Wed, Apr 01, 2020 at 09:09:03PM +0800, Chen Zhou wrote: > Free function kfree() already does NULL check, so the additional > check is unnecessary, just remove it. > > Signed-off-by: Chen Zhou Thanks, applied to my kvm-ppc-next branch. Paul.

Re: [PATCH v2] KVM: PPC: Book3S HV: relax check on H_SVM_INIT_ABORT

2020-05-26 Thread Paul Mackerras
On Wed, May 20, 2020 at 07:43:08PM +0200, Laurent Dufour wrote: > The commit 8c47b6ff29e3 ("KVM: PPC: Book3S HV: Check caller of H_SVM_* > Hcalls") added checks of secure bit of SRR1 to filter out the Hcall > reserved to the Ultravisor. > > However, the Hcall H_SVM_INIT_ABORT is made by the Ultrav

Re: [PATCH] powerpc/kvm/radix: ignore kmemleak false positives

2020-05-26 Thread Paul Mackerras
On Wed, May 13, 2020 at 09:39:15AM -0400, Qian Cai wrote: > kvmppc_pmd_alloc() and kvmppc_pte_alloc() allocate some memory but then > pud_populate() and pmd_populate() will use __pa() to reference the newly > allocated memory. > > Since kmemleak is unable to track the physical memory resulting in

Re: [PATCH] powerpc/kvm/book3s64/vio: fix some RCU-list locks

2020-05-26 Thread Paul Mackerras
On Sun, May 10, 2020 at 01:18:34AM -0400, Qian Cai wrote: > It is unsafe to traverse kvm->arch.spapr_tce_tables and > stt->iommu_tables without the RCU read lock held. Also, add > cond_resched_rcu() in places with the RCU read lock held that could take > a while to finish. > > arch/powerpc/kvm/bo

[PATCH v8 2/5] seq_buf: Export seq_buf_printf

2020-05-26 Thread Vaibhav Jain
'seq_buf' provides a very useful abstraction for writing to a string buffer without needing to worry about it over-flowing. However even though the API has been stable for couple of years now its still not exported to kernel loadable modules limiting its usage. Hence this patch proposes update to

[PATCH v8 5/5] powerpc/papr_scm: Implement support for PAPR_SCM_PDSM_HEALTH

2020-05-26 Thread Vaibhav Jain
This patch implements support for PDSM request 'PAPR_SCM_PDSM_HEALTH' that returns a newly introduced 'struct nd_papr_pdsm_health' instance containing dimm health information back to user space in response to ND_CMD_CALL. This functionality is implemented in newly introduced papr_scm_get_health() t

[PATCH v8 4/5] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-05-26 Thread Vaibhav Jain
Introduce support for PAPR NVDIMM Specific Methods (PDSM) in papr_scm module and add the command family to the white list of NVDIMM command sets. Also advertise support for ND_CMD_CALL for the nvdimm command mask and implement necessary scaffolding in the module to handle ND_CMD_CALL ioctl and PDSM

[PATCH v8 3/5] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-05-26 Thread Vaibhav Jain
Implement support for fetching nvdimm health information via H_SCM_HEALTH hcall as documented in Ref[1]. The hcall returns a pair of 64-bit bitmap, bitwise-and of which is then stored in 'struct papr_scm_priv' and subsequently partially exposed to user-space via newly introduced dimm specific attri

[PATCH v8 1/5] powerpc: Document details on H_SCM_HEALTH hcall

2020-05-26 Thread Vaibhav Jain
Add documentation to 'papr_hcalls.rst' describing the bitmap flags that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM specification. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog: v7..v8: * Added a clarificati

[PATCH v8 0/5] powerpc/papr_scm: Add support for reporting nvdimm health

2020-05-26 Thread Vaibhav Jain
Changes since v7 [1]: * Addressed various review comments from Aneesh, Ira and Mpe. * Removed the 'payload_offset' field from 'struct nd_pdsm_cmd_pkg' and replaced it with some reserved fields [ Aneesh ]. * Updated the doc and description for patch that fetches dimm health information from PHY

Re: [PATCH v3] powerpc/XIVE: SVM: share the event-queue page with the Hypervisor.

2020-05-26 Thread Michael Ellerman
Ram Pai writes: > XIVE interrupt controller uses an Event Queue (EQ) to enqueue event > notifications when an exception occurs. The EQ is a single memory page > provided by the O/S defining a circular buffer, one per server and > priority couple. > > On baremetal, the EQ page is configured with an

[v3 2/2] dts: ppc: t1024rdb: remove interrupts property

2020-05-26 Thread Biwen Li
From: Biwen Li Since the interrupt pin for RTC DS1339 is not connected to the CPU on T1024RDB, remove the interrupt property from the device tree. This also fix the following warning for hwclock.util-linux: $ hwclock.util-linux hwclock.util-linux: select() to /dev/rtc0 to wait for clock tick tim

[v3 1/2] dts: ppc: t4240rdb: remove interrupts property

2020-05-26 Thread Biwen Li
From: Biwen Li Since the interrupt pin for RTC DS1374 is not connected to the CPU on T4240RDB, remove the interrupt property from the device tree. This also fix the following warning for hwclock.util-linux: $ hwclock.util-linux hwclock.util-linux: select() to /dev/rtc0 to wait for clock tick tim

[PATCH v2] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-26 Thread Sandipan Das
Apart from read and write access, memory protection keys can also be used for restricting execute permission of pages on powerpc. This adds a test to verify if the feature works as expected. Signed-off-by: Sandipan Das --- Previous versions can be found at v1: https://lore.kernel.org/linuxppc-d

Re: [PATCH -next] scsi: ibmvscsi: Make some functions static

2020-05-26 Thread Martin K. Petersen
On Wed, 20 May 2020 17:10:36 +0800, Chen Tao wrote: > Fix the following warning: > > drivers/scsi/ibmvscsi/ibmvscsi.c:2387:12: warning: symbol > 'ibmvscsi_module_init' was not declared. Should it be static? > drivers/scsi/ibmvscsi/ibmvscsi.c:2409:13: warning: symbol > 'ibmvscsi_module_exit' was n

Re: [PATCH] powerpc/kvm/book3s64/vio: fix some RCU-list locks

2020-05-26 Thread Qian Cai
On Wed, May 27, 2020 at 11:13:23AM +1000, Paul Mackerras wrote: > On Sun, May 10, 2020 at 01:18:34AM -0400, Qian Cai wrote: > > It is unsafe to traverse kvm->arch.spapr_tce_tables and > > stt->iommu_tables without the RCU read lock held. Also, add > > cond_resched_rcu() in places with the RCU read

Re: [PATCH] powerpc/kvm/book3s64/vio: fix some RCU-list locks

2020-05-26 Thread Paul Mackerras
On Sun, May 10, 2020 at 01:18:34AM -0400, Qian Cai wrote: > It is unsafe to traverse kvm->arch.spapr_tce_tables and > stt->iommu_tables without the RCU read lock held. Also, add > cond_resched_rcu() in places with the RCU read lock held that could take > a while to finish. This mostly looks fine.

Re: [PATCH 2/3] powerpc/pci: unmap legacy INTx interrupts of passthrough IO adapters

2020-05-26 Thread Oliver O'Halloran
On Wed, Apr 29, 2020 at 5:51 PM Cédric Le Goater wrote: > > When a passthrough IO adapter is removed from a pseries machine using > hash MMU and the XIVE interrupt mode, the POWER hypervisor, pHyp, > expects the guest OS to have cleared all page table entries related to > the adapter. If some are

Re: [PATCH] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-26 Thread Michael Ellerman
Sandipan Das writes: > Hi Michael, > > On 26/05/20 6:05 pm, Michael Ellerman wrote: >> [...] >>> + >>> +/* Override definitions as they might be inconsistent */ >>> +#undef PKEY_DISABLE_ACCESS >>> +#define PKEY_DISABLE_ACCESS0x3 >> >> Why would they be inconsistent? >> > > The definition

Re: [PATCH v3 0/7] Statsfs: a new ram-based file system for Linux kernel statistics

2020-05-26 Thread Jakub Kicinski
On Tue, 26 May 2020 13:03:10 +0200 Emanuele Giuseppe Esposito wrote: > There is currently no common way for Linux kernel subsystems to expose > statistics to userspace shared throughout the Linux kernel; subsystems have > to take care of gathering and displaying statistics by themselves, for > exam

[PATCH v2] powerpc/wii: Fix declaration made after definition

2020-05-26 Thread Nathan Chancellor
A 0day randconfig uncovered an error with clang, trimmed for brevity: arch/powerpc/platforms/embedded6xx/wii.c:195:7: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] if (!machine_is(wii)) ^ The macro machine_is declares mach_##name but defi

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-26 Thread Li Yang
On Sun, May 24, 2020 at 9:49 PM Qiang Zhao wrote: > > On Wed, May 23, 2020 at 5:22 PM Li Yang > > -Original Message- > > From: Li Yang > > Sent: 2020年5月23日 5:22 > > To: Kees Cook > > Cc: Gustavo A. R. Silva ; Qiang Zhao > > ; linuxppc-dev ; > > moderated list:ARM/FREESCALE IMX / MXC ARM

Re: [PATCH] KVM: PPC: Book3S HV: read ibm,secure-memory nodes

2020-05-26 Thread Laurent Dufour
Paul, could you please take that patch? Le 16/04/2020 à 18:27, Laurent Dufour a écrit : The newly introduced ibm,secure-memory nodes supersede the ibm,uv-firmware's property secure-memory-ranges. Firmware will no more expose the secure-memory-ranges property so first read the new one and if not

Re: [PATCH v2 08/20] arm64: simplify detection of memory zone boundaries for UMA configs

2020-05-26 Thread Catalin Marinas
On Wed, Apr 29, 2020 at 03:11:14PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The free_area_init() function only requires the definition of maximal PFN > for each of the supported zone rater than calculation of actual zone sizes > and the sizes of the holes between the zones. > > Afte

Re: [PATCH v2 05/20] mm: use free_area_init() instead of free_area_init_nodes()

2020-05-26 Thread Catalin Marinas
On Wed, Apr 29, 2020 at 03:11:11PM +0300, Mike Rapoport wrote: > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index e42727e3568e..a650adb358ee 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -206,7 +206,7 @@ static void __init zone_sizes_init(unsigned long min,

Re: [PATCH v2 03/20] mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option

2020-05-26 Thread Catalin Marinas
On Wed, Apr 29, 2020 at 03:11:09PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The CONFIG_HAVE_MEMBLOCK_NODE_MAP is used to differentiate initialization > of nodes and zones structures between the systems that have region to node > mapping in memblock and those that don't. > > Currentl

Re: [PATCH v3 1/3] riscv: Move kernel mapping to vmalloc zone

2020-05-26 Thread Alex Ghiti
Hi Zong, Le 5/26/20 à 5:43 AM, Zong Li a écrit : On Sun, May 24, 2020 at 4:54 PM Alexandre Ghiti wrote: This is a preparatory patch for relocatable kernel. The kernel used to be linked at PAGE_OFFSET address and used to be loaded physically at the beginning of the main memory. Therefore, we c

Re: [PATCH v3 7/7] [not for merge] netstats: example use of stats_fs API

2020-05-26 Thread Emanuele Giuseppe Esposito
Hi Andrew How do you atomically get and display a group of statistics? If you look at how the netlink socket works, you will see code like: do { start = u64_stats_fetch_begin_irq(&cpu_stats->syncp); rx_packets = cpu_stats->rx

powerpc/pci: [PATCH 1/1 V3] PCIE PHB reset

2020-05-26 Thread wenxiong
From: Wen Xiong Several device drivers hit EEH(Extended Error handling) when triggering kdump on Pseries PowerVM. This patch implemented a reset of the PHBs in pci general code when triggering kdump. PHB reset stop all PCI transactions from normal kernel. We have tested the patch in several envir

Re: [PATCH v3 7/7] [not for merge] netstats: example use of stats_fs API

2020-05-26 Thread Andrew Lunn
On Tue, May 26, 2020 at 01:03:17PM +0200, Emanuele Giuseppe Esposito wrote: > Apply stats_fs on the networking statistics subsystem. > > Currently it only works with disabled network namespace > (CONFIG_NET_NS=n), because multiple namespaces will have the same > device name under the same root sou

Re: [PATCH] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-26 Thread Sandipan Das
Hi Michael, On 26/05/20 6:05 pm, Michael Ellerman wrote: > [...] >> + >> +/* Override definitions as they might be inconsistent */ >> +#undef PKEY_DISABLE_ACCESS >> +#define PKEY_DISABLE_ACCESS 0x3 > > Why would they be inconsistent? > The definition in sys/mman.h still uses the value specific

Re: [PATCH v2 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-05-26 Thread Michael Ellerman
Michal Simek writes: > Hi Michael, > > On 01. 04. 20 13:30, Michal Simek wrote: >> On 01. 04. 20 12:38, Takashi Iwai wrote: >>> On Wed, 01 Apr 2020 12:35:16 +0200, >>> Michael Ellerman wrote: Michal Simek writes: > On 01. 04. 20 4:07, Michael Ellerman wrote: >> Michal Simek wri

Re: [PATCH v4 07/45] powerpc/ptdump: Limit size of flags text to 1/2 chars on PPC32

2020-05-26 Thread Michael Ellerman
Christophe Leroy writes: > Le 25/05/2020 à 07:15, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> In order to have all flags fit on a 80 chars wide screen, >>> reduce the flags to 1 char (2 where ambiguous). >> >> I don't love this, the output is less readable. Is fitting on an 80 cha

Re: [PATCH] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-26 Thread Michael Ellerman
Hi Sandipan, Sandipan Das writes: > diff --git a/tools/testing/selftests/powerpc/mm/pkey_exec_prot.c > b/tools/testing/selftests/powerpc/mm/pkey_exec_prot.c > new file mode 100644 > index ..b346ad205e68 > --- /dev/null > +++ b/tools/testing/selftests/powerpc/mm/pkey_exec_prot.c > @@

Re: [RESEND PATCH v7 4/5] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-05-26 Thread Michael Ellerman
Vaibhav Jain writes: > Hi Ira, Mpe and Aneesh, > > Vaibhav Jain writes: > >> Michael Ellerman writes: >> >>> Ira Weiny writes: On Wed, May 20, 2020 at 12:30:57AM +0530, Vaibhav Jain wrote: > Introduce support for Papr nvDimm Specific Methods (PDSM) in papr_scm > modules and add the

[PATCH v3 7/7] [not for merge] netstats: example use of stats_fs API

2020-05-26 Thread Emanuele Giuseppe Esposito
Apply stats_fs on the networking statistics subsystem. Currently it only works with disabled network namespace (CONFIG_NET_NS=n), because multiple namespaces will have the same device name under the same root source that will cause a conflict in stats_fs. Signed-off-by: Emanuele Giuseppe Esposito

[PATCH v3 6/7] [not for merge] kvm: example of stats_fs_value show function

2020-05-26 Thread Emanuele Giuseppe Esposito
Add an example of the show function using the mp_state value. mp_state is an enum that represents the VCPU state, so instead of displaying its integer representation, the show function takes care of translating the integer into a more meaningful string representation. The VCPU status is shown in

[PATCH v3 5/7] kvm_main: replace debugfs with stats_fs

2020-05-26 Thread Emanuele Giuseppe Esposito
Use stats_fs API instead of debugfs to create sources and add values. This also requires to change all architecture files to replace the old debugfs_entries with stats_fs_vcpu_entries and statsfs_vm_entries. The files/folders name and organization is kept unchanged, and a symlink in sys/kernel/de

[PATCH v3 4/7] stats_fs fs: virtual fs to show stats to the end-user

2020-05-26 Thread Emanuele Giuseppe Esposito
Add virtual fs that maps stats_fs sources with directories, and values (simple or aggregates) to files. Every time a file is read/cleared, the fs internally invokes the stats_fs API to get/set the requested value. Also introduce the optional show function in each value, that allows to customize h

[PATCH v3 3/7] kunit: tests for stats_fs API

2020-05-26 Thread Emanuele Giuseppe Esposito
Add kunit tests to extensively test the stats_fs API functionality. In order to run them, the kernel .config must set CONFIG_KUNIT=y and a new .kunitconfig file must be created with CONFIG_STATS_FS=y and CONFIG_STATS_FS_TEST=y Tests can be then started by running the following command from the ro

[PATCH v3 2/7] documentation for stats_fs

2020-05-26 Thread Emanuele Giuseppe Esposito
Html docs for a complete documentation of the stats_fs API, filesystem and usage. Signed-off-by: Emanuele Giuseppe Esposito --- Documentation/filesystems/index.rst| 1 + Documentation/filesystems/stats_fs.rst | 222 + 2 files changed, 223 insertions(+) create mode

[PATCH v3 1/7] stats_fs API: create, add and remove stats_fs sources and values

2020-05-26 Thread Emanuele Giuseppe Esposito
Introduction to the stats_fs API, that allows to easily create, add and remove stats_fs sources and values. The API allows to easily building the statistics directory tree to automatically gather them for the linux kernel. The main functionalities are: create a source, add child sources/values/aggr

[PATCH v3 0/7] Statsfs: a new ram-based file system for Linux kernel statistics

2020-05-26 Thread Emanuele Giuseppe Esposito
There is currently no common way for Linux kernel subsystems to expose statistics to userspace shared throughout the Linux kernel; subsystems have to take care of gathering and displaying statistics by themselves, for example in the form of files in debugfs. For example KVM has its own code section

Re: [PATCH v4 3/6] asm-generic/tlb, arch: Invert CONFIG_HAVE_RCU_TABLE_INVALIDATE

2020-05-26 Thread Greg KH
On Wed, May 20, 2020 at 02:00:22PM +0530, Santosh Sivaraj wrote: > From: Peter Zijlstra > > commit 96bc9567cbe112e9320250f01b9c060c882e8619 upstream > > Make issuing a TLB invalidate for page-table pages the normal case. > > The reason is twofold: > > - too many invalidates is safer than too

Re: [linux-next PATCH] mm/gup.c: Convert to use get_user_{page|pages}_fast_only()

2020-05-26 Thread Souptick Joarder
On Tue, May 26, 2020 at 1:29 PM Paul Mackerras wrote: > > On Mon, May 25, 2020 at 02:23:32PM +0530, Souptick Joarder wrote: > > API __get_user_pages_fast() renamed to get_user_pages_fast_only() > > to align with pin_user_pages_fast_only(). > > > > As part of this we will get rid of write parameter

Re: [PATCH v3 1/3] riscv: Move kernel mapping to vmalloc zone

2020-05-26 Thread Zong Li
On Sun, May 24, 2020 at 4:54 PM Alexandre Ghiti wrote: > > This is a preparatory patch for relocatable kernel. > > The kernel used to be linked at PAGE_OFFSET address and used to be loaded > physically at the beginning of the main memory. Therefore, we could use > the linear mapping for the kernel

Re: [PATCH v3 2/3] riscv: Introduce CONFIG_RELOCATABLE

2020-05-26 Thread Zong Li
On Sun, May 24, 2020 at 4:55 PM Alexandre Ghiti wrote: > > This config allows to compile the kernel as PIE and to relocate it at > any virtual address at runtime: this paves the way to KASLR and to 4-level > page table folding at runtime. Runtime relocation is possible since > relocation metadata

[PATCH 6/6] powerpc/ppc-opcode: fold PPC_INST_* macros into PPC_RAW_* macros

2020-05-26 Thread Balamuruhan S
Lot of PPC_INST_* macros are used only ever in PPC_* macros, fold those PPC_INST_* into PPC_RAW_* to avoid using PPC_INST_* accidentally. Signed-off-by: Balamuruhan S Acked-by: Naveen N. Rao Tested-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 381 +- 1

[PATCH 5/6] powerpc/ppc-opcode: reuse raw instruction macros to stringify

2020-05-26 Thread Balamuruhan S
Wrap existing stringify macros to reuse raw instruction encoding macros that are newly added. Signed-off-by: Balamuruhan S Acked-by: Naveen N. Rao Tested-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 220 +- 1 file changed, 71 insertions(+), 149 deletion

[PATCH 4/6] powerpc/ppc-opcode: consolidate powerpc instructions from bpf_jit.h

2020-05-26 Thread Balamuruhan S
move macro definitions of powerpc instructions from bpf_jit.h to ppc-opcode.h and adopt the users of the macros accordingly. `PPC_MR()` is defined twice in bpf_jit.h, remove the duplicate one. Signed-off-by: Balamuruhan S Acked-by: Naveen N. Rao Tested-by: Naveen N. Rao --- arch/powerpc/includ

[PATCH 3/6] powerpc/bpf_jit: reuse instruction macros from ppc-opcode.h

2020-05-26 Thread Balamuruhan S
remove duplicate macro definitions from bpf_jit.h and reuse the macros from ppc-opcode.h Signed-off-by: Balamuruhan S Acked-by: Naveen N. Rao Tested-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h| 18 +- arch/powerpc/net/bpf_jit32.h | 10 +- arch/powerpc/

[PATCH 2/6] powerpc/ppc-opcode: move ppc instruction encoding from test_emulate_step

2020-05-26 Thread Balamuruhan S
Few ppc instructions are encoded in test_emulate_step.c, consolidate them and use it from ppc-opcode.h Signed-off-by: Balamuruhan S Acked-by: Naveen N. Rao Tested-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 35 ++ arch/powerpc/lib/test_emulate_step.c | 155 ++---

[PATCH 1/6] powerpc/ppc-opcode: introduce PPC_RAW_* macros for base instruction encoding

2020-05-26 Thread Balamuruhan S
Introduce PPC_RAW_* macros to have all the bare encoding of ppc instructions. Move `VSX_XX*()` and `TMRN()` macros up to reuse it. Signed-off-by: Balamuruhan S Acked-by: Naveen N. Rao Tested-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 183 -- 1 file ch

[PATCH 0/6] consolidate PowerPC instruction encoding macros

2020-05-26 Thread Balamuruhan S
ppc-opcode.h have base instruction encoding wrapped with stringify_in_c() for raw encoding to have compatibility. But there are redundant macros for base instruction encodings in bpf, instruction emulation test infrastructure and powerpc selftests. Currently PPC_INST_* macros are used for encoding

Re: [linux-next PATCH] mm/gup.c: Convert to use get_user_{page|pages}_fast_only()

2020-05-26 Thread Paul Mackerras
On Mon, May 25, 2020 at 02:23:32PM +0530, Souptick Joarder wrote: > API __get_user_pages_fast() renamed to get_user_pages_fast_only() > to align with pin_user_pages_fast_only(). > > As part of this we will get rid of write parameter. > Instead caller will pass FOLL_WRITE to get_user_pages_fast_onl

Re: [RFC PATCH v2 7/7] powerpc/selftest: reuse ppc-opcode macros to avoid redundancy

2020-05-26 Thread Balamuruhan S
On Thu, 2020-04-30 at 17:27 +0530, Naveen N. Rao wrote: > Michael Ellerman wrote: > > "Naveen N. Rao" writes: > > > Michael Ellerman wrote: > > > > Balamuruhan S writes: > > > > > Avoid redefining macros to encode ppc instructions instead reuse it > > > > > from > > > > > ppc-opcode.h, Makefile c

Re: [PATCH V3 2/2] tools/perf: Add perf tools support for extended register capability in powerpc

2020-05-26 Thread Madhavan Srinivasan
On 5/20/20 3:15 PM, Athira Rajeev wrote: From: Anju T Sudhakar Add extended regs to sample_reg_mask in the tool side to use with `-I?` option. Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user and also send this mask to the kern

Re: [PATCH V3 1/2] powerpc/perf: Add support for outputting extended regs in perf intr_regs

2020-05-26 Thread Madhavan Srinivasan
On 5/20/20 3:15 PM, Athira Rajeev wrote: From: Anju T Sudhakar Add support for perf extended register capability in powerpc. The capability flag PERF_PMU_CAP_EXTENDED_REGS, is used to indicate the PMU which support extended registers. The generic code define the mask of extended registers as

[PATCH v2] powerpc: Add ppc_inst_as_u64()

2020-05-26 Thread Michael Ellerman
The code patching code wants to get the value of a struct ppc_inst as a u64 when the instruction is prefixed, so we can pass the u64 down to __put_user_asm() and write it with a single store. The optprobes code wants to load a struct ppc_inst as an immediate into a register so it is useful to have