Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required

2018-07-24 Thread Baoquan He
On 07/23/18 at 04:34pm, Michal Hocko wrote: > On Thu 19-07-18 23:17:53, Baoquan He wrote: > > Kexec has been a formal feature in our distro, and customers owning > > those kind of very large machine can make use of this feature to speed > > up the reboot process. On uefi machine, the kexec_file loa

[PATCH v4 1/1] KVM: PPC: Book3S HV: pack VCORE IDs to access full VCPU ID space

2018-07-24 Thread Sam Bobroff
From: Sam Bobroff It is not currently possible to create the full number of possible VCPUs (KVM_MAX_VCPUS) on Power9 with KVM-HV when the guest uses less threads per core than it's core stride (or "VSMT mode"). This is because the VCORE ID and XIVE offsets to grow beyond KVM_MAX_VCPUS even though

Re: [PATCH v3 1/1] KVM: PPC: Book3S HV: pack VCORE IDs to access full VCPU ID space

2018-07-24 Thread Sam Bobroff
On Mon, Jul 23, 2018 at 03:43:37PM +1000, Paul Mackerras wrote: > On Thu, Jul 19, 2018 at 12:25:10PM +1000, Sam Bobroff wrote: > > From: Sam Bobroff > > > > It is not currently possible to create the full number of possible > > VCPUs (KVM_MAX_VCPUS) on Power9 with KVM-HV when the guest uses less

Re: [RFC 4/4] virtio: Add platform specific DMA API translation for virito devices

2018-07-24 Thread Anshuman Khandual
On 07/23/2018 07:46 AM, Anshuman Khandual wrote: > On 07/20/2018 06:45 PM, Michael S. Tsirkin wrote: >> On Fri, Jul 20, 2018 at 09:29:41AM +0530, Anshuman Khandual wrote: >>> Subject: Re: [RFC 4/4] virtio: Add platform specific DMA API translation for >>> virito devices >> >> s/virito/virtio/ > >

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Michael Ellerman
Arnd Bergmann writes: > Almost all files in the kernel are either plain text or UTF-8 > encoded. A couple however are ISO_8859-1, usually just a few > characters in a C comments, for historic reasons. > > This converts them all to UTF-8 for consistency. > > Signed-off-by: Arnd Bergmann > --- ...

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-24 Thread Anshuman Khandual
On 07/23/2018 02:38 PM, Michael S. Tsirkin wrote: > On Mon, Jul 23, 2018 at 11:58:23AM +0530, Anshuman Khandual wrote: >> On 07/20/2018 06:46 PM, Michael S. Tsirkin wrote: >>> On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: This patch series is the follow up on the discussio

Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required

2018-07-24 Thread Baoquan He
Hi Andrew, On 07/19/18 at 12:44pm, Andrew Morton wrote: > On Thu, 19 Jul 2018 23:17:53 +0800 Baoquan He wrote: > > > As far as I can tell, the above is the whole reason for the patchset, > > > yes? To avoid confusing users. > > > > > > In fact, it's not just trying to avoid confusing users. Ke

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Andrew Morton
On Tue, 24 Jul 2018 17:13:20 -0700 Joe Perches wrote: > On Tue, 2018-07-24 at 14:00 -0700, Andrew Morton wrote: > > On Tue, 24 Jul 2018 13:13:25 +0200 Arnd Bergmann wrote: > > > Almost all files in the kernel are either plain text or UTF-8 > > > encoded. A couple however are ISO_8859-1, usually

Re: [PATCH v4 00/11] hugetlb: Factorize hugetlb architecture primitives

2018-07-24 Thread Paul Burton
Hi Alexandre, On Thu, Jul 05, 2018 at 11:07:05AM +, Alexandre Ghiti wrote: > In order to reduce copy/paste of functions across architectures and then > make riscv hugetlb port (and future ports) simpler and smaller, this > patchset intends to factorize the numerous hugetlb primitives that are

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Joe Perches
On Tue, 2018-07-24 at 14:00 -0700, Andrew Morton wrote: > On Tue, 24 Jul 2018 13:13:25 +0200 Arnd Bergmann wrote: > > Almost all files in the kernel are either plain text or UTF-8 > > encoded. A couple however are ISO_8859-1, usually just a few > > characters in a C comments, for historic reasons.

