Re: Timekeeping oddities on MacMini G4s

2017-01-31 Thread Hal Murray
b...@kernel.crashing.org said: > Ok, I do have one though somewhere with OS X on it. If you give me > instructions on how to test (I know near to nothing about ntpsec), I should > be able to compile and run it. I'm assuming you are already running the normal ntpd from ntp classic, or Apple's ver

Re: Timekeeping oddities on MacMini G4s

2017-01-31 Thread Hal Murray
Thanks. b...@kernel.crashing.org said: > Right, we just use the value provided by Open Firmware. Any chance you can > try with MacOS X ? Not easily. I'm using boxes from eBay. They didn't come with CDs and I've already installed other software. > From the value in the properties you showed

Re: Timekeeping oddities on MacMini G4s

2017-01-31 Thread Benjamin Herrenschmidt
On Tue, 2017-01-31 at 22:59 -0800, Hal Murray wrote: > Thanks. > > b...@kernel.crashing.org said: > > Right, we just use the value provided by Open Firmware. Any chance you can > > try with MacOS X ?  > > Not easily.  I'm using boxes from eBay.  They didn't come with CDs and I've  > already insta

Re: [PATCH v3] Fix loading of module radeonfb on PowerMac

2017-01-31 Thread Mathieu Malaterre
Any chance this patch could be considered for inclusion this time ? Thanks On Wed, Nov 23, 2016 at 8:26 AM, Mathieu Malaterre wrote: > When the linux kernel is build with (typical kernel ship with Debian > installer): > > CONFIG_FB_OF=y > CONFIG_VT_HW_CONSOLE_BINDING=y > CONFIG_FB_RADEON=m > > T

[PATCH] powerpc/boot: Update .gitignore

2017-01-31 Thread Michael Ellerman
Add a few things that have been missed from .gitignore over the years. Signed-off-by: Michael Ellerman --- arch/powerpc/boot/.gitignore | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore index d61c03525777..84774ccba1c2 100644 ---

Re: [GIT PULL] percpu fix for v4.10-rc6

2017-01-31 Thread Michael Ellerman
Linus Torvalds writes: > On Tue, Jan 31, 2017 at 8:55 AM, Tejun Heo wrote: >> >> Douglas found and fixed a ref leak bug in percpu_ref_tryget[_live](). >> The bug is caused by storing the return value of >> atomic_long_inc_not_zero() into an int temp variable before returning >> it as a bool. Th

Re: [PATCH 2/2] powerpc/pseries: Dynamically increase RMA size

2017-01-31 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > Paul Clarke [p...@us.ibm.com] wrote: > --- > > From f9e9e8460206bc3fa7eaa741b9a2bde22870b9e0 Mon Sep 17 00:00:00 2001 I know it's been a while but I think it would still be good to get this in a shape that we can merge it. Comments inline ... > From: root > Date:

Re: [PATCHv2 00/11] KVM implementation of PAPR HPT resizing extension

2017-01-31 Thread Paul Mackerras
On Wed, Feb 01, 2017 at 03:56:36PM +1100, David Gibson wrote: > On Wed, Feb 01, 2017 at 09:18:13AM +1100, Paul Mackerras wrote: > > On Tue, Dec 20, 2016 at 04:48:56PM +1100, David Gibson wrote: > > > Here is the KVM implementation for the proposed PAPR extension which > > > allows the runtime resiz

Re: [PATCHv2 00/11] KVM implementation of PAPR HPT resizing extension

2017-01-31 Thread David Gibson
On Wed, Feb 01, 2017 at 09:18:13AM +1100, Paul Mackerras wrote: > On Tue, Dec 20, 2016 at 04:48:56PM +1100, David Gibson wrote: > > Here is the KVM implementation for the proposed PAPR extension which > > allows the runtime resizing of a PAPR guest's Hashed Page Table (HPT). > > > > Using this req

Re: [PATCH kernel] vfio/spapr: Fix missing mutex unlock when creating a window

2017-01-31 Thread David Gibson
On Wed, Feb 01, 2017 at 02:26:16PM +1100, Alexey Kardashevskiy wrote: > d9c728949ddc: "vfio/spapr: Postpone default window creation" added > an additional exit to the VFIO_IOMMU_SPAPR_TCE_CREATE case and made it > possible to return from tce_iommu_ioctl() without unlocking > container->lock; this f

Re: Timekeeping oddities on MacMini G4s

