[PATCH V4 1/5] dt-bindings: Add QorIQ TMU thermal bindings

2015-11-23 Thread Jia Hongtao
Add bindings documentation for TMU (Thermal Monitoring Unit) on QorIQ platform. Signed-off-by: Jia Hongtao Reviewed-by: Scott Wood --- .../devicetree/bindings/thermal/qoriq-thermal.txt | 63 ++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bi

[PATCH] cpufreq: qoriq: Register cooling device based on device tree

2015-11-23 Thread Jia Hongtao
Register the qoriq cpufreq driver as a cooling device, based on the thermal device tree framework. When temperature crosses the passive trip point cpufreq is used to throttle CPUs. Signed-off-by: Jia Hongtao Reviewed-by: Scott Wood --- This patch depends on following patches from Scott Wood: htt

[PATCH V4 0/5] TMU support for QorIQ platform

2015-11-23 Thread Jia Hongtao
This patchset add thermal management support to QorIQ platform including: - T1040/T1042. - T1023/T1024. - LS1021A. The thermal driver is updated to V4 based on Linux v4.4-rc2. CPU Cooling device registration is done by another patch which will send to both thermal and cpufreq maintainers. The pa

[PATCH V4 5/5] arm/ls1021a: Add TMU device tree support for LS1021A

2015-11-23 Thread Jia Hongtao
Also add nodes and properties for thermal management support. Signed-off-by: Jia Hongtao Reviewed-by: Scott Wood --- arch/arm/boot/dts/ls1021a.dtsi | 84 +- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/ar

[PATCH V4 2/5] thermal: qoriq: Add thermal management support

2015-11-23 Thread Jia Hongtao
This driver add thermal management support by enabling TMU (Thermal Monitoring Unit) on QorIQ platform. It's based on thermal of framework: - Trip points defined in device tree. - Cpufreq as cooling device registered in qoriq cpufreq driver. Signed-off-by: Jia Hongtao Reviewed-by: Scott Wood --

[PATCH V4 3/5] powerpc/mpc85xx: Add TMU device tree support for T1040/T1042

2015-11-23 Thread Jia Hongtao
Also add nodes and properties for thermal management support. Meanwhile preprocessor support is needed using thermal of framework. Signed-off-by: Jia Hongtao Reviewed-by: Scott Wood --- arch/powerpc/boot/dts/fsl/t1040d4rdb.dts| 2 +- arch/powerpc/boot/dts/fsl/t1040qds.dts | 2 +- arc

Re: [PATCH] cpufreq: qoriq: Register cooling device based on device tree