Re: [PATCH v11 19/26] mm: provide speculative fault infrastructure

2018-07-24 Thread zhong jiang
On 2018/5/17 19:06, Laurent Dufour wrote: > From: Peter Zijlstra > > Provide infrastructure to do a speculative fault (not holding > mmap_sem). > > The not holding of mmap_sem means we can race against VMA > change/removal and page-table destruction. We use the SRCU VMA freeing > to keep the VMA a

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Jonathan Cameron
On Tue, 24 Jul 2018 13:13:25 +0200 Arnd Bergmann wrote: > Almost all files in the kernel are either plain text or UTF-8 > encoded. A couple however are ISO_8859-1, usually just a few > characters in a C comments, for historic reasons. > > This converts them all to UTF-8 for consistency. > > Sig

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Randy Dunlap
On 07/24/2018 02:00 PM, Andrew Morton wrote: > On Tue, 24 Jul 2018 13:13:25 +0200 Arnd Bergmann wrote: > >> Almost all files in the kernel are either plain text or UTF-8 >> encoded. A couple however are ISO_8859-1, usually just a few >> characters in a C comments, for historic reasons. >> >> This

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Andrew Morton
On Tue, 24 Jul 2018 13:13:25 +0200 Arnd Bergmann wrote: > Almost all files in the kernel are either plain text or UTF-8 > encoded. A couple however are ISO_8859-1, usually just a few > characters in a C comments, for historic reasons. > > This converts them all to UTF-8 for consistency. Was "co

Re: [PATCH v07 6/9] pmt/numa: Disable arch_update_cpu_topology during CPU readd

2018-07-24 Thread Nathan Fontenot
On 07/13/2018 03:18 PM, Michael Bringmann wrote: pmt/numa: Disable arch_update_cpu_topology during post migration CPU readd updates when evaluating device-tree changes after LPM to avoid thread deadlocks trying to update node assignments. System timing between all of the threads and timers restar

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Simon Horman
On Tue, Jul 24, 2018 at 01:13:25PM +0200, Arnd Bergmann wrote: > Almost all files in the kernel are either plain text or UTF-8 > encoded. A couple however are ISO_8859-1, usually just a few > characters in a C comments, for historic reasons. > > This converts them all to UTF-8 for consistency. >

[PATCH 7/7] powerpc/traps: Show instructions on exceptions

2018-07-24 Thread Murilo Opsfelder Araujo
Move show_instructions() declaration to arch/powerpc/include/asm/stacktrace.h and include asm/stracktrace.h in arch/powerpc/kernel/process.c, which contains the implementation. Modify show_instructions() not to call __kernel_text_address(), allowing userspace instruction dump. probe_kernel_addres

[PATCH 6/7] powerpc/traps: Print signal name for unhandled signals

2018-07-24 Thread Murilo Opsfelder Araujo
This adds a human-readable name in the unhandled signal message. Before this patch, a page fault looked like: Jul 11 16:04:11 localhost kernel: pandafault[6303]: unhandled signal 11 at 17d0 nip 161c lr 7fff93c55100 code 2 in pandafault[1000+1] After this

[PATCH 5/7] powerpc/traps: Print VMA for unhandled signals

2018-07-24 Thread Murilo Opsfelder Araujo
This adds VMA address in the message printed for unhandled signals, similarly to what other architectures, like x86, print. Before this patch, a page fault looked like: Jul 11 15:56:25 localhost kernel: pandafault[61470]: unhandled signal 11 at 17d0 nip 161c lr 7f

[PATCH 4/7] powerpc/traps: Use REG_FMT in show_signal_msg()

2018-07-24 Thread Murilo Opsfelder Araujo
Simplify the message format by using REG_FMT as the register format. This avoids having two different formats and avoids checking for MSR_64BIT. Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/kernel/traps.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git

[PATCH 3/7] powerpc/reg: Add REG_FMT definition

2018-07-24 Thread Murilo Opsfelder Araujo
Make REG definition, in arch/powerpc/kernel/process.c, generic enough by renaming it to REG_FMT and placing it in arch/powerpc/include/asm/reg.h to be used elsewhere. Replace occurrences of REG by REG_FMT in arch/powerpc/kernel/process.c. Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/

[PATCH 2/7] powerpc/traps: Return early in show_signal_msg()

2018-07-24 Thread Murilo Opsfelder Araujo
Modify logic of show_signal_msg() to return early, if possible. Replace printk_ratelimited() by printk() and a default rate limit burst to limit displaying unhandled signals messages. Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/kernel/traps.c | 21 +++-- 1 file chang

[PATCH 1/7] powerpc/traps: Print unhandled signals in a separate function

2018-07-24 Thread Murilo Opsfelder Araujo
Isolate the logic of printing unhandled signals out of _exception_pkey(). No functional change, only code rearrangement. Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/kernel/traps.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/arch/p

[PATCH 0/7] powerpc: Modernize unhandled signals message

2018-07-24 Thread Murilo Opsfelder Araujo
Hi, everyone. This series was inspired by the need to modernize and display more informative messages about unhandled signals. The "unhandled signal NN" is not very informative. We thought it would be helpful adding a human-readable message describing what the signal number means, printing the V

Re: [PATCH 4/7] x86,tlb: make lazy TLB mode lazier

2018-07-24 Thread Will Deacon
Hi Andy, Sorry, I missed the arm64 question at the end of this... On Thu, Jul 19, 2018 at 10:04:09AM -0700, Andy Lutomirski wrote: > On Thu, Jul 19, 2018 at 9:45 AM, Andy Lutomirski wrote: > > [I added PeterZ and Vitaly -- can you see any way in which this would > > break something obscure? I d

Re: [PATCH v11 19/26] mm: provide speculative fault infrastructure

2018-07-24 Thread Laurent Dufour
On 24/07/2018 16:26, zhong jiang wrote: > On 2018/5/17 19:06, Laurent Dufour wrote: >> From: Peter Zijlstra >> >> Provide infrastructure to do a speculative fault (not holding >> mmap_sem). >> >> The not holding of mmap_sem means we can race against VMA >> change/removal and page-table destruct

RE: [PATCH] net: ethernet: fs-enet: Use generic CRC32 implementation

2018-07-24 Thread David Laight
From: Krzysztof Kozlowski > Sent: 23 July 2018 17:20 > Use generic kernel CRC32 implementation because it: > 1. Should be faster (uses lookup tables), Are you sure? The lookup tables are unlikely to be in the data cache and the 6 cache misses kill performance. (Not that it particularly matters whe

RE: [PATCH] net: ethernet: fs-enet: Use generic CRC32 implementation

2018-07-24 Thread David Laight
From: Krzysztof Kozlowski > Sent: 24 July 2018 12:12 ... > >> Not tested on hardware. > > > > Have you verified that the old and new functions give the > > same result for a few mac addresses? > > It is very easy to use the wrong bits in crc calculations > > or generate the output in the wrong bit

[PATCH] powerpc: Add a checkpatch wrapper with our preferred settings

2018-07-24 Thread Michael Ellerman
This makes it easy to run checkpatch with settings that we have agreed on (bwhahahahah). Usage is eg: $ ./arch/powerpc/tools/checkpatch.sh -g origin/master.. To check all commits since origin/master. Signed-off-by: Michael Ellerman --- arch/powerpc/tools/checkpatch.sh | 21 +

Re: [v3, 1/9] powerpc/pkeys: Give all threads control of their key permissions

2018-07-24 Thread Michael Ellerman
On Tue, 2018-07-17 at 13:51:02 UTC, Ram Pai wrote: > Currently in a multithreaded application, a key allocated by one > thread is not usable by other threads. By "not usable" we mean that > other threads are unable to change the access permissions for that > key for themselves. > > When a new key

Re: [1/2] powerpc: Add ppc32_allmodconfig defconfig target

2018-07-24 Thread Michael Ellerman
On Mon, 2018-07-09 at 14:24:25 UTC, Michael Ellerman wrote: > Because the allmodconfig logic just sets every symbol to M or Y, it > has the effect of always generating a 64-bit config, because > CONFIG_PPC64 becomes Y. > > So to make it easier for folks to test 32-bit code, provide a phony > defco

Re: powerpc64s: Show ori31 availability in spectre_v1 sysfs file not v2

2018-07-24 Thread Michael Ellerman
On Mon, 2018-07-09 at 06:25:21 UTC, Michael Ellerman wrote: > When I added the spectre_v2 information in sysfs, I included the > availability of the ori31 speculation barrier. > > Although the ori31 barrier can be used to mitigate v2, it's primarily > intended as a spectre v1 mitigation. Spectre v

Re: powerpc/mm/hash: Improve error reporting on HCALL failures

2018-07-24 Thread Michael Ellerman
On Fri, 2018-06-29 at 08:39:04 UTC, "Aneesh Kumar K.V" wrote: > This patch adds error reporting to H_ENTER and H_READ hcalls. A failure for > both these hcalls are mostly fatal and it would be good to log the failure > reason. > > We also switch printk to pr_* > > Signed-off-by: Aneesh Kumar K.V

Re: [1/3] powerpc/mm/hash: Remove the superfluous bitwise operation when find hpte group

2018-07-24 Thread Michael Ellerman
On Fri, 2018-06-29 at 08:36:29 UTC, "Aneesh Kumar K.V" wrote: > From: "Aneesh Kumar K.V" > > When computing the starting slot number for a hash page table group we used > to do this > hpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL; > > Multiplying with 8 (HPTES_PER_GROUP) impl

Re: [1/2] powerpc/mm: Check memblock_add against MAX_PHYSMEM_BITS range

2018-07-24 Thread Michael Ellerman
On Thu, 2018-06-21 at 08:31:57 UTC, "Aneesh Kumar K.V" wrote: > With SPARSEMEM config enabled, we make sure that we don't add sections beyond > MAX_PHYSMEM_BITS range. This results in not building vmemmap mapping for > range beyond max range. But our memblock layer looks the device tree and > crea

Re: [v8, 1/5] powerpc/64: Align bytes before fall back to .Lshort in powerpc64 memcmp()

2018-07-24 Thread Michael Ellerman
On Thu, 2018-06-07 at 01:57:51 UTC, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > Currently memcmp() 64bytes version in powerpc will fall back to .Lshort > (compare per byte mode) if either src or dst address is not 8 bytes aligned. > It can be opmitized in 2 situations: > > 1) if both ad

Re: [v2] powerpc/64s: make PACA_IRQ_HARD_DIS track MSR[EE] closely

2018-07-24 Thread Michael Ellerman
On Sun, 2018-06-03 at 12:24:32 UTC, Nicholas Piggin wrote: > When the masked interrupt handler clears MSR[EE] for an interrupt in > the PACA_IRQ_MUST_HARD_MASK set, it does not set PACA_IRQ_HARD_DIS. > This makes them get out of synch. > > With that taken into account, it's only low level irq mani

Re: [01/15] powerpc/powernv: opal_put_chars partial write fix

2018-07-24 Thread Michael Ellerman
On Mon, 2018-04-30 at 14:55:44 UTC, Nicholas Piggin wrote: > The intention here is to consume and discard the remaining buffer > upon error. This works if there has not been a previous partial write. > If there has been, then total_len is no longer total number of bytes > to copy. total_len is alwa

Re: [v2] powerpc: NMI IPI make NMI IPIs fully sychronous

2018-07-24 Thread Michael Ellerman
On Wed, 2018-04-25 at 05:17:59 UTC, Nicholas Piggin wrote: > There is an asynchronous aspect to smp_send_nmi_ipi. The caller waits > for all CPUs to call in to the handler, but it does not wait for > completion of the handler. This is a needless complication, so remove > it and always wait synchron

Re: powerpc/tm: Update function prototype comment

2018-07-24 Thread Michael Ellerman
On Mon, 2018-02-05 at 05:17:16 UTC, Cyril Bur wrote: > In commit eb5c3f1c8647 ("powerpc: Always save/restore checkpointed regs > during treclaim/trecheckpoint") __tm_recheckpoint was modified to no > longer take the second parameter 'unsigned long orig_msr' as part of a > TM rewrite to simplify the

Re: powerpc/tm: Remove struct thread_info param from tm_reclaim_thread()

2018-07-24 Thread Michael Ellerman
On Thu, 2018-02-01 at 01:07:46 UTC, Cyril Bur wrote: > tm_reclaim_thread() doesn't use the parameter anymore, both callers have > to bother getting it as they have no need for a struct thread_info > either. > > Just remove it and adjust the callers. > > Signed-off-by: Cyril Bur Applied to power

Re: [V2, 1/2] powerpc/powernv/opal-dump : Handles opal_dump_info properly

2018-07-24 Thread Michael Ellerman
On Mon, 2017-02-20 at 13:22:10 UTC, Mukesh Ojha wrote: > Moves the return value check of 'opal_dump_info' to a proper place which > was previously unnecessarily filling all the dump info even on failure. > > Signed-off-by: Mukesh Ojha > Acked-by: Stewart Smith > Acked-by: Jeremy Kerr Series ap

[PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-24 Thread Arnd Bergmann
Almost all files in the kernel are either plain text or UTF-8 encoded. A couple however are ISO_8859-1, usually just a few characters in a C comments, for historic reasons. This converts them all to UTF-8 for consistency. Signed-off-by: Arnd Bergmann --- .../devicetree/bindings/net/nfc/pn544.tx

Re: [PATCH] net: ethernet: fs-enet: Use generic CRC32 implementation

2018-07-24 Thread Krzysztof Kozlowski
On 24 July 2018 at 13:05, David Laight wrote: > From: Krzysztof Kozlowski >> Sent: 23 July 2018 17:20 >> Use generic kernel CRC32 implementation because it: >> 1. Should be faster (uses lookup tables), > > Are you sure? > The lookup tables are unlikely to be in the data cache and > the 6 cache mis

Re: [PATCH v3 1/1] KVM: PPC: Book3S HV: pack VCORE IDs to access full VCPU ID space

2018-07-24 Thread Cédric Le Goater
On 07/19/2018 04:25 AM, Sam Bobroff wrote: > From: Sam Bobroff > > It is not currently possible to create the full number of possible > VCPUs (KVM_MAX_VCPUS) on Power9 with KVM-HV when the guest uses less > threads per core than it's core stride (or "VSMT mode"). This is > because the VCORE ID an

[PATCH v8 2/2] hwmon: ibmpowernv: Add attributes to enable/disable sensor groups

2018-07-24 Thread Shilpasri G Bhat
OPAL firmware provides the facility for some groups of sensors to be enabled/disabled at runtime to give the user the option of using the system resources for collecting these sensors or not. For example, on POWER9 systems, the On Chip Controller (OCC) gathers various system and chip level sensors

[PATCH v8 1/2] powernv:opal-sensor-groups: Add support to enable sensor groups

2018-07-24 Thread Shilpasri G Bhat
Adds support to enable/disable a sensor group at runtime. This can be used to select the sensor groups that needs to be copied to main memory by OCC. Sensor groups like power, temperature, current, voltage, frequency, utilization can be enabled/disabled at runtime. Signed-off-by: Shilpasri G Bhat

[PATCH v8 0/2] hwmon/powernv: Add attributes to enable/disable sensors

2018-07-24 Thread Shilpasri G Bhat
This patch series adds new attribute to enable or disable a sensor at runtime. Changes from v7: - Use of_for_each_phandle() and of_count_phandle_with_args() to parse through the phandle array v7 : https://lkml.org/lkml/2018/7/20/72 v6 : https://lkml.org/lkml/2018/7/18/806 v5 : https://lkml.org/