2017-01-31 Thread Benjamin Herrenschmidt
On Wed, 2017-02-01 at 14:10 +1100, Hugh Blemings wrote: > Hi, > > I've recently been lurking on the ntpsec project mailing list. > > One of the developers (Hal Murray, CCd) has been doing some tests of the  > codebase using FreeBSD and Debian on a G4 based Mac Mini - this largely  > motivated by

[PATCH kernel] vfio/spapr: Fix missing mutex unlock when creating a window

2017-01-31 Thread Alexey Kardashevskiy
d9c728949ddc: "vfio/spapr: Postpone default window creation" added an additional exit to the VFIO_IOMMU_SPAPR_TCE_CREATE case and made it possible to return from tce_iommu_ioctl() without unlocking container->lock; this fixes the issue. Fixes: d9c728949ddc Signed-off-by: Alexey Kardashevskiy ---

[PATCH v2] cxl: fix build when CONFIG_DEBUG_FS=n

2017-01-31 Thread Andrew Donnellan
Stub out the debugfs functions so that the build doesn't break when CONFIG_DEBUG_FS=n. Reported-by: Michael Ellerman Signed-off-by: Andrew Donnellan --- v1->v2: - use inline stubs in cxl.h instead of normal functions --- drivers/misc/cxl/Makefile | 3 ++- drivers/misc/cxl/cxl.h| 59

Timekeeping oddities on MacMini G4s

2017-01-31 Thread Hugh Blemings
Hi, I've recently been lurking on the ntpsec project mailing list. One of the developers (Hal Murray, CCd) has been doing some tests of the codebase using FreeBSD and Debian on a G4 based Mac Mini - this largely motivated by checking all is well on a big-endian system. Hal has identified wha

[PATCH] powerpc/debug: PTDUMP should depend on DEBUG_FS

2017-01-31 Thread Michael Ellerman
CONFIG_PPC_PTDUMP currently selects CONFIG_DEBUG_FS. But CONFIG_DEBUG_FS is user-selectable, so we shouldn't select it. Instead depend on it. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig.debug | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/Kconfig.

Re: [PATCH 1/2] powerpc: make use of for_each_node_by_name() instead of open-coding it

2017-01-31 Thread Dmitry Torokhov
On Tue, Jan 31, 2017 at 05:54:37PM -0800, Dmitry Torokhov wrote: > Instead of manually coding the loop with of_find_node_by_name(), let's > switch to the standard macro for iterating over nodes with given name. > > Signed-off-by: Dmitry Torokhov > --- > arch/powerpc/platforms/83xx/mpc832x_mds.c

Re: [PATCH] cxl: fix build when CONFIG_DEBUG_FS=n

2017-01-31 Thread Michael Ellerman
Andrew Donnellan writes: > Stub out the debugfs functions so that the build doesn't break when > CONFIG_DEBUG_FS=n. It's not a big deal, but it's preferable to do the stubs as static inlines in a header. That way they generate no code. Doing it this way, in a C file, you'll still get lots of on

[PATCH 2/2] powerpc: make use of for_each_node_by_type() instead of open-coding it

2017-01-31 Thread Dmitry Torokhov
Instead of manually coding the loop with of_find_node_by_type(), let's switch to the standard macro for iterating over nodes with given type. Also fixed a couple of refcount leaks in the aforementioned loops. Signed-off-by: Dmitry Torokhov --- arch/powerpc/kernel/setup-common.c | 9 ++

[PATCH 1/2] powerpc: make use of for_each_node_by_name() instead of open-coding it

2017-01-31 Thread Dmitry Torokhov
Instead of manually coding the loop with of_find_node_by_name(), let's switch to the standard macro for iterating over nodes with given name. Signed-off-by: Dmitry Torokhov --- arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 +- arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +- arch/powerpc/platfo

Re: [PATCH v4 2/5] ia64: reuse append_elf_note() and final_note() functions

2017-01-31 Thread Michael Ellerman
Tony Luck writes: > On Wed, Jan 25, 2017 at 11:15 AM, Hari Bathini > wrote: >> I haven't gotten a success/failure build report from zero-day. Not sure what >> to make of it. > > zero-day is generally silent unless it sees a problem. So no news is good > news. > >> But I did try cross-compiling

Re: powerpc/mm: simplify loop control in parse_numa_properties()

