* Re: [v2] xmon: Setup xmon debugger hooks when first break-point is set
From: Michael Ellerman @ 2018-03-14 9:28 UTC (permalink / raw)
To: Vaibhav Jain, Balbir Singh
Cc: Vaibhav Jain, Frederic Barrat, linux-kernel, Paul Mackerras,
Nicholas Piggin, Douglas Miller, linuxppc-dev
In-Reply-To: <20180304173025.19520-1-vaibhav@linux.vnet.ibm.com>
On Sun, 2018-03-04 at 17:30:25 UTC, Vaibhav Jain wrote:
> Presently sysrq key for xmon('x') is registered during kernel init
> irrespective of the value of kernel param 'xmon'. Thus xmon is enabled
> even if 'xmon=off' is passed on the kernel command line. However this
> doesn't enable the kernel debugger hooks needed for instruction or data
> breakpoints. Thus when a break-point is hit with xmon=off a kernel oops
> of the form below is reported:
>
> Oops: Exception in kernel mode, sig: 5 [#1]
> < snip >
> Trace/breakpoint trap
>
> To fix this the patch checks and enables debugger hooks when an
> instruction or data break-point is set via xmon console.
>
> Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
> Reviewed-by: Balbir Singh <bsingharora@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/e1368d0c9edbc366e45216e7295fd6
cheers
^ permalink raw reply
* Re: powerpc/powernv/mce: Don't silently restart the machine
From: Michael Ellerman @ 2018-03-14 9:28 UTC (permalink / raw)
To: Balbir Singh, linuxppc-dev; +Cc: npiggin
In-Reply-To: <20180308003606.10721-1-bsingharora@gmail.com>
On Thu, 2018-03-08 at 00:36:06 UTC, Balbir Singh wrote:
> On MCE the current code will restart the machine with
> ppc_md.restart(). This case was extremely unlikely since
> prior to that a skiboot call is made and that resulted in
> a checkstop for analysis.
>
> With newer skiboots, on P9 we don't checkstop the box by
> default, instead we return back to the kernel to extract
> useful information at the time of the MCE. While we still
> get this information, this patch converts the restart to
> a panic(), so that if configured a dump can be taken and
> we can track and probably debug the potential issue causing
> the MCE.
>
> Signed-off-by: Balbir Singh <bsingharora@gmail.com>
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
> Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/5ee573e8ef034e687c420cb1091137
cheers
^ permalink raw reply
* Re: [1/4] powerpc/pseries: Move smp_query_cpu_stopped() etc. out of plpar_wrappers.h
From: Michael Ellerman @ 2018-03-14 9:28 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: npiggin
In-Reply-To: <20180308025442.6165-1-mpe@ellerman.id.au>
On Thu, 2018-03-08 at 02:54:39 UTC, Michael Ellerman wrote:
> smp_query_cpu_stopped() and related #defines are currently in
> plpar_wrappers.h. The function actually does an RTAS call, not an
> hcall, and basically has nothing to do with plpar_wrappers.h
>
> Move it into pseries.h, where it can easily be used by the only two
> callers in pseries/smp.c and pseries/hotplug-cpu.c.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Series applied to powerpc next.
https://git.kernel.org/powerpc/c/16560e88320d276036b393d4ba51cf
cheers
^ permalink raw reply
* Re: PCI/hotplug: ppc: correct a php_slot usage after free
From: Michael Ellerman @ 2018-03-14 9:28 UTC (permalink / raw)
To: wei.guo.simon, linuxppc-dev; +Cc: Simon Guo, linux-kernel, linux-pci
In-Reply-To: <1520412364-2680-1-git-send-email-wei.guo.simon@gmail.com>
On Wed, 2018-03-07 at 08:46:04 UTC, wei.guo.simon@gmail.com wrote:
> From: Simon Guo <wei.guo.simon@gmail.com>
>
> In pnv_php_unregister_one(), pnv_php_put_slot() might kfree
> php_slot structure. But there is pci_hp_deregister() after
> that with php_slot reference.
>
> This patch moves pnv_php_put_slot() to the end of function.
>
> Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/97c6f25d5828b497e3e802b1f7c701
cheers
^ permalink raw reply
* Re: [linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to ‘__builtin_choose_expr’ not a constant
From: Abdul Haleem @ 2018-03-14 9:59 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linuxppc-dev, linux-next, linux-kernel, Kees Cook, mpe, sachinp
In-Reply-To: <20180314193957.5f835d33@canb.auug.org.au>
On Wed, 2018-03-14 at 19:39 +1100, Stephen Rothwell wrote:
> Hi Abdul,
>
> On Wed, 14 Mar 2018 13:59:54 +0530 Abdul Haleem <abdhalee@linux.vnet.ibm.com> wrote:
> >
> > Today's next kernel fails to build with gcc 4.8.5 on powerpc machine.
>
> Thanks for the report. Just for the future, please include the
> next-XXXXXXXX tag when making reports about linux-next.
Sure, I will. next-20180313 is the bad tag
>
> > ./include/linux/jiffies.h: In function ‘jiffies_delta_to_clock_t’:
> > ./include/linux/kernel.h:855:2: error: first argument to ‘__builtin_choose_expr’ not a constant
> > __builtin_choose_expr(__builtin_constant_p(x) && \
> > ^
> > ./include/linux/kernel.h:867:19: note: in expansion of macro ‘__max’
> > #define max(x, y) __max(typeof(x), typeof(y), x, y)
> >
> > Machine Type: Power8 Baremetal
> > gcc: 4.8.5
> >
> >
> > Builds fine when below patch is reverted
> > c7c133f3 kernel.h: skip single-eval logic on literals in min()/max()
>
> Those patches have been removed from today's linux-next (next-20180314).
--
Regard's
Abdul Haleem
IBM Linux Technology Centre
^ permalink raw reply
* Re: [PATCH 04/21] powerpc: Mark both tmp variables as unused
From: Christophe LEROY @ 2018-03-14 10:38 UTC (permalink / raw)
To: Mathieu Malaterre, Michael Ellerman
Cc: linux-kernel, Paul Mackerras, Jiri Slaby, linuxppc-dev
In-Reply-To: <20180225172236.29650-5-malat@debian.org>
Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit :
> Since the value of `tmp` is never intended to be read, declare both `tmp`
> variables as unused. Fix warning (treated as error in W=1):
What about using fault_in_pages_readable() instead ?
Christophe
>
> CC arch/powerpc/kernel/signal_32.o
> arch/powerpc/kernel/signal_32.c: In function ‘sys_swapcontext’:
> arch/powerpc/kernel/signal_32.c:1048:16: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable]
> unsigned char tmp;
> ^~~
> arch/powerpc/kernel/signal_32.c: In function ‘sys_debug_setcontext’:
> arch/powerpc/kernel/signal_32.c:1234:16: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable]
> unsigned char tmp;
> ^~~
> cc1: all warnings being treated as errors
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
> arch/powerpc/kernel/signal_32.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
> index a46de0035214..492f03451877 100644
> --- a/arch/powerpc/kernel/signal_32.c
> +++ b/arch/powerpc/kernel/signal_32.c
> @@ -1045,7 +1045,7 @@ long sys_swapcontext(struct ucontext __user *old_ctx,
> struct ucontext __user *new_ctx,
> int ctx_size, int r6, int r7, int r8, struct pt_regs *regs)
> {
> - unsigned char tmp;
> + unsigned char tmp __maybe_unused;
> int ctx_has_vsx_region = 0;
>
> #ifdef CONFIG_PPC64
> @@ -1231,7 +1231,7 @@ int sys_debug_setcontext(struct ucontext __user *ctx,
> {
> struct sig_dbg_op op;
> int i;
> - unsigned char tmp;
> + unsigned char tmp __maybe_unused;
> unsigned long new_msr = regs->msr;
> #ifdef CONFIG_PPC_ADV_DEBUG_REGS
> unsigned long new_dbcr0 = current->thread.debug.dbcr0;
>
^ permalink raw reply
* [RESEND PATCH] Input: joystick/analog - Use get_cycles() on PPC
From: Michael Ellerman @ 2018-03-14 11:17 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, linuxppc-dev
The analog joystick driver spits a warning at us:
drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer
not defined for this architecture.
PPC has get_cycles() so use that.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
drivers/input/joystick/analog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This is the third resend, I'll take it via the powerpc tree if no one else
does.
cheers
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index c868a878c84f..a942c4ccd2af 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -163,7 +163,7 @@ static unsigned int get_time_pit(void)
#define GET_TIME(x) do { x = (unsigned int)rdtsc(); } while (0)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "TSC"
-#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_RISCV) || defined(CONFIG_TILE)
+#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_PPC) || defined(CONFIG_RISCV) || defined(CONFIG_TILE)
#define GET_TIME(x) do { x = get_cycles(); } while (0)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "get_cycles"
--
2.14.1
^ permalink raw reply related
* Re: [PATCH v9 00/24] Speculative page faults
From: Michal Hocko @ 2018-03-14 13:11 UTC (permalink / raw)
To: Laurent Dufour
Cc: paulmck, peterz, akpm, kirill, ak, dave, jack, Matthew Wilcox,
benh, mpe, paulus, Thomas Gleixner, Ingo Molnar, hpa, Will Deacon,
Sergey Senozhatsky, Andrea Arcangeli, Alexei Starovoitov,
kemi.wang, sergey.senozhatsky.work, Daniel Jordan, linux-kernel,
linux-mm, haren, khandual, npiggin, bsingharora, Tim Chen,
linuxppc-dev, x86
In-Reply-To: <1520963994-28477-1-git-send-email-ldufour@linux.vnet.ibm.com>
On Tue 13-03-18 18:59:30, Laurent Dufour wrote:
> Changes since v8:
> - Don't check PMD when locking the pte when THP is disabled
> Thanks to Daniel Jordan for reporting this.
> - Rebase on 4.16
Is this really worth reposting the whole pile? I mean this is at v9,
each doing little changes. It is quite tiresome to barely get to a
bookmarked version just to find out that there are 2 new versions out.
I am sorry to be grumpy and I can understand some frustration it doesn't
move forward that easilly but this is a _big_ change. We should start
with a real high level review rather than doing small changes here and
there and reach v20 quickly.
I am planning to find some time to look at it but the spare cycles are
so rare these days...
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* Re: [PATCH v9 00/24] Speculative page faults
From: Laurent Dufour @ 2018-03-14 13:33 UTC (permalink / raw)
To: Michal Hocko
Cc: paulmck, peterz, akpm, kirill, ak, dave, jack, Matthew Wilcox,
benh, mpe, paulus, Thomas Gleixner, Ingo Molnar, hpa, Will Deacon,
Sergey Senozhatsky, Andrea Arcangeli, Alexei Starovoitov,
kemi.wang, sergey.senozhatsky.work, Daniel Jordan, linux-kernel,
linux-mm, haren, khandual, npiggin, bsingharora, Tim Chen,
linuxppc-dev, x86
In-Reply-To: <20180314131118.GC23100@dhcp22.suse.cz>
On 14/03/2018 14:11, Michal Hocko wrote:
> On Tue 13-03-18 18:59:30, Laurent Dufour wrote:
>> Changes since v8:
>> - Don't check PMD when locking the pte when THP is disabled
>> Thanks to Daniel Jordan for reporting this.
>> - Rebase on 4.16
>
> Is this really worth reposting the whole pile? I mean this is at v9,
> each doing little changes. It is quite tiresome to barely get to a
> bookmarked version just to find out that there are 2 new versions out.
I agree, I could have sent only a change for the concerned patch. But the
previous series has been sent a month ago and this one is rebased on the 4.16
kernel.
> I am sorry to be grumpy and I can understand some frustration it doesn't
> move forward that easilly but this is a _big_ change. We should start
> with a real high level review rather than doing small changes here and
> there and reach v20 quickly.
>
> I am planning to find some time to look at it but the spare cycles are
> so rare these days...
I understand that this is a big change and I'll try to not post a new series
until I get more feedback from this one.
Thanks,
Laurent.
^ permalink raw reply
* [PATCH 0/5] DPAA Ethernet fixes
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur
Hi,
This patch set is addressing several issues in the DPAA Ethernet
driver suite:
- module unload crash caused by wrong reference to device being left
in the cleanup code after the DSA related changes
- scheduling wile atomic bug in QMan code revealed during dpaa_eth
module unload
- a couple of error counter fixes, a duplicated init in dpaa_eth.
Madalin
Camelia Groza (3):
dpaa_eth: remove duplicate initialization
dpaa_eth: increment the RX dropped counter when needed
dpaa_eth: remove duplicate increment of the tx_errors counter
Madalin Bucur (2):
soc/fsl/qbman: fix issue in qman_delete_cgr_safe()
dpaa_eth: fix error in dpaa_remove()
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 ++++----
drivers/soc/fsl/qbman/qman.c | 28 +++++---------------------
2 files changed, 9 insertions(+), 27 deletions(-)
--
2.1.0
^ permalink raw reply
* [PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe()
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur, Roy Pledge
In-Reply-To: <20180314133732.24068-1-madalin.bucur@nxp.com>
The wait_for_completion() call in qman_delete_cgr_safe()
was triggering a scheduling while atomic bug, replacing the
kthread with a smp_call_function_single() call to fix it.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/qman.c | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index e4f5bb0..ba3cfa8 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -2443,39 +2443,21 @@ struct cgr_comp {
struct completion completion;
};
-static int qman_delete_cgr_thread(void *p)
+static void qman_delete_cgr_smp_call(void *p)
{
- struct cgr_comp *cgr_comp = (struct cgr_comp *)p;
- int ret;
-
- ret = qman_delete_cgr(cgr_comp->cgr);
- complete(&cgr_comp->completion);
-
- return ret;
+ qman_delete_cgr((struct qman_cgr *)p);
}
void qman_delete_cgr_safe(struct qman_cgr *cgr)
{
- struct task_struct *thread;
- struct cgr_comp cgr_comp;
-
preempt_disable();
if (qman_cgr_cpus[cgr->cgrid] != smp_processor_id()) {
- init_completion(&cgr_comp.completion);
- cgr_comp.cgr = cgr;
- thread = kthread_create(qman_delete_cgr_thread, &cgr_comp,
- "cgr_del");
-
- if (IS_ERR(thread))
- goto out;
-
- kthread_bind(thread, qman_cgr_cpus[cgr->cgrid]);
- wake_up_process(thread);
- wait_for_completion(&cgr_comp.completion);
+ smp_call_function_single(qman_cgr_cpus[cgr->cgrid],
+ qman_delete_cgr_smp_call, cgr, true);
preempt_enable();
return;
}
-out:
+
qman_delete_cgr(cgr);
preempt_enable();
}
--
2.1.0
^ permalink raw reply related
* [PATCH 2/5] dpaa_eth: fix error in dpaa_remove()
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur
In-Reply-To: <20180314133732.24068-1-madalin.bucur@nxp.com>
The recent changes that make the driver probing compatible with DSA
were not propagated in the dpa_remove() function, breaking the
module unload function. Using the proper device to address the issue.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 159dc2d..128e0a4 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2871,7 +2871,7 @@ static int dpaa_remove(struct platform_device *pdev)
struct device *dev;
int err;
- dev = &pdev->dev;
+ dev = pdev->dev.parent;
net_dev = dev_get_drvdata(dev);
priv = netdev_priv(net_dev);
--
2.1.0
^ permalink raw reply related
* [PATCH 3/5] dpaa_eth: remove duplicate initialization
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel
In-Reply-To: <20180314133732.24068-1-madalin.bucur@nxp.com>
From: Camelia Groza <camelia.groza@nxp.com>
The fd_format has already been initialized at this point.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 128e0a4..3e83d79 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2289,7 +2289,6 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,
vaddr = phys_to_virt(addr);
prefetch(vaddr + qm_fd_get_offset(fd));
- fd_format = qm_fd_get_format(fd);
/* The only FD types that we may receive are contig and S/G */
WARN_ON((fd_format != qm_fd_contig) && (fd_format != qm_fd_sg));
--
2.1.0
^ permalink raw reply related
* [PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel
In-Reply-To: <20180314133732.24068-1-madalin.bucur@nxp.com>
From: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 3e83d79..76b3c9e 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2321,8 +2321,10 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,
skb_len = skb->len;
- if (unlikely(netif_receive_skb(skb) == NET_RX_DROP))
+ if (unlikely(netif_receive_skb(skb) == NET_RX_DROP)) {
+ percpu_stats->rx_dropped++;
return qman_cb_dqrr_consume;
+ }
percpu_stats->rx_packets++;
percpu_stats->rx_bytes += skb_len;
--
2.1.0
^ permalink raw reply related
* [PATCH 5/5] dpaa_eth: remove duplicate increment of the tx_errors counter
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur
In-Reply-To: <20180314133732.24068-1-madalin.bucur@nxp.com>
From: Camelia Groza <camelia.groza@nxp.com>
The tx_errors counter is incremented by the dpaa_xmit caller.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 76b3c9e..fd43f98 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2021,7 +2021,6 @@ static inline int dpaa_xmit(struct dpaa_priv *priv,
}
if (unlikely(err < 0)) {
- percpu_stats->tx_errors++;
percpu_stats->tx_fifo_errors++;
return err;
}
--
2.1.0
^ permalink raw reply related
* Re: [PATCH] x86, powerpc : pkey-mprotect must allow pkey-0
From: Dave Hansen @ 2018-03-14 14:08 UTC (permalink / raw)
To: Florian Weimer, Ram Pai
Cc: mpe, mingo, akpm, linuxppc-dev, linux-mm, x86, linux-arch,
linux-kernel, benh, paulus, khandual, aneesh.kumar, bsingharora,
hbabu, mhocko, bauerman, ebiederm, corbet, arnd, msuchanek,
Ulrich.Weigand
In-Reply-To: <f71b583f-2b66-e9ed-b08b-fddff228a5a7@redhat.com>
On 03/14/2018 01:00 AM, Florian Weimer wrote:
> ... but not the key which is used for PROT_EXEC emulation, which is still
> reserved
The PROT_EXEC key is dynamically allocated. There is no "the key".
^ permalink raw reply
* Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0
From: Dave Hansen @ 2018-03-14 14:19 UTC (permalink / raw)
To: Ram Pai, mingo
Cc: mpe, linuxppc-dev, linux-mm, x86, linux-arch, linux-kernel, akpm,
benh, paulus, khandual, aneesh.kumar, bsingharora, hbabu, mhocko,
bauerman, ebiederm, corbet, arnd, fweimer, msuchanek
In-Reply-To: <1521013574-27041-1-git-send-email-linuxram@us.ibm.com>
On 03/14/2018 12:46 AM, Ram Pai wrote:
> Once an address range is associated with an allocated pkey, it cannot be
> reverted back to key-0. There is no valid reason for the above behavior. On
> the contrary applications need the ability to do so.
I'm trying to remember why we cared in the first place. :)
Could you add that to the changelog, please?
> @@ -92,7 +92,8 @@ int mm_pkey_alloc(struct mm_struct *mm)
> static inline
> int mm_pkey_free(struct mm_struct *mm, int pkey)
> {
> - if (!mm_pkey_is_allocated(mm, pkey))
> + /* pkey 0 is special and can never be freed */
> + if (!pkey || !mm_pkey_is_allocated(mm, pkey))
> return -EINVAL;
If an app was being really careful, couldn't it free up all of the
implicitly-pkey-0-assigned memory so that it is not in use at all? In
that case, we might want to allow this.
On the other hand, nobody is likely to _ever_ actually do this so this
is good shoot-yourself-in-the-foot protection.
^ permalink raw reply
* [PATCH 45/47] tty: hvc: remove tile driver
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel; +Cc: Arnd Bergmann, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The Tile architecture is obsolete and getting removed from the kernel,
this removes the corresponding console driver as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/tty/hvc/Makefile | 1 -
drivers/tty/hvc/hvc_tile.c | 196 ---------------------------------------------
2 files changed, 197 deletions(-)
delete mode 100644 drivers/tty/hvc/hvc_tile.c
diff --git a/drivers/tty/hvc/Makefile b/drivers/tty/hvc/Makefile
index b82f9f68cd23..7da1934d34e8 100644
--- a/drivers/tty/hvc/Makefile
+++ b/drivers/tty/hvc/Makefile
@@ -3,7 +3,6 @@ obj-$(CONFIG_HVC_CONSOLE) += hvc_vio.o hvsi_lib.o
obj-$(CONFIG_HVC_OPAL) += hvc_opal.o hvsi_lib.o
obj-$(CONFIG_HVC_OLD_HVSI) += hvsi.o
obj-$(CONFIG_HVC_RTAS) += hvc_rtas.o
-obj-$(CONFIG_HVC_TILE) += hvc_tile.o
obj-$(CONFIG_HVC_DCC) += hvc_dcc.o
obj-$(CONFIG_HVC_DRIVER) += hvc_console.o
obj-$(CONFIG_HVC_IRQ) += hvc_irq.o
diff --git a/drivers/tty/hvc/hvc_tile.c b/drivers/tty/hvc/hvc_tile.c
deleted file mode 100644
index b517c0661abb..000000000000
--
2.9.0
^ permalink raw reply related
* [PATCH 44/47] tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel; +Cc: Arnd Bergmann, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The blackfin architecture is getting removed, so these drivers
are not needed any more.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/tty/Kconfig | 13 --
drivers/tty/Makefile | 1 -
drivers/tty/bfin_jtag_comm.c | 353 ----------------------------------------
drivers/tty/hvc/Kconfig | 9 -
drivers/tty/hvc/Makefile | 1 -
drivers/tty/hvc/hvc_bfin_jtag.c | 104 ------------
6 files changed, 481 deletions(-)
delete mode 100644 drivers/tty/bfin_jtag_comm.c
delete mode 100644 drivers/tty/hvc/hvc_bfin_jtag.c
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index b68e71751cc5..0840d27381ea 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -151,19 +151,6 @@ config LEGACY_PTY_COUNT
When not in use, each legacy PTY occupies 12 bytes on 32-bit
architectures and 24 bytes on 64-bit architectures.
-config BFIN_JTAG_COMM
- tristate "Blackfin JTAG Communication"
- depends on BLACKFIN
- help
- Add support for emulating a TTY device over the Blackfin JTAG.
-
- To compile this driver as a module, choose M here: the
- module will be called bfin_jtag_comm.
-
-config BFIN_JTAG_COMM_CONSOLE
- bool "Console on Blackfin JTAG"
- depends on BFIN_JTAG_COMM=y
-
config SERIAL_NONSTANDARD
bool "Non-standard serial port support"
depends on HAS_IOMEM
diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile
index 47c71f43a397..c72cafdf32b4 100644
--- a/drivers/tty/Makefile
+++ b/drivers/tty/Makefile
@@ -20,7 +20,6 @@ obj-$(CONFIG_SERIAL_DEV_BUS) += serdev/
# tty drivers
obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
-obj-$(CONFIG_BFIN_JTAG_COMM) += bfin_jtag_comm.o
obj-$(CONFIG_CYCLADES) += cyclades.o
obj-$(CONFIG_ISI) += isicom.o
obj-$(CONFIG_MOXA_INTELLIO) += moxa.o
diff --git a/drivers/tty/bfin_jtag_comm.c b/drivers/tty/bfin_jtag_comm.c
deleted file mode 100644
index c369bf27a67b..000000000000
diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfig
index fec457edad14..3bade5ad3d71 100644
--- a/drivers/tty/hvc/Kconfig
+++ b/drivers/tty/hvc/Kconfig
@@ -88,15 +88,6 @@ config HVC_DCC
driver. This console is used through a JTAG only on ARM. If you don't have
a JTAG then you probably don't want this option.
-config HVC_BFIN_JTAG
- bool "Blackfin JTAG console"
- depends on BLACKFIN
- select HVC_DRIVER
- help
- This console uses the Blackfin JTAG to create a console under the
- the HVC driver. If you don't have JTAG, then you probably don't
- want this option.
-
config HVCS
tristate "IBM Hypervisor Virtual Console Server support"
depends on PPC_PSERIES && HVC_CONSOLE
diff --git a/drivers/tty/hvc/Makefile b/drivers/tty/hvc/Makefile
index 0b02ec7f1dfd..b82f9f68cd23 100644
--- a/drivers/tty/hvc/Makefile
+++ b/drivers/tty/hvc/Makefile
@@ -10,5 +10,4 @@ obj-$(CONFIG_HVC_IRQ) += hvc_irq.o
obj-$(CONFIG_HVC_XEN) += hvc_xen.o
obj-$(CONFIG_HVC_IUCV) += hvc_iucv.o
obj-$(CONFIG_HVC_UDBG) += hvc_udbg.o
-obj-$(CONFIG_HVC_BFIN_JTAG) += hvc_bfin_jtag.o
obj-$(CONFIG_HVCS) += hvcs.o
diff --git a/drivers/tty/hvc/hvc_bfin_jtag.c b/drivers/tty/hvc/hvc_bfin_jtag.c
deleted file mode 100644
index dd7cae4c195b..000000000000
--
2.9.0
^ permalink raw reply related
* Re: [PATCH v5 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion
From: Arnd Bergmann @ 2018-03-14 16:12 UTC (permalink / raw)
To: Deepa Dinamani
Cc: Thomas Gleixner, John Stultz, Linux Kernel Mailing List,
y2038 Mailman List, Arnaldo Carvalho de Melo,
Benjamin Herrenschmidt, Christian Borntraeger, Catalin Marinas,
Chris Metcalf, cohuck, David Miller, Helge Deller, devel,
gerald.schaefer, gregkh, Heiko Carstens, Jan Hoeppner,
H. Peter Anvin, James E.J. Bottomley, Julian Wiedmann, Linux API,
linux-arch, open list:RALINK MIPS ARCHITECTURE, Parisc List,
linuxppc-dev, linux-s390, Mark Rutland, Ingo Molnar,
Michael Ellerman, Peter Oberparleiter, oprofile-list,
Paul Mackerras, Peter Zijlstra, Ralf Baechle, Steven Rostedt,
Robert Richter, Martin Schwidefsky, sebott, sparclinux,
Stefan Haberland, Ursula Braun, Will Deacon,
the arch/x86 maintainers
In-Reply-To: <20180314040333.3291-1-deepa.kernel@gmail.com>
On Wed, Mar 14, 2018 at 5:03 AM, Deepa Dinamani <deepa.kernel@gmail.com> wrote:
> The series is a preparation series for individual architectures
> to use 64 bit time_t syscalls in compat and 32 bit emulation modes.
>
> This is a follow up to the series Arnd Bergmann posted:
> https://sourceware.org/ml/libc-alpha/2015-05/msg00070.html [1]
>
> Thomas, Arnd, this seems ready to be merged now.
> Can you help get this merged?
>
> Big picture is as per the lwn article:
> https://lwn.net/Articles/643234/ [2]
>
> The series is directed at converting posix clock syscalls:
> clock_gettime, clock_settime, clock_getres and clock_nanosleep
> to use a new data structure __kernel_timespec at syscall boundaries.
> __kernel_timespec maintains 64 bit time_t across all execution modes.
>
> vdso will be handled as part of each architecture when they enable
> support for 64 bit time_t.
>
> The compat syscalls are repurposed to provide backward compatibility
> by using them as native syscalls as well for 32 bit architectures.
> They will continue to use timespec at syscall boundaries.
>
> CONFIG_64_BIT_TIME controls whether the syscalls use __kernel_timespec
> or timespec at syscall boundaries.
>
> The series does the following:
> 1. Enable compat syscalls on 32 bit architectures.
> 2. Add a new __kernel_timespec type to be used as the data structure
> for all the new syscalls.
> 3. Add new config CONFIG_64BIT_TIME(intead of the CONFIG_COMPAT_TIME in
> [1] and [2] to switch to new definition of __kernel_timespec. It is
> the same as struct timespec otherwise.
> 4. Add new CONFIG_32BIT_TIME to conditionally compile compat syscalls.
I've applied all 10 patches to my y2038 git branch [1], which is part
of linux-next,
to give it a little wider testing. If everything goes well, I'd send a
pull request to
Thomas next week so he can integrate it into tip from there, or (if he prefers)
send it directly to Linus in the merge window.
Thanks a lot for your persistence and your work on this!
Arnd
[1] git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git#y2038
^ permalink raw reply
* Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock
From: Laurent Dufour @ 2018-03-14 16:25 UTC (permalink / raw)
To: Peter Zijlstra
Cc: paulmck, akpm, kirill, ak, mhocko, dave, jack, Matthew Wilcox,
benh, mpe, paulus, Thomas Gleixner, Ingo Molnar, hpa, Will Deacon,
Sergey Senozhatsky, Andrea Arcangeli, Alexei Starovoitov,
kemi.wang, sergey.senozhatsky.work, Daniel Jordan, linux-kernel,
linux-mm, haren, khandual, npiggin, bsingharora, Tim Chen,
linuxppc-dev, x86
In-Reply-To: <20180314084844.GP4043@hirez.programming.kicks-ass.net>
On 14/03/2018 09:48, Peter Zijlstra wrote:
> On Tue, Mar 13, 2018 at 06:59:47PM +0100, Laurent Dufour wrote:
>> This change is inspired by the Peter's proposal patch [1] which was
>> protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in
>> that particular case, and it is introducing major performance degradation
>> due to excessive scheduling operations.
>
> Do you happen to have a little more detail on that?
This has been reported by kemi who find bad performance when running some
benchmarks on top of the v5 series:
https://patchwork.kernel.org/patch/9999687/
It appears that SRCU is generating a lot of additional scheduling to manage the
freeing of the VMA structure. SRCU is dealing through per cpu ressources but
the SRCU callback is And since we are handling this way a per process
ressource (VMA) through a global resource (SRCU) this leads to a lot of
overhead when scheduling the SRCU callback.
>> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
>> index 34fde7111e88..28c763ea1036 100644
>> --- a/include/linux/mm_types.h
>> +++ b/include/linux/mm_types.h
>> @@ -335,6 +335,7 @@ struct vm_area_struct {
>> struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
>> #ifdef CONFIG_SPECULATIVE_PAGE_FAULT
>> seqcount_t vm_sequence;
>> + atomic_t vm_ref_count; /* see vma_get(), vma_put() */
>> #endif
>> } __randomize_layout;
>>
>> @@ -353,6 +354,9 @@ struct kioctx_table;
>> struct mm_struct {
>> struct vm_area_struct *mmap; /* list of VMAs */
>> struct rb_root mm_rb;
>> +#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
>> + rwlock_t mm_rb_lock;
>> +#endif
>> u32 vmacache_seqnum; /* per-thread vmacache */
>> #ifdef CONFIG_MMU
>> unsigned long (*get_unmapped_area) (struct file *filp,
>
> When I tried this, it simply traded contention on mmap_sem for
> contention on these two cachelines.
>
> This was for the concurrent fault benchmark, where mmap_sem is only ever
> acquired for reading (so no blocking ever happens) and the bottle-neck
> was really pure cacheline access.
I'd say that this expected if multiple threads are dealing on the same VMA, but
if the VMA differ then this contention is disappearing while it is remaining
when using the mmap_sem.
This being said, test I did on PowerPC using will-it-scale/page_fault1_threads
showed that the number of caches-misses generated in get_vma() are very low
(less than 5%). Am I missing something ?
> Only by using RCU can you avoid that thrashing.
I agree, but this kind of test is the best use case for SRCU because there are
not so many updates, so not a lot of call to the SRCU asynchronous callback.
Honestly, I can't see an ideal solution here, RCU is not optimal when there is
a high number of updates, and using a rwlock may introduced a bottleneck there.
I get better results when using the rwlock than using SRCU in that case, but if
you have another proposal, please advise, I'll give it a try.
> Also note that if your database allocates the one giant mapping, it'll
> be _one_ VMA and that vm_ref_count gets _very_ hot indeed.
In the case of the database product I mentioned in the series header, that's
the opposite, the VMA number is very high so this doesn't happen. But in the
case of one VMA, it's clear that there will be a contention on vm_ref_count,
but this would be better than blocking on the mmap_sem.
Laurent.
^ permalink raw reply
* Re: [PATCH 45/47] tty: hvc: remove tile driver
From: Greg Kroah-Hartman @ 2018-03-14 16:32 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, Jiri Slaby, linuxppc-dev
In-Reply-To: <20180314153603.3127932-46-arnd@arndb.de>
On Wed, Mar 14, 2018 at 04:35:58PM +0100, Arnd Bergmann wrote:
> The Tile architecture is obsolete and getting removed from the kernel,
> this removes the corresponding console driver as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/tty/hvc/Makefile | 1 -
> drivers/tty/hvc/hvc_tile.c | 196 ---------------------------------------------
> 2 files changed, 197 deletions(-)
> delete mode 100644 drivers/tty/hvc/hvc_tile.c
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* Re: [PATCH 44/47] tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
From: Greg Kroah-Hartman @ 2018-03-14 16:32 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, Jiri Slaby, linuxppc-dev
In-Reply-To: <20180314153603.3127932-45-arnd@arndb.de>
On Wed, Mar 14, 2018 at 04:35:57PM +0100, Arnd Bergmann wrote:
> The blackfin architecture is getting removed, so these drivers
> are not needed any more.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/tty/Kconfig | 13 --
> drivers/tty/Makefile | 1 -
> drivers/tty/bfin_jtag_comm.c | 353 ----------------------------------------
> drivers/tty/hvc/Kconfig | 9 -
> drivers/tty/hvc/Makefile | 1 -
> drivers/tty/hvc/hvc_bfin_jtag.c | 104 ------------
> 6 files changed, 481 deletions(-)
> delete mode 100644 drivers/tty/bfin_jtag_comm.c
> delete mode 100644 drivers/tty/hvc/hvc_bfin_jtag.c
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* [PATCH 0/2] Silent PCI realignment messages during boot
From: Desnes A. Nunes do Rosario @ 2018-03-14 16:34 UTC (permalink / raw)
To: linux-kernel, linux-pci, linuxppc-dev
Cc: bhelgaas, benh, paulus, mpe, ruscur, aik, david, fbarrat, brking
This patchset introduces PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute in
pci_dev_flags which informs the pci subsystem to suppress all realignment
messages.
Powerpc has aligned all of its PCI resources to its PAGE_SIZE, and this
feature can be easily used on any other arch through the __weak
pcibios_default_alignment() interface.
However, since all PCI resources will be now realigned during boot, the
following messages will not only flood the system logs, but can be inter-
preted as a false positive for total PCI failure on the system.
[root@system user]# dmesg | grep -i disabling
[ 0.692270] pci 0000:00:00.0: Disabling memory decoding and releasing memory resources
[ 0.692324] pci 0000:00:00.0: disabling bridge mem windows
[ 0.729134] pci 0001:00:00.0: Disabling memory decoding and releasing memory resources
[ 0.737352] pci 0001:00:00.0: disabling bridge mem windows
[ 0.776295] pci 0002:00:00.0: Disabling memory decoding and releasing memory resources
[ 0.784509] pci 0002:00:00.0: disabling bridge mem windows
... and goes on for all PCI devices ...
Thus, this patchset provides a way for drivers to silent these messages if
the PCI_DEV_FLAGS_QUIET_PCI_REALIGN is turned on. Moreover, it also
tweaks this flag during boot on powerpc.
Fixes: 38274637699 ("powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned")
Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.vnet.ibm.com>
Desnes A. Nunes do Rosario (2):
pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI
subsystem
powerpc/powernv: Tweak PCI_DEV_FLAGS_QUIET_PCI_REALIGN on/off during
boot
arch/powerpc/platforms/powernv/pci.c | 14 ++++++++++++++
drivers/pci/pci.c | 3 ++-
drivers/pci/setup-res.c | 3 ++-
include/linux/pci.h | 2 ++
4 files changed, 20 insertions(+), 2 deletions(-)
--
2.14.3
^ permalink raw reply
* [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem
From: Desnes A. Nunes do Rosario @ 2018-03-14 16:34 UTC (permalink / raw)
To: linux-kernel, linux-pci, linuxppc-dev
Cc: bhelgaas, benh, paulus, mpe, ruscur, aik, david, fbarrat, brking
In-Reply-To: <20180314163455.15854-1-desnesn@linux.vnet.ibm.com>
Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to
silent PCI realignment messages if the flag is turned on by a driver.
Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.vnet.ibm.com>
---
drivers/pci/pci.c | 3 ++-
drivers/pci/setup-res.c | 3 ++-
include/linux/pci.h | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 8c71d1a66cdd..be197c944e5f 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -5505,7 +5505,8 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
return;
}
- pci_info(dev, "Disabling memory decoding and releasing memory resources\n");
+ if (!(dev->dev_flags & PCI_DEV_FLAGS_QUIET_PCI_REALIGN))
+ pci_info(dev, "Disabling memory decoding and releasing memory resources\n");
pci_read_config_word(dev, PCI_COMMAND, &command);
command &= ~PCI_COMMAND_MEMORY;
pci_write_config_word(dev, PCI_COMMAND, command);
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 369d48d6c6f1..00a538def763 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -172,7 +172,8 @@ EXPORT_SYMBOL(pci_claim_resource);
void pci_disable_bridge_window(struct pci_dev *dev)
{
- pci_info(dev, "disabling bridge mem windows\n");
+ if (!(dev->dev_flags & PCI_DEV_FLAGS_QUIET_PCI_REALIGN))
+ pci_info(dev, "disabling bridge mem windows\n");
/* MMIO Base/Limit */
pci_write_config_dword(dev, PCI_MEMORY_BASE, 0x0000fff0);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e057e8cc63e7..993f9c7dcc00 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -205,6 +205,8 @@ enum pci_dev_flags {
PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 << 10),
/* Don't use Relaxed Ordering for TLPs directed at this device */
PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 11),
+ /* Silent PCI resource realignment messages */
+ PCI_DEV_FLAGS_QUIET_PCI_REALIGN = (__force pci_dev_flags_t) (1 << 12),
};
enum pci_irq_reroute_variant {
--
2.14.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox