RE: [v3, 5/9] fsl/fman: Add Frame Manager support

2015-07-23 Thread Liberman Igal
Regards, Igal Liberman. +static struct platform_driver fm_driver = { + .driver = { +.name = fsl-fman, +.of_match_table = fm_match, +}, + .probe = fm_probe, +}; + +builtin_platform_driver(fm_driver); + +static int __init __cold

Re: [PATCH v7 3/3] leds/powernv: Add driver for PowerNV platform

2015-07-23 Thread Jacek Anaszewski
Vasant, On 23.07.2015 10:08, Vasant Hegde wrote: On 07/23/2015 01:25 PM, Jacek Anaszewski wrote: Hi Vasant, Jacek, .../... +/* PowerNV LED data */ +struct powernv_led_data { +struct led_classdevcdev; +char*loc_code;/* LED location code */ +int

[PATCH 2/2] powerpc/config: enable aquantia PHY

2015-07-23 Thread shh.xie
From: Shaohui Xie shaohui@freescale.com Aquantia PHYs used on platforms such as T2080RDB, T1024RDB. Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/configs/corenet32_smp_defconfig | 1 + arch/powerpc/configs/corenet64_smp_defconfig | 1 + 2 files changed, 2

[PATCH 1/2] powerpc/config: enable teranetics PHY

2015-07-23 Thread shh.xie
From: Shaohui Xie shaohui@freescale.com The PHY uses XAUI interface to connect to MAC, mostly the PHY used on riser card. Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/configs/corenet32_smp_defconfig | 1 + arch/powerpc/configs/corenet64_smp_defconfig | 1 + 2 files

[PATCH] powerpc/mm: Fix pte_pagesize_index() crash on 4K w/64K hash

2015-07-23 Thread Michael Ellerman
The powerpc kernel can be built to have either a 4K PAGE_SIZE or a 64K PAGE_SIZE. However when built with a 4K PAGE_SIZE there is an additional config option which can be enabled, PPC_HAS_HASH_64K, which means the kernel also knows how to hash a 64K page even though the base PAGE_SIZE is 4K.

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2015-07-23 Thread Michael Schmitz
Hi Christian, here's what Finn asked me to run as tests: # dmesg | grep this_id nvram.out # cat /proc/driver/nvram nvram.out # hexdump -C /dev/nvram nvram.out # cp /dev/nvram /tmp/nvram # cp /tmp/nvram /dev/nvram # md5sum /dev/nvram /tmp/nvram nvram.out What you sent so far looks OK. I've

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-23 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Wed, Jul 22, 2015 at 04:19:16PM -0700, Sukadev Bhattiprolu wrote: | Peter Zijlstra [pet...@infradead.org] wrote: | | I've not woken up yet, and not actually fully read the email, but can | | you stuff the entire above chunk inside the IPI? | |

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-23 Thread David Rientjes
On Thu, 23 Jul 2015, Christoph Lameter wrote: The only possible downside would be existing users of alloc_pages_node() that are calling it with an offline node. Since it's a VM_BUG_ON() that would catch that, I think it should be changed to a VM_WARN_ON() and eventually fixed up because

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-23 Thread Christoph Lameter
On Wed, 22 Jul 2015, David Rientjes wrote: Eek, yeah, that does look bad. I'm not even sure the if (nid 0) nid = numa_node_id(); is correct; I think this should be comparing to NUMA_NO_NODE rather than all negative numbers, otherwise we silently ignore overflow and

[PATCH] powerpc: Update corenet32_smp_defconfig for modern distros

2015-07-23 Thread Michael Ellerman
corenet32_smp_defconfig is missing some things that modern distros require, enable them. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- arch/powerpc/configs/corenet32_smp_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/configs/corenet32_smp_defconfig

Re: [PATCH v5 5/7] powerpc/powernv: add event attribute and group to nest pmu

2015-07-23 Thread Madhavan Srinivasan
On Wednesday 22 July 2015 10:14 AM, Daniel Axtens wrote: On Thu, 2015-07-16 at 16:43 +0530, Madhavan Srinivasan wrote: Add code to create event/format attributes and attribute groups for each nest pmu. Cc: Michael Ellerman m...@ellerman.id.au Cc: Benjamin Herrenschmidt

Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-23 Thread Madhavan Srinivasan
On Wednesday 22 July 2015 09:37 AM, Daniel Axtens wrote: static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS]; + +static int nest_event_info(struct property *pp, char *name, +struct

Re: [PATCH V4 4/6] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it

2015-07-23 Thread Eric B Munson
On Thu, 23 Jul 2015, Vlastimil Babka wrote: On 07/22/2015 08:43 PM, Eric B Munson wrote: On Wed, 22 Jul 2015, Vlastimil Babka wrote: Hi, I think you should include a complete description of which transitions for vma states and mlock2/munlock2 flags applied on them are valid

RE: [v3, 2/9] fsl/fman: Add the FMan port FLIB

2015-07-23 Thread Liberman Igal
Regards, Igal Liberman. -Original Message- From: Stephen Hemminger [mailto:step...@networkplumber.org] Sent: Wednesday, July 22, 2015 7:56 PM To: Liberman Igal-B31950 Cc: net...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux- ker...@vger.kernel.org; Wood Scott-B07421; Bucur

Re: [4.2-rc3] macintosh/ans-lcd.c: Missing include causes compile failure

2015-07-23 Thread Tim Gardner
On 07/23/2015 04:18 AM, Michael Ellerman wrote: On Mon, 2015-20-07 at 19:01:42 UTC, Tim Gardner wrote: From: Tim Gardner tim.gard...@canonical.com drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or storage class module_init(anslcd_init); ^

Re: [PATCH v5 6/7] powerpc/powernv: generic nest pmu event functions

2015-07-23 Thread Madhavan Srinivasan
On Wednesday 22 July 2015 10:26 AM, Daniel Axtens wrote: +static void p8_nest_read_counter(struct perf_event *event) +{ +uint64_t *addr; +u64 data = 0; You've got a u64 and a uint64_t, and then... + +addr = (u64 *)event-hw.event_base; ... you cast to event_base to a u64

Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support

2015-07-23 Thread Madhavan Srinivasan
On Wednesday 22 July 2015 10:33 AM, Daniel Axtens wrote: +static void nest_change_cpu_context(int old_cpu, int new_cpu) +{ +int i; + +for (i = 0; per_nest_pmu_arr[i] != NULL; i++) +perf_pmu_migrate_context(per_nest_pmu_arr[i]-pmu, +

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-23 Thread Peter Zijlstra
On Wed, Jul 22, 2015 at 04:19:16PM -0700, Sukadev Bhattiprolu wrote: Peter Zijlstra [pet...@infradead.org] wrote: | I've not woken up yet, and not actually fully read the email, but can | you stuff the entire above chunk inside the IPI? | | I think you could then actually optimize

Re: [PATCH v5 0/7]powerpc/powernv: Nest Instrumentation support

2015-07-23 Thread Madhavan Srinivasan
On Tuesday 21 July 2015 12:13 AM, Sukadev Bhattiprolu wrote: Madhavan Srinivasan [ma...@linux.vnet.ibm.com] wrote: | This patchset enables Nest Instrumentation support on powerpc. | POWER8 has per-chip Nest Intrumentation which provides various | per-chip metrics like memory, powerbus, Xlink

Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support

2015-07-23 Thread Daniel Axtens
On Thu, 2015-07-23 at 12:18 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 10:33 AM, Daniel Axtens wrote: +static void nest_change_cpu_context(int old_cpu, int new_cpu) +{ + int i; + + for (i = 0; per_nest_pmu_arr[i] != NULL; i++) +

Re: [PATCH V4 2/6] mm: mlock: Add new mlock, munlock, and munlockall system calls

2015-07-23 Thread Ralf Baechle
On Wed, Jul 22, 2015 at 10:15:01AM -0400, Eric B Munson wrote: You haven't wired it up properly on powerpc, but I haven't mentioned it because I'd rather we did it. cheers It looks like I will be spinning a V5, so I will drop all but the x86 system calls additions in that

Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support

2015-07-23 Thread Madhavan Srinivasan
On Thursday 23 July 2015 12:19 PM, Daniel Axtens wrote: On Thu, 2015-07-23 at 12:18 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 10:33 AM, Daniel Axtens wrote: +static void nest_change_cpu_context(int old_cpu, int new_cpu) +{ + int i; + + for (i = 0; per_nest_pmu_arr[i]

Re: [PATCH v7 3/3] leds/powernv: Add driver for PowerNV platform

2015-07-23 Thread Vasant Hegde
On 07/23/2015 01:25 PM, Jacek Anaszewski wrote: Hi Vasant, Jacek, .../... +/* PowerNV LED data */ +struct powernv_led_data { +struct led_classdevcdev; +char*loc_code;/* LED location code */ +intled_type;/* OPAL_SLOT_LED_TYPE_* */ +

[PATCH] cxl: Add alternate MMIO error handling

2015-07-23 Thread Ian Munsie
From: Ian Munsie imun...@au1.ibm.com userspace programs using cxl currently have to use two strategies for dealing with MMIO errors simultaneously. They have to check every read for a return of all Fs in case the adapter has gone away and the kernel has not yet noticed, and they have to deal with

Re: [PATCH v3 5/8] perf: Split perf_event_read_value()

2015-07-23 Thread Peter Zijlstra
On Tue, Jul 14, 2015 at 08:01:52PM -0700, Sukadev Bhattiprolu wrote: Move the part of perf_event_read_value() that computes the event counts and event times into a new function, perf_event_compute(). This would allow us to call perf_event_compute() independently. Signed-off-by: Sukadev

Re: [PATCH v7 3/3] leds/powernv: Add driver for PowerNV platform

2015-07-23 Thread Jacek Anaszewski
Hi Vasant, Thanks for the update. On 22.07.2015 16:52, Vasant Hegde wrote: This patch implements LED driver for PowerNV platform using the existing generic LED class framework. PowerNV platform has below type of LEDs: - System attention Indicates there is a problem with the system

Re: [PATCH V4 4/6] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it

2015-07-23 Thread Vlastimil Babka
On 07/22/2015 08:43 PM, Eric B Munson wrote: On Wed, 22 Jul 2015, Vlastimil Babka wrote: Hi, I think you should include a complete description of which transitions for vma states and mlock2/munlock2 flags applied on them are valid and what they do. It will also help with the manpages.

Re: [4.2-rc3] macintosh/ans-lcd.c: Missing include causes compile failure

2015-07-23 Thread Michael Ellerman
On Mon, 2015-20-07 at 19:01:42 UTC, Tim Gardner wrote: From: Tim Gardner tim.gard...@canonical.com drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or storage class module_init(anslcd_init); ^ drivers/macintosh/ans-lcd.c:201:1: error: type defaults to 'int' in

[PATCH 01/11] powerpc/kernel: Switch to using MAX_ERRNO

2015-07-23 Thread Michael Ellerman
Currently on powerpc we have our own #define for the highest (negative) errno value, called _LAST_ERRNO. This is defined to be 516, for reasons which are not clear. The generic code, and x86, use MAX_ERRNO, which is defined to be 4095. In particular seccomp uses MAX_ERRNO to restrict the value

[PATCH 02/11] powerpc/kernel: Change the do_syscall_trace_enter() API

2015-07-23 Thread Michael Ellerman
The API for calling do_syscall_trace_enter() is currently sensible enough, it just returns the (modified) syscall number. However once we enable seccomp filter it will get more complicated. When seccomp filter runs, the seccomp kernel code (via SECCOMP_RET_ERRNO), or a ptracer (via

Re: [PATCH v5 3/7] powerpc/powernv: Nest PMU detection and device tree parser

2015-07-23 Thread Michael Ellerman
On Thu, 2015-07-23 at 11:24 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 09:19 AM, Daniel Axtens wrote: Hi, +static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; + +static int nest_ima_dt_parser(void) +{ + const __be32 *gcid; + const __be64

Re: [PATCH v5 6/7] powerpc/powernv: generic nest pmu event functions

2015-07-23 Thread Madhavan Srinivasan
On Thursday 23 July 2015 02:34 PM, Michael Ellerman wrote: On Thu, 2015-07-23 at 12:14 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 10:26 AM, Daniel Axtens wrote: +static void p8_nest_read_counter(struct perf_event *event) +{ + uint64_t *addr; + u64 data = 0; You've got a

Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-23 Thread Madhavan Srinivasan
On Thursday 23 July 2015 02:41 PM, Michael Ellerman wrote: On Thu, 2015-07-23 at 11:33 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 09:37 AM, Daniel Axtens wrote: static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; +static struct nest_pmu

Re: [PATCH v5 3/7] powerpc/powernv: Nest PMU detection and device tree parser

2015-07-23 Thread Madhavan Srinivasan
On Thursday 23 July 2015 02:46 PM, Michael Ellerman wrote: On Thu, 2015-07-23 at 11:24 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 09:19 AM, Daniel Axtens wrote: Hi, +static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; + +static int

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2015-07-23 Thread Christian T. Steigies
On Wed, Jul 22, 2015 at 02:22:21PM +1000, Finn Thain wrote: Anyone with a suitable Atari, i.e. ATARIHW_PRESENT(TT_CLK), who can boot both TOS and Linux could resolve the question. (Perhaps with an emulator?) Any old kernel binary would do, since atari_scsi should print either HOSTID=n or

Re: [PATCH kernel] powerpc/powernv/ioda2: Fix calculation for memory allocated for TCE table

2015-07-23 Thread Alexey Kardashevskiy
On 07/21/2015 04:24 PM, Michael Ellerman wrote: On Mon, 2015-07-20 at 20:45 +1000, Alexey Kardashevskiy wrote: The existing code stores the amount of memory allocated for a TCE table. At the moment it uses @offset which is a virtual offset in the TCE table which is only correct for a one level

Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-23 Thread Michael Ellerman
On Thu, 2015-07-23 at 11:33 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 09:37 AM, Daniel Axtens wrote: static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS]; + +static int

Re: [PATCH v5 6/7] powerpc/powernv: generic nest pmu event functions

2015-07-23 Thread Michael Ellerman
On Thu, 2015-07-23 at 12:14 +0530, Madhavan Srinivasan wrote: On Wednesday 22 July 2015 10:26 AM, Daniel Axtens wrote: +static void p8_nest_read_counter(struct perf_event *event) +{ + uint64_t *addr; + u64 data = 0; You've got a u64 and a uint64_t, and then... + + addr = (u64

[PATCH 03/11] powerpc: Drop unused syscall_get_error()

2015-07-23 Thread Michael Ellerman
syscall_get_error() is unused, and never has been. It's also probably wrong, as it negates r3 before returning it, but that depends on what the caller is expecting. It also doesn't deal with compat, and doesn't deal with TIF_NOERROR. Although we could fix those, until it has a caller and it's

[PATCH 04/11] powerpc: Don't negate error in syscall_set_return_value()

2015-07-23 Thread Michael Ellerman
Currently the only caller of syscall_set_return_value() is seccomp filter, which is not enabled on powerpc. This means we have not noticed that our implementation of syscall_set_return_value() negates error, even though the value passed in is already negative. So remove the negation in

[PATCH 05/11] powerpc: Rework syscall_get_arguments() so there is only one loop

2015-07-23 Thread Michael Ellerman
Currently syscall_get_arguments() has two loops, one for compat and one for regular tasks. In prepartion for the next patch, which changes which registers we use, switch it to only have one loop, so we only have one place to update. Signed-off-by: Michael Ellerman m...@ellerman.id.au ---

[PATCH 06/11] powerpc: Use orig_gpr3 in syscall_get_arguments()

2015-07-23 Thread Michael Ellerman
Currently syscall_get_arguments() is used by syscall tracepoints, and collect_syscall() which is used in some debugging as well as /proc/pid/syscall. The current implementation just copies regs-gpr[3 .. 5] out, which is fine for all the current use cases. When we enable seccomp filter, that will

[PATCH 07/11] powerpc: Change syscall_get_nr() to return int

2015-07-23 Thread Michael Ellerman
The documentation for syscall_get_nr() in asm-generic says: Note this returns int even on 64-bit machines. Only 32 bits of system call number can be meaningful. If the actual arch value is 64 bits, this truncates to 32 bits so 0x means -1. However our implementation was never updated

[PATCH 08/11] powerpc/kernel: Add SIG_SYS support for compat tasks

2015-07-23 Thread Michael Ellerman
SIG_SYS was added in commit a0727e8ce513 signal, x86: add SIGSYS info and make it synchronous. Because we use the asm-generic struct siginfo, we got support for SIG_SYS for free as part of that commit. However there was no compat handling added for powerpc. That means we've been advertising the

[PATCH 09/11] powerpc/kernel: Enable seccomp filter

2015-07-23 Thread Michael Ellerman
This commit enables seccomp filter on powerpc, now that we have all the necessary pieces in place. To support seccomp's desire to modify the syscall return value under some circumstances, we use a different ABI to the ptrace ABI. That is we use r3 as the syscall return value, and orig_gpr3 is the

[PATCH 10/11] selftests/seccomp: Make seccomp tests work on big endian

2015-07-23 Thread Michael Ellerman
The seccomp_bpf test uses BPF_LD|BPF_W|BPF_ABS to load 32-bit values from seccomp_data-args. On big endian machines this will load the high word of the argument, which is not what the test wants. Borrow a hack from samples/seccomp/bpf-helper.h which changes the offset on big endian to account for

[PATCH 11/11] selftests/seccomp: Add powerpc support

2015-07-23 Thread Michael Ellerman
Wire up the syscall number and regs so the tests work on powerpc. Acked-by: Kees Cook keesc...@chromium.org Signed-off-by: Michael Ellerman m...@ellerman.id.au --- tools/testing/selftests/seccomp/seccomp_bpf.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git