2017-01-31 Thread Michael Ellerman
On Thu, 2016-10-13 at 18:45:30 UTC, Reza Arbab wrote: > The flow of the main loop in parse_numa_properties() is overly > complicated. Simplify it to be less confusing and easier to read. > No functional change. > > Signed-off-by: Reza Arbab Applied to powerpc next, thanks. https://git.kernel.or

Re: powerpc/powernv: Use OPAL call for TCE kill on NVLink2

2017-01-31 Thread Michael Ellerman
On Tue, 2017-01-10 at 04:41:44 UTC, Alistair Popple wrote: > Add detection of NPU2 PHBs. NPU2/NVLink2 has a different register > layout for the TCE kill register therefore TCE invalidation should be > done via the OPAL call rather than using the register directly as it > is for PHB3 and NVLink1. Th

Re: powerpc/mm/hash: Properly mask the ESID bits when building proto-VSID

2017-01-31 Thread Michael Ellerman
On Sat, 2017-01-28 at 15:48:40 UTC, "Aneesh Kumar K.V" wrote: > proto-vsid is built using both mmu context id and ESID. We should not have > overlapping bits between those. That will result in us having vsid > collision. With the current code we missed masking the top bits of effective > address. T

Re: [v3] powerpc/powernv: Initialise nest mmu

2017-01-31 Thread Michael Ellerman
On Wed, 2016-12-14 at 02:36:51 UTC, Alistair Popple wrote: > POWER9 contains an off core mmu called the nest mmu (NMMU). This is > used by other hardware units on the chip to translate virtual > addresses into real addresses. The unit attempting an address > translation provides the majority of the

Re: [v2] powerpc/fadump: Fix the race in crash_fadump().

2017-01-31 Thread Michael Ellerman
On Mon, 2016-10-24 at 18:21:51 UTC, Mahesh Salgaonkar wrote: > From: Mahesh Salgaonkar > > There are chances that multiple CPUs can call crash_fadump() simultaneously > and would start duplicating same info to vmcoreinfo ELF note section. This > causes makedumpfile to fail during kdump capture. O

Re: powerpc/mm: allow memory hotplug into an offline node

2017-01-31 Thread Michael Ellerman
On Wed, 2016-11-16 at 16:45:03 UTC, Reza Arbab wrote: > Relax the check preventing us from hotplugging into an offline node. > > This limitation was added in commit 482ec7c403d2 ("[PATCH] powerpc numa: > Support sparse online node map") to prevent adding resources to an > uninitialized node. > >

Re: [v6,1/5] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro

2017-01-31 Thread Michael Ellerman
On Wed, 2017-01-25 at 08:36:25 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > Currently all the low-power idle states are expected to wake up > at reset vector 0x100. Which is why the macro IDLE_STATE_ENTER_SEQ > that puts the CPU to an idle state and never returns. > > On ISA v

Re: [v5,1/4] powerpc/mm: refactor radix physical page mapping

2017-01-31 Thread Michael Ellerman
On Mon, 2017-01-16 at 19:07:43 UTC, Reza Arbab wrote: > Move the page mapping code in radix_init_pgtable() into a separate > function that will also be used for memory hotplug. > > The current goto loop progressively decreases its mapping size as it > covers the tail of a range whose end is unalig

Re: [1/3] powerpc: Move isa bridge definitions to separate include

2017-01-31 Thread Michael Ellerman
On Mon, 2017-01-30 at 07:11:55 UTC, Benjamin Herrenschmidt wrote: > We'll be adding non-PCI isa bridge support so let's not > have all the definition in pci-bridge.h > > Signed-off-by: Benjamin Herrenschmidt Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/38e9d36bc14993

Re: [PATCH v4 2/5] ia64: reuse append_elf_note() and final_note() functions

2017-01-31 Thread Tony Luck
On Wed, Jan 25, 2017 at 11:15 AM, Hari Bathini wrote: > I haven't gotten a success/failure build report from zero-day. Not sure what > to make of it. zero-day is generally silent unless it sees a problem. So no news is good news. > But I did try cross-compiling and it was successful. Should that

Re: [PATCHv2 00/11] KVM implementation of PAPR HPT resizing extension