2015-11-23 Thread Viresh Kumar
On 24-11-15, 14:55, Jia Hongtao wrote: > + /* Register CPU cooling device for QorIQ platform */ > + for_each_node_with_property(cpu_np, "#cooling-cells") { > + of_property_read_u32(cpu_np, "reg", &cpu_id); > + cpufreq_get_policy(&cpu_policy, cpu_id); That's not the

[PATCH V3 3/3] ASoC: fsl_asrc: spba clock is needed by asrc device

2015-11-23 Thread Shengjiu Wang
ASRC need to enable the spba clock, when sdma is using share peripheral script. In this case, there is two spba master port is used, if don't enable the clock, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ASRC registers Signed-off-by: Shengjiu Wang ---

[PATCH V3 2/3] ASoC: fsl_spdif: spba clk is needed by spdif device

2015-11-23 Thread Shengjiu Wang
SPDIF need to enable the spba clock, when sdma is using share peripheral script. In this case, there is two spba master port is used, if don't enable the clock, the spba bus will have arbitration issue, which may cause read/write wrong data from/to SPDIF registers. Signed-off-by: Shengjiu Wang --

[PATCH V3 1/3] ASoC: fsl_esai: spba clock is needed by esai device

2015-11-23 Thread Shengjiu Wang
ESAI need to enable the spba clock, when sdma is using share peripheral script. In this case, there is two spba master port is used, if don't enable the clock, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ESAI registers. Signed-off-by: Shengjiu Wang ---

[PATCH V3 0/3] add spba clock for fsl audio IP

2015-11-23 Thread Shengjiu Wang
add spba clock for fsl audio IP Changes in V3 - update the comments for clock description. Shengjiu Wang (3): ASoC: fsl_esai: spba clock is needed by esai device ASoC: fsl_spdif: spba clk is needed by spdif device ASoC: fsl_asrc: spba clock is needed by asrc device Documentation/devicetre

[PATCH V4 4/5] powerpc/mpc85xx: Add TMU device tree support for T1023/T1024

2015-11-23 Thread Jia Hongtao
Also add nodes and properties for thermal management support. Meanwhile preprocessor support is needed using thermal of framework. Signed-off-by: Jia Hongtao Reviewed-by: Scott Wood --- arch/powerpc/boot/dts/fsl/t1023rdb.dts | 2 +- arch/powerpc/boot/dts/fsl/t1023si-post.dtsi | 86 +++

Re: [PATCH V5 00/31] powerpc/mm: Update page table format for book3s 64

2015-11-23 Thread Anshuman Khandual
On 11/23/2015 03:52 PM, Aneesh Kumar K.V wrote: > Hi All, > > This patch series attempt to update book3s 64 linux page table format to > make it more flexible. Our current pte format is very restrictive and we > overload multiple pte bits. This is due to the non-availability of free bits > in pte_

[PATCH V2] selfttest/powerpc: Add memory page migration tests

2015-11-23 Thread Anshuman Khandual
This adds two tests for memory page migration. One for normal page migration which works for both 4K or 64K base page size kernel and the other one is for 16MB huge page migration which will work both 4K or 64K base page sized 16MB huge pages as and when we support huge page migration. Signed-off-

[PATCH] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic

2015-11-23 Thread Russell Currey
On BMC machines, console output is controlled by the OPAL firmware and is only flushed when its pollers are called. When the kernel is in a panic state, it no longer calls these pollers and thus console output does not completely flush, causing some output from the panic to be lost. This patch ad

Re: [PATCH V5 00/31] powerpc/mm: Update page table format for book3s 64

2015-11-23 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Mon, 2015-11-23 at 15:52 +0530, Aneesh Kumar K.V wrote: >> This patch series attempt to update book3s 64 linux page table format to >> make it more flexible. Our current pte format is very restrictive and we >> overload multiple pte bits. This is due to the non

[PATCH 4/4] selftests/powerpc: Skip TM tests if we don't have TM

2015-11-23 Thread Michael Ellerman
Make the newly added TM tests skip if we don't have TM available, either because we're running on old hardware, or the kernel doesn't have TM support enabled. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/tm/Makefile | 8 +--- tools/testing/selftests/powerpc

[PATCH 3/4] selftests/powerpc: Move TM helpers into tm.h

2015-11-23 Thread Michael Ellerman
Move have_htm_nosc() into a new tm.h, and add a new helper, have_htm() which we'll use in the next patch. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/tm/tm-syscall.c | 12 + tools/testing/selftests/powerpc/tm/tm.h | 34 + 2 files ch

[PATCH 2/4] selftests/powerpc: Add have_hwcap2() helper

2015-11-23 Thread Michael Ellerman
We already do this twice and want to add another so add a helper. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/pmu/ebb/ebb.c | 3 +-- tools/testing/selftests/powerpc/tm/tm-syscall.c | 3 +-- tools/testing/selftests/powerpc/utils.h | 6 ++ 3 files changed, 8 i

[PATCH 1/4] selftests/powerpc: Move get_auxv_entry() into utils.c

2015-11-23 Thread Michael Ellerman
This doesn't really belong in harness.c, it's a helper function. So move it into utils.c. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/harness.c| 43 -- tools/testing/selftests/powerpc/pmu/Makefile | 2 + tools/testing/selftests/powerpc/pmu/ebb

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-23 Thread Mark Salter
On Mon, 2015-11-23 at 23:27 +0800, Ming Lei wrote: > On Mon, Nov 23, 2015 at 11:20 PM, Laurent Dufour > wrote: > > > > > > Reverting above commit on top if 4.4-rc1 seems to fix the problem for me. > > > > That's what I mentioned earlier ;) > > > > Now Ming send an additional patch with seems to

Re: [PATCH v7 27/50] powerpc/powernv: Dynamically release PEs

2015-11-23 Thread Alexey Kardashevskiy
On 11/24/2015 10:06 AM, Gavin Shan wrote: On Wed, Nov 18, 2015 at 01:23:05PM +1100, Alexey Kardashevskiy wrote: On 11/05/2015 12:12 AM, Gavin Shan wrote: This adds a reference count of PE, representing the number of PCI devices associated with the PE. The reference count is increased or decreas

Re: [PATCH v7 34/50] powerpc/pci: Delay populating pdn

2015-11-23 Thread Gavin Shan
On Wed, Nov 18, 2015 at 03:24:35PM +1100, Alexey Kardashevskiy wrote: >On 11/05/2015 12:12 AM, Gavin Shan wrote: >>The pdn (struct pci_dn) instances are allocated from memblock or >>bootmem when creating PCI controller (hoses) in setup_arch(). PCI >>hotplug, which will be supported by proceeding pa

Re: [PATCH V5 00/31] powerpc/mm: Update page table format for book3s 64

2015-11-23 Thread Benjamin Herrenschmidt
On Mon, 2015-11-23 at 15:52 +0530, Aneesh Kumar K.V wrote: > This patch series attempt to update book3s 64 linux page table format to > make it more flexible. Our current pte format is very restrictive and we > overload multiple pte bits. This is due to the non-availability of free bits > in pte_t.

Re: [PATCH v7 33/50] powerpc/pci: Export pci_traverse_device_nodes()

2015-11-23 Thread Gavin Shan
On Wed, Nov 18, 2015 at 02:14:59PM +1100, Alexey Kardashevskiy wrote: >On 11/05/2015 12:12 AM, Gavin Shan wrote: >>This renames traverse_pci_devices() to pci_traverse_device_nodes(). > >Why? pci_traverse_device_nodes() is not moved to some more generic header >where is would be required to have a s

Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.

2015-11-23 Thread Michael Ellerman
On Mon, 2015-11-23 at 11:53 +0530, Anshuman Khandual wrote: > On 11/19/2015 11:34 AM, Rashmica Gupta wrote: > > Most architectures use NR_syscalls as the #define for the number of > > syscalls. > > > > We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls. > > > > __NR_syscalls is

Re: [PATCH v7 50/50] PCI/hotplug: PowerPC PowerNV PCI hotplug driver

2015-11-23 Thread Gavin Shan
On Wed, Nov 18, 2015 at 06:33:08PM +1100, Alexey Kardashevskiy wrote: >On 11/05/2015 12:12 AM, Gavin Shan wrote: >>This adds standalone driver to support PCI hotplug for PowerPC PowerNV >>platform that runs on top of skiboot firmware. The firmware identifies >>hotpluggable slots and marked their de

Re: [PATCH v7 29/50] powerpc/pci: Rename pcibios_find_pci_bus()

2015-11-23 Thread Gavin Shan
On Wed, Nov 18, 2015 at 02:59:32PM +1100, Alexey Kardashevskiy wrote: >On 11/05/2015 12:12 AM, Gavin Shan wrote: >>This renames pcibios_find_pci_bus() to pci_find_bus_by_node() to >>avoid conflicts with those PCI subsystem weak function names, which >>have prefix "pcibios". No logical changes intro

Re: [PATCH v7 28/50] powerpc/pci: Rename pcibios_{add,remove}_pci_devices()

2015-11-23 Thread Gavin Shan
On Wed, Nov 18, 2015 at 01:43:06PM +1100, Alexey Kardashevskiy wrote: >On 11/05/2015 12:12 AM, Gavin Shan wrote: >>This renames pcibios_{add,remove}_pci_devices() to avoid conflicts >>with names of the weak functions in PCI subsystem, which have the >>prefix "pcibios". No logical changes introduced

Re: [PATCH v7 27/50] powerpc/powernv: Dynamically release PEs

2015-11-23 Thread Gavin Shan
On Wed, Nov 18, 2015 at 01:23:05PM +1100, Alexey Kardashevskiy wrote: >On 11/05/2015 12:12 AM, Gavin Shan wrote: >>This adds a reference count of PE, representing the number of PCI >>devices associated with the PE. The reference count is increased >>or decreased when PCI devices join or leave the P

Re: [PATCH v7 12/50] powerpc/powernv: Track M64 segment consumption

2015-11-23 Thread Gavin Shan
On Thu, Nov 19, 2015 at 11:10:42AM +1100, Alexey Kardashevskiy wrote: >On 11/17/2015 12:04 PM, Gavin Shan wrote: >>On Mon, Nov 16, 2015 at 07:01:59PM +1100, Alexey Kardashevskiy wrote: >>>On 11/05/2015 12:12 AM, Gavin Shan wrote: As we track M32 segment consumption, this introduces an array to

Re: linuxppc patchwork queue

2015-11-23 Thread Daniel Axtens
> The main thing you could do, and anyone could do (!), is just review some > patches. Even if you don't know the area of code that well, you can usually do > a basic review. > > eg. Just the basic stuff: > - Is the subject correctly formatted and makes sense. > - Is the change log well written a

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-23 Thread Ming Lei
On Mon, 23 Nov 2015 10:46:20 +0800 Ming Lei wrote: > Hi Mark, > > On Mon, Nov 23, 2015 at 9:50 AM, Mark Salter wrote: > > On Mon, 2015-11-23 at 08:36 +0800, Ming Lei wrote: > >> On Mon, Nov 23, 2015 at 7:20 AM, Mark Salter wrote: > >> > On Sun, 2015-11-22 at 00:56 +0800, Ming Lei wrote: > >> >

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-23 Thread Pratyush Anand
On 23/11/2015:02:57:19 PM, Laurent Dufour wrote: > On 23/11/2015 00:20, Mark Salter wrote: > > On Sun, 2015-11-22 at 00:56 +0800, Ming Lei wrote: > >> On Sat, 21 Nov 2015 12:30:14 +0100 > >> Laurent Dufour wrote: > >> > >>> On 20/11/2015 13:10, Michael Ellerman wrote: > On Thu, 2015-11-19 at

[PATCH v2, resend 1/6] powerpc/fadump: rename cpu_online_mask member of struct fadump_crash_info_header

2015-11-23 Thread Rasmus Villemoes
As preparation for eliminating the indirect access to the various global cpu_*_bits bitmaps via the pointer variables cpu_*_mask, rename the cpu_online_mask member of struct fadump_crash_info_header to simply online_mask, thus allowing cpu_online_mask to become a macro. Acked-by: Michael Ellerman

[PATCH v2, resend 0/6] kernel/cpu.c: eliminate some indirection

2015-11-23 Thread Rasmus Villemoes
Andrew, can I get you to take these through -mm? Noone else seems to want to pick them up. They're rebased on top of 4.4-rc2 (and applied cleanly), but otherwise identical to what I've sent previously. = v2: fix build failure on ppc, add acks. The four cpumasks cpu_{possible,online,present,a

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-23 Thread Laurent Dufour
On 23/11/2015 16:27, Ming Lei wrote: > On Mon, Nov 23, 2015 at 11:20 PM, Laurent Dufour > wrote: >>> >>> Reverting above commit on top if 4.4-rc1 seems to fix the problem for me. >> >> That's what I mentioned earlier ;) >> >> Now Ming send an additional patch with seems to fix the bug introduced >

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-23 Thread Ming Lei
On Mon, Nov 23, 2015 at 11:20 PM, Laurent Dufour wrote: >> >> Reverting above commit on top if 4.4-rc1 seems to fix the problem for me. > > That's what I mentioned earlier ;) > > Now Ming send an additional patch with seems to fix the bug introduced > through the commit bdced438acd8. When testing

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-23 Thread Laurent Dufour
On 23/11/2015 16:13, Pratyush Anand wrote: > On 23/11/2015:02:57:19 PM, Laurent Dufour wrote: >> On 23/11/2015 00:20, Mark Salter wrote: >>> On Sun, 2015-11-22 at 00:56 +0800, Ming Lei wrote: On Sat, 21 Nov 2015 12:30:14 +0100 Laurent Dufour wrote: > On 20/11/2015 13:10, Michael

powerpc/xmon: Add xmon command to dump process/task similar to ps(1)

2015-11-23 Thread Douglas Miller
Add 'P' command with optional task_struct address to dump all/one task's information: task pointer, kernel stack pointer, PID, PPID, state (interpreted), CPU where (last) running, and command. Introduce XMON_PROTECT macro to standardize memory-access-fault protection (setjm

[PATCH] powerpc/xmon: Add xmon command to dump process/task similar to ps(1)

2015-11-23 Thread Douglas Miller
Add 'P' command with optional task_struct address to dump all/one task's information: task pointer, kernel stack pointer, PID, PPID, state (interpreted), CPU where (last) running, and command. Introduce XMON_PROTECT macro to standardize memory-access-fault protection (setjmp). Initially used only

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-23 Thread Laurent Dufour
On 23/11/2015 00:20, Mark Salter wrote: > On Sun, 2015-11-22 at 00:56 +0800, Ming Lei wrote: >> On Sat, 21 Nov 2015 12:30:14 +0100 >> Laurent Dufour wrote: >> >>> On 20/11/2015 13:10, Michael Ellerman wrote: On Thu, 2015-11-19 at 00:23 -0800, Christoph Hellwig wrote: > It's pretty mu

Re: [PATCH v1 1/2] sata_dwc_460ex: move to generic DMA driver

2015-11-23 Thread Måns Rullgård
Andy Shevchenko writes: > On Sun, 2015-11-22 at 13:03 +, Måns Rullgård wrote: >> Andy Shevchenko writes: >> >> > The SATA implementation based on two actually different devices, >> > i.e. SATA and >> > DMA controllers. >> > >> > For Synopsys DesignWare DMA we have already a generic >> > im

Re: [PATCH v2 3/3] selftests/powerpc: Add TM signal with invalid stack test

2015-11-23 Thread Anshuman Khandual
On 11/20/2015 09:45 AM, Michael Neuling wrote: > Test the kernels signal generation code to ensure it can handle an > invalid stack pointer when transactional. > > Signed-off-by: Michael Neuling Tested-by: Anshuman Khandual ___ Linuxppc-dev mailing l

Re: [PATCH v2 2/3] selftests/powerpc: Add TM signal return test

2015-11-23 Thread Anshuman Khandual
On 11/20/2015 09:45 AM, Michael Neuling wrote: > Test the kernel's signal return code to ensure that it doesn't crash > when both the transactional and suspend MSR bits are set in the signal > context. > > Signed-off-by: Michael Neuling Tested-by: Anshuman Khandual

[PATCH V2 10/10] powerpc/mm: Optmize the hashed subpage iteration

2015-11-23 Thread Aneesh Kumar K.V
If we have _PAGE_COMBO set, we override the _PAGE_F_GIX_SHIFT and _PAGE_F_SECOND. Together we have 4 bits, each of them used to indicate whether any of the 4 4k subpage in that group is valid. ie, [ group 1 bit ] [ group 2 bit ] . [ group 4 ] [ subpage 1 - 4] [ subpage 5- 8] . [ subpa

[PATCH V2 09/10] powerpc/mm: Drop real_pte_t usage

2015-11-23 Thread Aneesh Kumar K.V
Now that we don't track 4k subpage slot details, get rid of real_pte Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h| 15 +++ arch/powerpc/include/asm/book3s/64/pgtable.h | 33 ++-- arch/powerpc/include/asm/nohash/64/pgtable-6

[PATCH V2 08/10] powerpc/mm: Update pte_iterate_hashed_subpages args

2015-11-23 Thread Aneesh Kumar K.V
Now that we don't really use real_pte_t drop them from iterator argument list. The follow up patch will remove real_pte_t completely Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 5 +++-- arch/powerpc/include/asm/book3s/64/pgtable.h | 7 +++ arch/powe

[PATCH V2 07/10] powerpc/mm: update PTE frag size

2015-11-23 Thread Aneesh Kumar K.V
Now that we don't track 4k subpage information we can use 2K PTE fragments. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/in

[PATCH V2 06/10] powerpc/mm: Don't track 4k subpage information with 64k linux page size

2015-11-23 Thread Aneesh Kumar K.V
We search the hash table to find the slot information. This slows down the lookup, but we do that only for 4k subpage config Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 33 ++ arch/powerpc/include/asm/book3s/64/pgtable.h | 11 +- arch/

[PATCH V2 05/10] powerpc/mm: Use H_READ with H_READ_4

2015-11-23 Thread Aneesh Kumar K.V
This will bulk read 4 hash pte slot entries and should reduce the loop Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/plpar_wrappers.h | 17 ++ arch/powerpc/platforms/pseries/lpar.c | 54 +++ 2 files changed, 44 insertions(+), 27 deletions(-)

[PATCH V2 04/10] powerpc/nohash: we don't use real_pte_t for nohash

2015-11-23 Thread Aneesh Kumar K.V
Remove the related functions and #defines Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/nohash/64/pgtable.h | 33 1 file changed, 33 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h

[PATCH V2 03/10] powerpc/nohash: Update 64K nohash config to have 32 pte fragement

2015-11-23 Thread Aneesh Kumar K.V
They don't need to track 4k subpage slot details and hence don't need second half of pgtable_t. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/nohash/64/pgtable-64k.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/64/pgtabl

[PATCH V2 02/10] powerpc/mm: Don't hardcode the hash pte slot shift

2015-11-23 Thread Aneesh Kumar K.V
Use the #define instead of open-coding the same Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +- arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)

[PATCH V2 01/10] powerpc/mm: Don't hardcode page table size

2015-11-23 Thread Aneesh Kumar K.V
pte and pmd table size are dependent on config items. Don't hard code the same. This make sure we use the right value when masking pmd entries and also while checking pmd_bad Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h| 30 ++-- arch/

[PATCH V2 00/10] Reduce the pte framgment size.

2015-11-23 Thread Aneesh Kumar K.V
Hi, This patch series update 4k subpage tracking in pte page, thereby reducing the ptefragment size. This results in us allocating less number of pgtable_t for an application. One of the side effect is that we now make and hcall to find out whether a 4k subpage is present in the hash page table or

[PATCH V5 31/31] powerpc/mm: Add a _PAGE_PTE bit

2015-11-23 Thread Aneesh Kumar K.V
For a pte entry we will have _PAGE_PTE set. Our pte page address have a minimum alignment requirement of HUGEPD_SHIFT_MASK + 1. We use the lower 7 bits to indicate hugepd. ie. For pmd and pgd we can find: 1) _PAGE_PTE set pte -> indicate PTE 2) bits [2..6] non zero -> indicate hugepd. They also

[PATCH V5 30/31] powerpc/mm: Move THP headers around

2015-11-23 Thread Aneesh Kumar K.V
We support THP only with book3s_64 and 64K page size. Move THP details to hash64-64k.h to clarify the same. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 126 + arch/powerpc/include/asm/book3s/64/hash.h | 223 +--

[PATCH V5 29/31] powerpc/mm: Move hugetlb related headers

2015-11-23 Thread Aneesh Kumar K.V
W.r.t hugetlb, we support two format for pmd. With book3s_64 and 64K linux page size, we can have pte at the pmd level. Hence we don't need to support hugepd there. For everything else hugepd is supported and pmd_huge is (0). Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc

[PATCH V5 28/31] powerpc/mm: Move WIMG update to helper.

2015-11-23 Thread Aneesh Kumar K.V
Only difference here is, we apply the WIMG mapping early, so rflags passed to updatepp will also be changed. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/hash64_4k.c | 5 - arch/powerpc/mm/hash64_64k.c | 10 -- arch/powerpc/mm/hash_utils

[PATCH V5 27/31] powerpc/mm: Add helper for converting pte bit to hpte bits

2015-11-23 Thread Aneesh Kumar K.V
Instead of open coding it in multiple code paths, export the helper and add more documentation. Also make sure we don't make assumption regarding pte bit position Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/mm/hash64_4k

[PATCH V5 26/31] powerpc/mm: Remove the dependency on pte bit position in asm code

2015-11-23 Thread Aneesh Kumar K.V
We should not expect pte bit position in asm code. Simply by moving part of that to C Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/exceptions-64s.S | 16 +++- arch/powerpc/mm/hash_utils_64.c | 29 + 2 files changed, 32

[PATCH V5 25/31] powerpc/mm: Convert 4k insert from asm to C

2015-11-23 Thread Aneesh Kumar K.V
This is similar to 64K insert. May be we want to consolidate Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/Makefile| 6 +- arch/powerpc/mm/hash64_4k.c | 139 + arch/powerpc/mm/hash_low_64.S | 331

[PATCH V5 24/31] powerpc/mm: Convert __hash_page_64K to C

2015-11-23 Thread Aneesh Kumar K.V
Convert from asm to C Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 3 +- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/mm/hash64_64k.c | 134 +++- arch/powerpc/mm/hash_low_64.S

[PATCH V5 23/31] powerpc/mm: Increase the width of #define

2015-11-23 Thread Aneesh Kumar K.V
No real change, only style changes Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/includ

[PATCH V5 22/31] powerpc/mm: Don't track subpage valid bit in pte_t

2015-11-23 Thread Aneesh Kumar K.V
This free up 11 bits in pte_t. In the later patch we also change the pte_t format so that we can start supporting migration pte at pmd level. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 10 + arch/powerpc/include/asm/book3s/64

[PATCH V5 21/31] powerpc/mm: make pte page hash index slot 8 bits

2015-11-23 Thread Aneesh Kumar K.V
Currently we use 4 bits for each slot and pack all the 16 slot information related to a 64K linux page in a 64bit value. To do this we use 16 bits of pte_t. Move the hash slot valid bit out of pte_t and place them in the second half of pte page. We also use 8 bit per each slot. Acked-by: Scott Woo

[PATCH V5 20/31] powerpc/mm: update __real_pte to take address as argument

2015-11-23 Thread Aneesh Kumar K.V
We will use this in the later patch to compute the right hash index Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ++-- arch/powerpc/include/asm/nohash/64/pgtable.h | 4 ++-- arch

[PATCH V5 19/31] powerpc/mm: Convert 4k hash insert to C

2015-11-23 Thread Aneesh Kumar K.V
Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/Makefile| 3 + arch/powerpc/mm/hash64_64k.c| 202 + arch/powerpc/mm/hash_low_64.S | 380 arch/powerpc/mm/hash_utils_64.c | 4 +- 4 files changed

[PATCH V5 18/31] powerpc/mm: Increase the pte frag size.

2015-11-23 Thread Aneesh Kumar K.V
We will use the increased size to store more information of 4K pte when using 64K page size. The idea is to free up bits in pte_t. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pgalloc-64.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) d

