Re: [PATCH] powerpc: Use octal numbers for file permissions

2017-01-13 Thread Balbir Singh
On Thu, Jan 12, 2017 at 02:54:13PM +1100, Russell Currey wrote: > Symbolic macros are unintuitive and hard to read, whereas octal constants > are much easier to interpret. Replace macros for the basic permission > flags (user/group/other read/write/execute) with numeric constants > instead, across

[PATCH v3 4/8] x86: stop exporting msr-index.h to userland

2017-01-13 Thread Nicolas Dichtel
Suggested-by: Borislav Petkov Signed-off-by: Nicolas Dichtel --- arch/x86/include/uapi/asm/Kbuild | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild index 3dec769cadf7..1c532b3f18ea 100644 --- a/arch/x86/include/uapi/asm/Kbuild

[PATCH v3 5/8] Makefile.headersinst: cleanup input files

2017-01-13 Thread Nicolas Dichtel
After the last four patches, all exported headers are under uapi/, thus input-files2 are not needed anymore. The side effect is that input-files1-name is exactly header-y. Note also that input-files3-name is genhdr-y. Signed-off-by: Nicolas Dichtel --- scripts/Makefile.headersinst | 34

[PATCH v3 1/8] arm: put types.h in uapi

2017-01-13 Thread Nicolas Dichtel
This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel --- arch/arm/include/asm/types.h | 40 --- arch/arm/include/uapi/asm/types.h | 40 +++ 2 files changed, 40 insertions(+), 40 deletions(-

[PATCH v3 6/8] Makefile.headersinst: remove destination-y option

2017-01-13 Thread Nicolas Dichtel
This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree. Signed-off-by: Nicolas Dichtel --- Documentation/kbuild/makefiles.txt | 23 --- scripts/Makefile.headersinst | 2 +- 2 files changed, 5 inserti

[PATCH v3 0/8] uapi: export all headers under uapi directories

2017-01-13 Thread Nicolas Dichtel
Here is the v3 of this series. The first 5 patches are just cleanup: some exported headers were still under a non-uapi directory or (x86 case) were wrongly exported. The patch 6 was spotted by code review: there is no in-tree user of this functionality. Patches 7 and 8 remove the need to list expli

[PATCH v3 3/8] nios2: put setup.h in uapi

2017-01-13 Thread Nicolas Dichtel
This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h. Signed-off-by: Nicolas Dichtel --- arch/nios2/include/uapi/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild in

[PATCH v3 8/8] uapi: export all arch specifics directories

2017-01-13 Thread Nicolas Dichtel
This patch removes the need of subdir-y. Now all files/directories under arch//include/uapi/ are exported. The only change for userland is the layout of the command 'make headers_install_all': directories asm- are replaced by arch-/. Those new directories contains all files/directories of the spec

[PATCH v3 2/8] h8300: put bitsperlong.h in uapi

2017-01-13 Thread Nicolas Dichtel
This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel --- arch/h8300/include/asm/bitsperlong.h | 14 -- arch/h8300/include/uapi/asm/bitsperlong.h | 14 ++ 2 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 arch/h8300/i

[PATCH v3 7/8] uapi: export all headers under uapi directories

2017-01-13 Thread Nicolas Dichtel
Regularly, when a new header is created in include/uapi/, the developer forgets to add it in the corresponding Kbuild file. This error is usually detected after the release is out. In fact, all headers under uapi directories should be exported, thus it's useless to have an exhaustive list. After

Re: [PATCH v3 3/8] nios2: put setup.h in uapi

2017-01-13 Thread Tobias Klauser
On 2017-01-13 at 11:46:41 +0100, Nicolas Dichtel wrote: > This header file is exported, but from a userland pov, it's just a wrapper > to asm-generic/setup.h. > > Signed-off-by: Nicolas Dichtel Reviewed-by: Tobias Klauser

[PATCH v5 0/2] KVM: PPC: Add FWNMI support for KVM guests on POWER

2017-01-13 Thread Aravinda Prasad
This series of patches add FWNMI support for KVM guests on POWER. Memory errors such as bit flips that cannot be corrected by hardware is passed on to the kernel for handling by raising machine check exception (an NMI). Upon such machine check exceptions, if the address in error belongs to the gue

[PATCH v5 1/2] KVM: PPC: Add new capability to control MCE behaviour

2017-01-13 Thread Aravinda Prasad
This patch introduces a new KVM capability to control how KVM behaves on machine check exception (MCE). Without this capability, KVM redirects machine check exceptions to guest's 0x200 vector, if the address in error belongs to the guest. With this capability KVM causes a guest exit with NMI exit r

[PATCH v5 2/2] KVM: PPC: Exit guest upon MCE when FWNMI capability is enabled

2017-01-13 Thread Aravinda Prasad
Enhance KVM to cause a guest exit with KVM_EXIT_NMI exit reason upon a machine check exception (MCE) in the guest address space if the KVM_CAP_PPC_FWNMI capability is enabled (instead of delivering a 0x200 interrupt to guest). This enables QEMU to build error log and deliver machine check exception

Re: [PATCH v4 3/5] powerpc/fadump: remove dependency with CONFIG_KEXEC

2017-01-13 Thread Mahesh Jagannath Salgaonkar
On 01/05/2017 11:02 PM, Hari Bathini wrote: > Now that crashkernel parameter parsing and vmcoreinfo related code is > moved under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE, remove > dependency with CONFIG_KEXEC for CONFIG_FA_DUMP. While here, get rid > of definitions of fadump_append_elf_note(

[PATCH 4.4 22/27] powerpc: Fix build warning on 32-bit PPC

2017-01-13 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Larry Finger commit 8ae679c4bc2ea2d16d92620da8e3e9332fa4039f upstream. I am getting the following warning when I build kernel 4.9-git on my PowerBook G4 with a 32-bit PPC processor: AS

Re: [PATCH v4 4/5] powerpc/fadump: reuse crashkernel parameter for fadump memory reservation

2017-01-13 Thread Mahesh Jagannath Salgaonkar
On 01/05/2017 11:02 PM, Hari Bathini wrote: > fadump supports specifying memory to reserve for fadump's crash kernel > with fadump_reserve_mem kernel parameter. This parameter currently > supports passing a fixed memory size, like fadump_reserve_mem= > only. This patch aims to add support for other

[PATCH 4.9 40/59] powerpc: Fix build warning on 32-bit PPC

2017-01-13 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Larry Finger commit 8ae679c4bc2ea2d16d92620da8e3e9332fa4039f upstream. I am getting the following warning when I build kernel 4.9-git on my PowerBook G4 with a 32-bit PPC processor: AS

Re: bootx_init.c:88: undefined reference to `__stack_chk_fail_local'

2017-01-13 Thread Christophe LEROY
Le 12/01/2017 à 19:07, Segher Boessenkool a écrit : On Thu, Jan 12, 2017 at 09:20:47AM -0600, Benjamin Herrenschmidt wrote: On Thu, 2017-01-12 at 15:42 +0100, Christophe LEROY wrote: The 4.6.3 uses __stack_chk_guard, while the 4.4.4 and 4.8.3 use -28680(r2) Is it dependent on the way GCC is

RE: bootx_init.c:88: undefined reference to `__stack_chk_fail_local'

2017-01-13 Thread David Laight
From: Christophe LEROY > Sent: 13 January 2017 12:15 ... > > Which leads to TARGET_LIBC_PROVIDES_SSP being undefined (it would normally > > be true for glibc >= 2.4), and that is all. Mystery solved. Thanks! > > > > Is there a way to know during compilation how the compiler will behave, > in ord

[no subject]

2017-01-13 Thread David Howells
Nicolas Dichtel wrote: > This header file is exported, thus move it to uapi. Exported how? > +#ifdef __INT32_TYPE__ > +#undef __INT32_TYPE__ > +#define __INT32_TYPE__ int > +#endif > + > +#ifdef __UINT32_TYPE__ > +#undef __UINT32_TYPE__ > +#define __UINT32_TYPE__ unsigned int

[no subject]

2017-01-13 Thread David Howells
> -header-y += msr-index.h I see it on my desktop as /usr/include/asm/msr-index.h and it's been there at least four years - and as such it's part of the UAPI. I don't think you can remove it unless you can guarantee there are no userspace users. David

Re: [PATCH v3 1/8] arm: put types.h in uapi

2017-01-13 Thread Nicolas Dichtel
Please, do not remove the email subject when you reply. I restore it to ease the thread follow-up. Le 13/01/2017 à 16:36, David Howells a écrit : > Nicolas Dichtel wrote: > >> This header file is exported, thus move it to uapi. > > Exported how? It is listed in include/uapi/asm-generic/Kbuild.a

Re: [PATCH v3 4/8] x86: stop exporting msr-index.h to userland

2017-01-13 Thread Nicolas Dichtel
Le 13/01/2017 à 16:43, David Howells a écrit : >> -header-y += msr-index.h > > I see it on my desktop as /usr/include/asm/msr-index.h and it's been there at > least four years - and as such it's part of the UAPI. I don't think you can > remove it unless you can guarantee there are no userspace us

Re: [PATCH v3 1/8] arm: put types.h in uapi

2017-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2017 at 05:01:01PM +0100, Nicolas Dichtel wrote: > Please, do not remove the email subject when you reply. I restore it to > ease the thread follow-up. I mentioned it to David, and he says it's because the long list of recipients is breaking his mailer. I've already posed the ques

Re: [PATCH v3 4/8] x86: stop exporting msr-index.h to userland

2017-01-13 Thread Borislav Petkov
On Fri, Jan 13, 2017 at 05:08:34PM +0100, Nicolas Dichtel wrote: > Le 13/01/2017 à 16:43, David Howells a écrit : > >> -header-y += msr-index.h > > > > I see it on my desktop as /usr/include/asm/msr-index.h and it's been there > > at > > least four years - and as such it's part of the UAPI. I do

Re: [PATCH 04/37] PCI: dwc: designware: Move the register defines to designware header file

2017-01-13 Thread Joao Pinto
Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > No functional change. Move the register defines and other macros from > pcie-designware.c to pcie-designware.h. This is in preparation to > split the pcie-designware.c file into designware core file and host > specific file. > > While a

Re: [PATCH 02/37] PCI: dwc: designware: Add new *ops* for cpu addr fixup

2017-01-13 Thread Joao Pinto
Hi Kishon, Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > Some platforms (like dra7xx) require only the least 28 bits of the > corresponding 32 bit CPU address to be programmed in the address > translation unit. This modified address is stored in io_base/mem_base/ > cfg0_base/cfg1_b

Re: [PATCH 10/37] PCI: dwc: designware: Fix style errors in pcie-designware.c

2017-01-13 Thread Joao Pinto
Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > No functional change. Fix all checkpatch warnings and check errors > in pcie-designware.c > > Signed-off-by: Kishon Vijay Abraham I > --- > drivers/pci/dwc/pcie-designware.c | 42 > ++--- > 1 file cha

Re: [PATCH 06/37] PCI: dwc: Rename cfg_read/cfg_write to read/write

2017-01-13 Thread Joao Pinto
Hi, Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > No functional change. dw_pcie_cfg_read/dw_pcie_cfg_write doesn't do > anything specific to access configuration space. It can be just renamed > to dw_pcie_read/dw_pcie_write and used to read/write data to dbi space. > This is in pre

Re: [PATCH v5 5/5] Documentation:powerpc: Add device-tree bindings for power-mgt

2017-01-13 Thread Rob Herring
On Tue, Jan 10, 2017 at 02:37:04PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > Document the device-tree bindings defining the the properties under > the @power-mgt node in the device tree that describe the idle states > for Linux running on baremetal POWER servers. > We have

Re: [PATCH 11/37] PCI: dwc: Split pcie-designware.c into host and core files

2017-01-13 Thread Joao Pinto
Às 10:26 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > Split pcie-designware.c into pcie-designware-host.c that contains > the host specific parts of the driver and pcie-designware.c that > contains the parts used by both host driver and endpoint driver. > > Signed-off-by: Kishon Vijay Abrah

Re: [PATCH v3 1/8] arm: put types.h in uapi

2017-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2017 at 11:46:39AM +0100, Nicolas Dichtel wrote: > This header file is exported, thus move it to uapi. I'm taking this patch, but with the following commit log: Due to the way kbuild works, this header was unintentionally exported back in 2013 when it was created, despite it n

[PATCH 1/3] powerpc: bpf: remove redundant check for non-null image

2017-01-13 Thread Naveen N. Rao
From: Daniel Borkmann We have a check earlier to ensure we don't proceed if image is NULL. As such, the redundant check can be removed. Signed-off-by: Daniel Borkmann [Added similar changes for classic BPF JIT] Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit_comp.c | 17 +-

[PATCH 2/3] powerpc: bpf: flush the entire JIT buffer

2017-01-13 Thread Naveen N. Rao
With bpf_jit_binary_alloc(), we allocate at a page granularity and fill the rest of the space with illegal instructions to mitigate BPF spraying attacks, while having the actual JIT'ed BPF program at a random location within the allocated space. Under this scenario, it would be better to flush the

[PATCH 3/3] powerpc: bpf: implement in-register swap for 64-bit endian operations

2017-01-13 Thread Naveen N. Rao
Generate instructions to perform the endian conversion using registers, rather than generating two memory accesses. The "way easier and faster" comment was obviously for the author, not the processor. Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit_comp64.c | 22 ++

Re: [PATCH 05/37] PCI: dwc: Add platform_set_drvdata

2017-01-13 Thread Joao Pinto
Hi, Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > Add platform_set_drvdata in all designware based drivers to store the > private data structure of the driver so that dev_set_drvdata can be > used to get back private data pointer in add_pcie_port/host_init. > This is in preparation

RE: [PATCH 3/3] powerpc: bpf: implement in-register swap for 64-bit endian operations

2017-01-13 Thread David Laight
From: Naveen N. Rao > Sent: 13 January 2017 17:10 > Generate instructions to perform the endian conversion using registers, > rather than generating two memory accesses. > > The "way easier and faster" comment was obviously for the author, not > the processor. That rather depends on whether the p

Re: [PATCH 36/37] ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP

2017-01-13 Thread Tony Lindgren
* Kishon Vijay Abraham I [170112 02:35]: > The PCIe programming sequence in TRM suggests CLKSTCTRL of PCIe should > be set to SW_WKUP. There are no issues when CLKSTCTRL is set to HW_AUTO > in RC mode. However in EP mode, the host system is not able to access the > MEMSPACE and setting the CLKSTCT

Re: [PATCH 09/37] PCI: dwc: designware: Parse *num-lanes* property in dw_pcie_setup_rc

2017-01-13 Thread Joao Pinto
Hi, Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > *num-lanes* dt property is parsed in dw_pcie_host_init. However > *num-lanes* property is applicable to both root complex mode and > endpoint mode. As a first step, move the parsing of this property > outside dw_pcie_host_init. This

Re: [PATCH 07/37] PCI: dwc: designware: Get device pointer at the start of dw_pcie_host_init

2017-01-13 Thread Joao Pinto
Hi! Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > No functional change. Get device pointer at the beginning of > dw_pcie_host_init instead of getting it all over dw_pcie_host_init. > This is in preparation for splitting struct pcie_port into host and > core structures (Once split p

Re: [PATCH 12/37] PCI: dwc: Create a new config symbol to enable pci dwc host

2017-01-13 Thread Joao Pinto
Hi Kishon, Às 10:26 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > Now that pci designware host has a separate file, create a new > config symbol to select the host only driver. This is in preparation > to enable endpoint support to designware driver. > > Signed-off-by: Kishon Vijay Abraham

Re: [PATCH 3/3] powerpc: bpf: implement in-register swap for 64-bit endian operations

2017-01-13 Thread 'Naveen N. Rao'
On 2017/01/13 05:17PM, David Laight wrote: > From: Naveen N. Rao > > Sent: 13 January 2017 17:10 > > Generate instructions to perform the endian conversion using registers, > > rather than generating two memory accesses. > > > > The "way easier and faster" comment was obviously for the author, not

Re: [PATCH 16/37] PCI: endpoint: Introduce configfs entry for configuring EP functions

2017-01-13 Thread Christoph Hellwig
Hi Kishon, a couple comments on the configfs layout based on my experiments with your previous drop to implement a NVMe device using it. I don't think most of these configfs files should be present here, as they are properties of the implemented PCIe devices. E.g. for my NVMe device they will be

Re: [PATCH 1/3] powerpc: bpf: remove redundant check for non-null image

2017-01-13 Thread Alexei Starovoitov
On Fri, Jan 13, 2017 at 10:40:00PM +0530, Naveen N. Rao wrote: > From: Daniel Borkmann > > We have a check earlier to ensure we don't proceed if image is NULL. As > such, the redundant check can be removed. > > Signed-off-by: Daniel Borkmann > [Added similar changes for classic BPF JIT] > Signe

Re: [PATCH 2/3] powerpc: bpf: flush the entire JIT buffer

2017-01-13 Thread Alexei Starovoitov
On Fri, Jan 13, 2017 at 10:40:01PM +0530, Naveen N. Rao wrote: > With bpf_jit_binary_alloc(), we allocate at a page granularity and fill > the rest of the space with illegal instructions to mitigate BPF spraying > attacks, while having the actual JIT'ed BPF program at a random location > within the

[PATCH] net: constify mdiobb_ops structures

2017-01-13 Thread Bhumika Goyal
Declare mdiobb_ops structures as const as they are only stored in the ops field of mdiobb_ctrl structures. This field is of type const, so mdiobb_ops structures having this property can be declared const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static

Re: [PATCH 2/3] powerpc: bpf: flush the entire JIT buffer

2017-01-13 Thread Daniel Borkmann
On 01/13/2017 06:10 PM, Naveen N. Rao wrote: With bpf_jit_binary_alloc(), we allocate at a page granularity and fill the rest of the space with illegal instructions to mitigate BPF spraying attacks, while having the actual JIT'ed BPF program at a random location within the allocated space. Under