2017-01-31 Thread Paul Mackerras
On Tue, Dec 20, 2016 at 04:48:56PM +1100, David Gibson wrote: > Here is the KVM implementation for the proposed PAPR extension which > allows the runtime resizing of a PAPR guest's Hashed Page Table (HPT). > > Using this requires a guest kernel with support for the extension. > Patches for guest s

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-01-31 Thread Ross Zwisler
On Tue, Jan 31, 2017 at 4:48 AM, Mike Galbraith wrote: > On Tue, 2017-01-31 at 16:30 +0530, Sachin Sant wrote: >> Trimming the cc list. >> >> > > I assume I should be worried? >> > >> > Thanks for the report. No need to worry, the bug has existed for a >> > while, this patch just turns on the warn

[PATCH 1 4/4] PCI: rcar: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
This is a DT-only driver, so the only way to call rcar_pcie_probe() is to match an entry in rcar_pcie_of_match[], so of_id cannot be NULL. Furthermore, of_id->data can only be NULL if an rcar_pcie_of_match[] entry has a NULL .data member. That's a driver defect, and we don't want to return -EINVA

[PATCH 1 3/4] PCI: layerscape: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
The only way to call ls_pcie_probe() is to match an entry in ls_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the drvdata pointer. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas --- drivers/pci/ho

[PATCH 1 2/4] PCI: iproc: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
The only way to call iproc_pcie_pltfm_probe() is to match an entry in iproc_pcie_of_match_table[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the pcie->type. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas --- d

[PATCH 1 1/4] PCI: hisi: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
From: Shailendra Verma The only way to call hisi_pcie_probe() is to match an entry in hisi_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the soc_ops pointer. No functional change intended. [bhelgaas: use of_device_get_match_data(), changelog] Based-on-sug

[PATCH 1 0/4] PCI: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
This turned into much ado about nothing, but Shailendra's hisi patch prompted similar cleanups in other drivers. It's a minor simplification, but I think worth doing consistently across drivers. Basically this is Geert's observation that when the driver probe function is called only as a result o

[PATCH] powerpc/powermac: drop useless call to of_find_node_by_name

2017-01-31 Thread Dmitry Torokhov
We are not using result, so this simply results in a leaked refcount. Signed-off-by: Dmitry Torokhov --- Found by visual inspection, not tested... arch/powerpc/platforms/powermac/feature.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powe

[PATCH] powerpc/powermac: fix OF node refcount leak

2017-01-31 Thread Dmitry Torokhov
We need to call of_node_put() for device nodes obtained with of_find_node_by_name(). Signed-off-by: Dmitry Torokhov --- Found by visual inspection, not tested... arch/powerpc/platforms/powermac/pic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powermac/pic.c b/a

Re: [PATCH v4 14/15] livepatch: add /proc//patch_state

2017-01-31 Thread Josh Poimboeuf
On Tue, Jan 31, 2017 at 03:31:39PM +0100, Miroslav Benes wrote: > On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > > > Expose the per-task patch state value so users can determine which tasks > > are holding up completion of a patching operation. > > > > Signed-off-by: Josh Poimboeuf > > Reviewed-by

[PATCH 2/2] powerpc: enable BPF_SYSCALL in defconfigs

2017-01-31 Thread Naveen N. Rao
Enable BPF_SYSCALL in ppc64, pseries and powernv defconfigs so that eBPF is usable. Signed-off-by: Naveen N. Rao --- arch/powerpc/configs/powernv_defconfig | 1 + arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig | 1 + 3 files changed, 3 insertions(+) diff --

[PATCH 1/2] powerpc: enable UPROBE_EVENT in defconfigs

2017-01-31 Thread Naveen N. Rao
Enable UPROBE_EVENT in ppc64, pseries and powernv defconfigs since this is very useful to have by default. Signed-off-by: Naveen N. Rao --- arch/powerpc/configs/powernv_defconfig | 1 + arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig | 1 + 3 files changed, 3

Re: [PATCH v4 14/15] livepatch: add /proc//patch_state

2017-01-31 Thread Miroslav Benes
On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > Expose the per-task patch state value so users can determine which tasks > are holding up completion of a patching operation. > > Signed-off-by: Josh Poimboeuf > Reviewed-by: Petr Mladek > Reviewed-by: Miroslav Benes > --- > Documentation/filesyste

[PATCH] tpm: ibmvtpm: simplify crq initialization and document crq format

2017-01-31 Thread Michal Suchanek
The crq is passed in registers so is the same on BE and LE hosts. However, current implementation allocates a structure on-stack to represent the crq, initializes the members swapping them to BE, and loads the structure swapping it from BE. This is pointless and causes GCC warnings about ununitial

[PATCH] cxl: fix build when CONFIG_DEBUG_FS=n

2017-01-31 Thread Andrew Donnellan
Stub out the debugfs functions so that the build doesn't break when CONFIG_DEBUG_FS=n. Reported-by: Michael Ellerman Signed-off-by: Andrew Donnellan --- drivers/misc/cxl/debugfs.c | 49 ++ 1 file changed, 49 insertions(+) diff --git a/drivers/misc/cx

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-01-31 Thread Mike Galbraith
On Tue, 2017-01-31 at 16:30 +0530, Sachin Sant wrote: > Trimming the cc list. > > > > I assume I should be worried? > > > > Thanks for the report. No need to worry, the bug has existed for a > > while, this patch just turns on the warning ;-) > > > > The following commit queued up in tip/sched/c

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-01-31 Thread Sachin Sant
4.795762] CPU: 2 PID: 27 Comm: migration/2 Not tainted 4.10.0-rc6-next-20170131 #1 [ 114.795765] task: c004fa2f8600 task.stack: c004fa49c000 [ 114.795768] NIP: c0114ed8 LR: c0114ed4 CTR: c04a8cf0 [ 114.795771] REGS: c004fa49f6a0 TRAP: 0700 Not tainted