[PATCH V5 17/31] powerpc/booke: Move nohash headers (part 5)

2015-11-23 Thread Aneesh Kumar K.V
Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/nohash/32/pte-40x.h | 6 +++--- arch/powerpc/include/asm/nohash/32/pte-44x.h | 6 +++--- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 6 +++--- arch/powerpc/include/asm/nohash/32/pte-fsl-booke.h

[PATCH V5 16/31] powerpc/booke: Move nohash headers (part 4)

2015-11-23 Thread Aneesh Kumar K.V
Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/nohash/32/pgtable.h | 16 arch/powerpc/include/asm/{ => nohash/32}/pte-40x.h | 0 arch/powerpc/include/asm/{ => nohash/32}/pte-44x.h | 0 arch/powerpc/include/asm/{ => noh

[PATCH V5 14/31] powerpc/booke: Move nohash headers (part 2)

2015-11-23 Thread Aneesh Kumar K.V
Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/{pgtable-ppc32.h => nohash/32/pgtable.h} | 0 arch/powerpc/include/asm/{pgtable-ppc64.h => nohash/64/pgtable.h} | 2 +- arch/powerpc/include/asm/nohash/pgtable.h | 8 3 files change

[PATCH V5 15/31] powerpc/booke: Move nohash headers (part 3)

2015-11-23 Thread Aneesh Kumar K.V
Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- .../include/asm/{pgtable-ppc64-4k.h => nohash/64/pgtable-4k.h} | 0 .../asm/{pgtable-ppc64-64k.h => nohash/64/pgtable-64k.h} | 0 arch/powerpc/include/asm/nohash/64/pgtable.h | 10 +- 3 files changed, 5 in

[PATCH V5 13/31] powerpc/booke: Move nohash headers (part 1)

2015-11-23 Thread Aneesh Kumar K.V
Move the booke related headers below booke/32 or booke/64 We are splitting this change into multiple patch to make the rebasing easier. The following patches can be folded into this if needed. They are kept separate for easier review. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- ar

[PATCH V5 11/31] powerpc/mm: Move hash64 PTE bits from book3s/64/pgtable.h to hash.h

2015-11-23 Thread Aneesh Kumar K.V
This enables us to keep hash64 related bits together, and makes it easy to follow. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h| 450 ++- arch/powerpc/include/asm/book3s/64/pgtable.h | 447 +---

[PATCH V5 12/31] powerpc/mm: Move PTE bits from generic functions to hash64 functions.

2015-11-23 Thread Aneesh Kumar K.V
functions which operate on pte bits are moved to hash*.h and other generic functions are moved to pgtable.h Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/pgtable.h | 183 arch/powerpc/include/asm/book3s/64/hash.h| 151 ++

[PATCH V5 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-11-23 Thread Aneesh Kumar K.V
We convert them static inline function here as we did with pte_val in the previous patch Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/pgtable.h | 6 - arch/powerpc/include/asm/book3s/64/hash-4k.h | 6 - arch/powerpc/include/asm/book3s/64/

[PATCH V5 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-11-23 Thread Aneesh Kumar K.V
We also convert few #define to static inline in this patch for better type checking Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/pgtable.h | 118 +- arch/powerpc/include/asm/page.h | 10 ++- arch/powerpc/include/

[PATCH V5 08/31] powerpc/mm: Drop pte-common.h from BOOK3S 64

2015-11-23 Thread Aneesh Kumar K.V
We copy only needed PTE bits define from pte-common.h to respective hash related header. This should greatly simply later patches in which we are going to change the pte format for hash config Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-4k.h

[PATCH V5 07/31] powerpc/mm: Don't have generic headers introduce functions touching pte bits

2015-11-23 Thread Aneesh Kumar K.V
We are going to drop pte_common.h in the later patch. The idea is to enable hash code not require to define all PTE bits. Having PTE bits defined in pte_common.h made the code unnecessarily complex. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/pgtable

[PATCH V5 06/31] powerpc/mm: Delete booke bits from book3s

2015-11-23 Thread Aneesh Kumar K.V
We also move __ASSEMBLY__ towards the end of header. This avoid having #ifndef __ASSEMBLY___ all over the header Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/pgtable.h | 93 +++- arch/powerpc/include/asm/book3s/64/pgtable.h

[PATCH V5 05/31] powerpc/mm: Move hash specific pte width and other defines to book3s

2015-11-23 Thread Aneesh Kumar K.V
This further make a copy of pte defines to book3s/64/hash*.h. This remove the dependency on ppc64-4k.h and ppc64-64k.h Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 87 ++- arch/powerpc/include/asm/book3s/64/hash

[PATCH V5 04/31] powerpc/mm: make a separate copy for book3s (part 2)

2015-11-23 Thread Aneesh Kumar K.V
Keep it seperate to make rebasing easier Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/pgtable.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgtable.h | 6 +++--- arch/powerpc/include/asm/pgtable-ppc32.h | 2 -- arch/powerpc/include/asm/pgtable

[PATCH V5 03/31] powerpc/mm: make a separate copy for book3s

2015-11-23 Thread Aneesh Kumar K.V
In this patch we do: cp pgtable-ppc32.h book3s/32/pgtable.h cp pgtable-ppc64.h book3s/64/pgtable.h This enable us to do further changes to hash specific config. We will change the page table format for 64bit hash in later patches. Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/p

[PATCH V5 02/31] powerpc/mm: move pte headers to book3s directory (part 2)

2015-11-23 Thread Aneesh Kumar K.V
Splitting this so that rename can track changes to file. Before merging we will fold this Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/hash.h | 6 +++--- .../include/asm/{pte-hash64-4k.h => book3s/64/hash-4k.h} | 1 - .

[PATCH V5 01/31] powerpc/mm: move pte headers to book3s directory

2015-11-23 Thread Aneesh Kumar K.V
Acked-by: Scott Wood Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/{pte-hash32.h => book3s/32/hash.h} | 0 arch/powerpc/include/asm/{pte-hash64.h => book3s/64/hash.h} | 0 arch/powerpc/include/asm/pgtable-ppc32.h| 2 +- arch/powerpc/include/asm/pgtable-ppc64.h

[PATCH V5 00/31] powerpc/mm: Update page table format for book3s 64

2015-11-23 Thread Aneesh Kumar K.V
Hi All, This patch series attempt to update book3s 64 linux page table format to make it more flexible. Our current pte format is very restrictive and we overload multiple pte bits. This is due to the non-availability of free bits in pte_t. We use pte_t to track the validity of 4K subpages. This p

Re: [PATCH] powerpc: Add rN aliases to the pt_regs_offset table.

2015-11-23 Thread Michael Ellerman
On Mon, 2015-11-23 at 13:54 +0530, Anshuman Khandual wrote: > On 11/21/2015 11:38 AM, Rashmica Gupta wrote: > > It is common practice with powerpc to use 'rN' to refer to register 'N'. > > However > > when using the pt_regs_offset table we have to use 'gprN'. > > > > So add aliases such that bo

Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.

2015-11-23 Thread Michael Ellerman
On Mon, 2015-11-23 at 12:28 +0300, Denis Kirjanov wrote: > On 11/23/15, Michael Ellerman wrote: > > On Thu, 2015-11-19 at 12:15 +0300, Denis Kirjanov wrote: > > > On 11/19/15, Rashmica Gupta wrote: > > > > Most architectures use NR_syscalls as the #define for the number of > > > > syscalls. > > >

Re: linuxppc patchwork queue

2015-11-23 Thread Michael Ellerman
On Mon, 2015-11-23 at 12:45 +0300, Denis Kirjanov wrote: > On 11/23/15, Michael Ellerman wrote: > > Hi Denis, > > > > On Fri, 2015-11-20 at 17:48 +0300, Denis Kirjanov wrote: > > > Hi guys, > > > > > > As we all know we have a great tool to track the patch queue - patchwork. > > > The sad thing

Re: [PATCH v1 1/2] sata_dwc_460ex: move to generic DMA driver

2015-11-23 Thread Andy Shevchenko
On Sun, 2015-11-22 at 13:03 +, Måns Rullgård wrote: > Andy Shevchenko writes: > > > The SATA implementation based on two actually different devices, > > i.e. SATA and > > DMA controllers. > > > > For Synopsys DesignWare DMA we have already a generic > > implementation of the > > driver. Thus

Re: linuxppc patchwork queue

2015-11-23 Thread Denis Kirjanov
On 11/23/15, Michael Ellerman wrote: > Hi Denis, > > On Fri, 2015-11-20 at 17:48 +0300, Denis Kirjanov wrote: >> Hi guys, >> >> As we all know we have a great tool to track the patch queue - patchwork. >> The sad thing is that it's maintained not good as it could be. The >> netdev patchwork is a g

Re: [PATCH] powerpc: tracing: don't trace hcalls on offline CPUs

2015-11-23 Thread Denis Kirjanov
On 11/23/15, Michael Ellerman wrote: > On Fri, 2015-11-20 at 15:22 +0300, Denis Kirjanov wrote: >> On 11/3/15, Denis Kirjanov wrote: >> > On 11/3/15, Michael Ellerman wrote: >> > > On Thu, 2015-10-29 at 22:10 +0300, Denis Kirjanov wrote: >> > > > ./drmgr -c cpu -a -r gives the following warning:

Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.

2015-11-23 Thread Denis Kirjanov
On 11/23/15, Michael Ellerman wrote: > On Thu, 2015-11-19 at 12:15 +0300, Denis Kirjanov wrote: > >> On 11/19/15, Rashmica Gupta wrote: > >> > Most architectures use NR_syscalls as the #define for the number of >> > syscalls. >> > >> > We use __NR_syscalls, and then define NR_syscalls as __NR_sys

Re: [PATCH] leds: powernv: Implement brightness_set_blocking op

2015-11-23 Thread Vasant Hegde
On 11/20/2015 09:11 PM, Jacek Anaszewski wrote: > Since brightness setting can sleep for this driver, implement > brightness_set_blocking op, instead of brightness_set. > It makes this driver compatible with LED triggers. Hello Jacek, Thanks for the patch. Looks good.. I will test this patch lat

Re: [PATCH] powerpc: Add rN aliases to the pt_regs_offset table.

2015-11-23 Thread Anshuman Khandual
On 11/21/2015 11:38 AM, Rashmica Gupta wrote: > It is common practice with powerpc to use 'rN' to refer to register 'N'. > However > when using the pt_regs_offset table we have to use 'gprN'. > > So add aliases such that both 'rN' and 'gprN' can be used. > > For example, we can currently do: > $