Re: [PATCH 3/3] KVM: PPC: Book3S: 64-bit CONFIG_RELOCATABLE support for interrupts

2017-01-31 Thread Nicholas Piggin
On Tue, 31 Jan 2017 19:01:52 +1100 Paul Mackerras wrote: > On Thu, Dec 22, 2016 at 04:29:27AM +1000, Nicholas Piggin wrote: > > 64-bit Book3S exception handlers must find the dynamic kernel base > > to add to the target address when branching beyond __end_interrupts, > > in order to support kerne

Re: [PATCH] powerpc/mm: fix a hardcode on memory boundary checking

2017-01-31 Thread Michael Ellerman
Rui Teng writes: > The offset of hugepage block will not be 16G, if the expected > page is more than one. Calculate the totol size instead of the > hardcode value. I assume you found this by code inspection and not by triggering an actual bug? cheers > diff --git a/arch/powerpc/mm/hash_utils_6

Re: ibmvtpm byteswapping inconsistency

2017-01-31 Thread Michael Ellerman
Tyrel Datwyler writes: > On 01/29/2017 08:32 PM, Michael Ellerman wrote: >> Tyrel Datwyler writes: >>> >>> Byte | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 >>> --- >>> Word0 | Valid | Type | Length|

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-01-31 Thread Michael Ellerman
Matt Fleming writes: > On Tue, 31 Jan, at 08:24:53AM, Michael Ellerman wrote: >> >> I'm hitting this on multiple powerpc systems: >> >> [ 38.339126] rq->clock_update_flags < RQCF_ACT_SKIP >> [ 38.339134] [ cut here ] >> [ 38.339142] WARNING: CPU: 2 PID: 1 at kernel

Re: [PATCH 3/3] KVM: PPC: Book3S: 64-bit CONFIG_RELOCATABLE support for interrupts

2017-01-31 Thread Michael Ellerman
Paul Mackerras writes: > On Thu, Dec 22, 2016 at 04:29:27AM +1000, Nicholas Piggin wrote: >> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S >> b/arch/powerpc/kvm/book3s_hv_rmhandlers.S >> index 11882aac8216..c18ce740452b 100644 >> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S >> +++ b/arch

Re: [PATCH 3/3] KVM: PPC: Book3S: 64-bit CONFIG_RELOCATABLE support for interrupts

2017-01-31 Thread Paul Mackerras
On Thu, Dec 22, 2016 at 04:29:27AM +1000, Nicholas Piggin wrote: > 64-bit Book3S exception handlers must find the dynamic kernel base > to add to the target address when branching beyond __end_interrupts, > in order to support kernel running at non-0 physical address. > > Support this in KVM by br

[PATCH] powerpc: kprobes: fixes for kprobe_lookup_name on BE

2017-01-31 Thread Naveen N. Rao
Fix two issues with kprobes.h on BE which were exposed with the optprobes work: - one, having to do with a missing include for linux/module.h for MODULE_NAME_LEN -- this didn't show up previously since the only users of kprobe_lookup_name were in kprobes.c, which included linux/module.h through oth