* Re: linux-next: manual merge of the tip tree with the block tree
From: Stephen Rothwell @ 2017-07-03 4:03 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Jens Axboe
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Max Gurtovoy,
Christoph Hellwig
In-Reply-To: <20170703135616.3e49cab1@canb.auug.org.au>
Hi all,
On Mon, 3 Jul 2017 13:56:16 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> + if (cpu < nr_queues) {
> - map[cpu] = cpu_to_queue_index(nr_queues, cpu, online_mask);
> ++ map[cpu] = cpu_to_queue_index(nr_queues, cpu)
> + } else {
> + first_sibling = get_first_sibling(cpu);
> + if (first_sibling == cpu)
> - map[cpu] = cpu_to_queue_index(nr_queues, cpu, online_mask);
> ++ map[cpu] = cpu_to_queue_index(nr_queues, cpu)
Clearly, I dropped a couple of semicolons here ... I added them to the
merge resolution.
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* linux-next: manual merge of the tip tree with the block tree
From: Stephen Rothwell @ 2017-07-03 3:56 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Jens Axboe
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Max Gurtovoy,
Christoph Hellwig
Hi all,
Today's linux-next merge of the tip tree got a conflict in:
block/blk-mq-cpumap.c
between commit:
fe631457ff3e ("blk-mq: map all HWQ also in hyperthreaded system")
from the block tree and commit:
5f042e7cbd9e ("blk-mq: Include all present CPUs in the default queue mapping")
from the tip tree.
I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging. You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc block/blk-mq-cpumap.c
index 2cca4fc43f45,5eaecd40f701..000000000000
--- a/block/blk-mq-cpumap.c
+++ b/block/blk-mq-cpumap.c
@@@ -14,15 -14,10 +14,14 @@@
#include "blk.h"
#include "blk-mq.h"
- static int cpu_to_queue_index(unsigned int nr_queues, const int cpu,
- const struct cpumask *online_mask)
-static int cpu_to_queue_index(unsigned int nr_cpus, unsigned int nr_queues,
- const int cpu)
++static int cpu_to_queue_index(unsigned int nr_queues, const int cpu)
{
- return cpu * nr_queues / nr_cpus;
+ /*
- * Non online CPU will be mapped to queue index 0.
++ * Non present CPU will be mapped to queue index 0.
+ */
- if (!cpumask_test_cpu(cpu, online_mask))
++ if (!cpumask_test_cpu(cpu, cpu_present_mask))
+ return 0;
+ return cpu % nr_queues;
}
static int get_first_sibling(unsigned int cpu)
@@@ -40,27 -35,55 +39,26 @@@ int blk_mq_map_queues(struct blk_mq_tag
{
unsigned int *map = set->mq_map;
unsigned int nr_queues = set->nr_hw_queues;
- const struct cpumask *online_mask = cpu_online_mask;
- unsigned int i, nr_cpus, nr_uniq_cpus, queue, first_sibling;
- cpumask_var_t cpus;
-
- if (!alloc_cpumask_var(&cpus, GFP_ATOMIC))
- return -ENOMEM;
-
- cpumask_clear(cpus);
- nr_cpus = nr_uniq_cpus = 0;
- for_each_present_cpu(i) {
- nr_cpus++;
- first_sibling = get_first_sibling(i);
- if (!cpumask_test_cpu(first_sibling, cpus))
- nr_uniq_cpus++;
- cpumask_set_cpu(i, cpus);
- }
-
- queue = 0;
- for_each_possible_cpu(i) {
- if (!cpumask_test_cpu(i, cpu_present_mask)) {
- map[i] = 0;
- continue;
- }
+ unsigned int cpu, first_sibling;
+ for_each_possible_cpu(cpu) {
/*
- * Easy case - we have equal or more hardware queues. Or
- * there are no thread siblings to take into account. Do
- * 1:1 if enough, or sequential mapping if less.
+ * First do sequential mapping between CPUs and queues.
+ * In case we still have CPUs to map, and we have some number of
+ * threads per cores then map sibling threads to the same queue for
+ * performace optimizations.
*/
- if (nr_queues >= nr_cpus || nr_cpus == nr_uniq_cpus) {
- map[i] = cpu_to_queue_index(nr_cpus, nr_queues, queue);
- queue++;
- continue;
+ if (cpu < nr_queues) {
- map[cpu] = cpu_to_queue_index(nr_queues, cpu, online_mask);
++ map[cpu] = cpu_to_queue_index(nr_queues, cpu)
+ } else {
+ first_sibling = get_first_sibling(cpu);
+ if (first_sibling == cpu)
- map[cpu] = cpu_to_queue_index(nr_queues, cpu, online_mask);
++ map[cpu] = cpu_to_queue_index(nr_queues, cpu)
+ else
+ map[cpu] = map[first_sibling];
}
-
- /*
- * Less then nr_cpus queues, and we have some number of
- * threads per cores. Map sibling threads to the same
- * queue.
- */
- first_sibling = get_first_sibling(i);
- if (first_sibling == i) {
- map[i] = cpu_to_queue_index(nr_uniq_cpus, nr_queues,
- queue);
- queue++;
- } else
- map[i] = map[first_sibling];
}
- free_cpumask_var(cpus);
return 0;
}
EXPORT_SYMBOL_GPL(blk_mq_map_queues);
^ permalink raw reply
* linux-next: build failure after merge of the spi tree
From: Stephen Rothwell @ 2017-07-03 3:41 UTC (permalink / raw)
To: Mark Brown
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Jiada Wang,
Sascha Hauer
Hi Mark,
After merging the spi tree, today's linux-next build (x86_64 allmodconfig)
failed like this:
drivers/spi/spi-imx.c: In function 'spi_imx_setupxfer':
drivers/spi/spi-imx.c:1007:16: error: 'config' undeclared (first use in this function)
mask = (1 << config.bpw) - 1;
^
Caused by commit
a0cc330240c9 ("spi: imx: dynamic burst length adjust for PIO mode")
interacting with commit
d52345b6cf8e ("spi: imx: put struct spi_imx_config members into driver private struct")
I reverted a0cc330240c9 for today.
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: build failure after merge of the sound-asoc tree
From: Stephen Rothwell @ 2017-07-03 3:21 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: Bard Liao, Linux-Next Mailing List, Linux Kernel Mailing List
In-Reply-To: <20170630115135.2696f717@canb.auug.org.au>
Hi all,
On Fri, 30 Jun 2017 11:51:35 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 29 Jun 2017 02:01:16 +0000 Bard Liao <bardliao@realtek.com> wrote:
> >
> > > -----Original Message-----
> > > From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
> > > Sent: Thursday, June 29, 2017 9:54 AM
> > > To: Mark Brown; Liam Girdwood
> > > Cc: Linux-Next Mailing List; Linux Kernel Mailing List; Bard Liao
> > > Subject: linux-next: build failure after merge of the sound-asoc tree
> > >
> > > Hi all,
> > >
> > > After merging the sound-asoc tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > sound/soc/codecs/rt5670.c: In function 'rt5670_set_codec_sysclk':
> > > sound/soc/codecs/rt5670.c:2448:57: error: 'codec' undeclared (first use in this
> > > function)
> > > struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec);
> > > ^
> > > sound/soc/codecs/rt5670.c:2448:57: note: each undeclared identifier is
> > > reported only once for each function it appears in
> > > sound/soc/codecs/rt5670.c: At top level:
> > > sound/soc/codecs/rt5670.c:2775:16: error: initialization from incompatible
> > > pointer type [-Werror=incompatible-pointer-types]
> > > .set_sysclk = rt5670_set_codec_sysclk,
> > > ^
> > > sound/soc/codecs/rt5670.c:2775:16: note: (near initialization for
> > > 'soc_codec_dev_rt5670.set_sysclk')
> > > cc1: some warnings being treated as errors
> > >
> > > Caused by commit
> > >
> > > 6c28ce3c425e ("ASoC: rt5670: move set_sysclk to codec level")
> > >
> > > I have used the sound-asoc tree from next-20170628 for today.
> >
> > Sorry about that. I just sent a patch to fix it. Please check the attached.
>
> I have applied your patch (attached) for today.
>
> Mark, Liam, please apply.
>
> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Ping?
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: build failure after merge of the tip tree
From: Stephen Rothwell @ 2017-07-03 3:01 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Gustavo Padovan
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Jeffy Chen
In-Reply-To: <20170628134310.3a605636@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this semantic
conflict still exists.
On Wed, 28 Jun 2017 13:43:10 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> net/bluetooth/hidp/core.c:1241:39: error: unknown type name 'wait_queue_t'
> static int hidp_session_wake_function(wait_queue_t *wait,
> ^
> In file included from include/linux/mmzone.h:9:0,
> from include/linux/gfp.h:5,
> from include/linux/kmod.h:22,
> from include/linux/module.h:13,
> from net/bluetooth/hidp/core.c:25:
> net/bluetooth/hidp/core.c: In function 'hidp_session_thread':
> net/bluetooth/hidp/core.c:1259:30: error: 'hidp_session_wake_function' undeclared (first use in this function)
> DEFINE_WAIT_FUNC(ctrl_wait, hidp_session_wake_function);
> ^
> include/linux/wait.h:954:12: note: in definition of macro 'DEFINE_WAIT_FUNC'
> .func = function, \
> ^
> net/bluetooth/hidp/core.c:1259:30: note: each undeclared identifier is reported only once for each function it appears in
> DEFINE_WAIT_FUNC(ctrl_wait, hidp_session_wake_function);
> ^
> include/linux/wait.h:954:12: note: in definition of macro 'DEFINE_WAIT_FUNC'
> .func = function, \
> ^
>
> Caused by commit
>
> ac6424b981bc ("sched/wait: Rename wait_queue_t => wait_queue_entry_t")
>
> interacting with commit
>
> 5da8e47d849d ("Bluetooth: hidp: fix possible might sleep error in hidp_session_thread")
>
> from the bluetooth tree. I should have fixed this up in the merge, sorry.
> I added the following merge fix for today.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 28 Jun 2017 13:36:04 +1000
> Subject: [PATCH] Bluetooth: hidp: fix for "sched/wait: Rename wait_queue_t =>
> wait_queue_entry_t"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> net/bluetooth/hidp/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
> index 472b3907b1b0..002743ea509c 100644
> --- a/net/bluetooth/hidp/core.c
> +++ b/net/bluetooth/hidp/core.c
> @@ -1238,7 +1238,7 @@ static void hidp_session_run(struct hidp_session *session)
> smp_mb__after_atomic();
> }
>
> -static int hidp_session_wake_function(wait_queue_t *wait,
> +static int hidp_session_wake_function(wait_queue_entry_t *wait,
> unsigned int mode,
> int sync, void *key)
> {
> --
> 2.11.0
>
> --
> Cheers,
> Stephen Rothwell
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the jc_docs tree with the kbuild tree
From: Stephen Rothwell @ 2017-07-03 2:58 UTC (permalink / raw)
To: Jonathan Corbet, Masahiro Yamada
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Kamil Rytarowski
In-Reply-To: <20170626111331.5443587b@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Mon, 26 Jun 2017 11:13:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the jc_docs tree got a conflict in:
>
> scripts/kernel-doc-xml-ref
>
> between commit:
>
> cb77f0d623ff ("scripts: Switch to more portable Perl shebang")
>
> from the kbuild tree and commit:
>
> 52b3f239bb69 ("Docs: clean up some DocBook loose ends")
>
> from the jc_docs tree.
>
> I fixed it up (the latter removed the file, so I did that) and can
> carry the fix as necessary. This is now fixed as far as linux-next is
> concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging. You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the pci tree with Linus' tree
From: Stephen Rothwell @ 2017-07-03 2:58 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Alex Deucher
In-Reply-To: <20170626105154.27dbca9d@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Mon, 26 Jun 2017 10:51:54 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Bjorn,
>
> Today's linux-next merge of the pci tree got a conflict in:
>
> drivers/gpu/drm/radeon/radeon_device.c
>
> between commit:
>
> 4eb59793cca0 ("drm/radeon: add a PX quirk for another K53TK variant")
>
> from Linus' tree and commit:
>
> 22c21de73087 ("drm/radeon: make MacBook Pro d3_delay quirk more generic")
>
> from the pci tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/gpu/drm/radeon/radeon_device.c
> index 0a6444d72000,aecaafbc8417..000000000000
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@@ -136,12 -135,6 +135,10 @@@ static struct radeon_px_quirk radeon_px
> * https://bugzilla.kernel.org/show_bug.cgi?id=51381
> */
> { PCI_VENDOR_ID_ATI, 0x6840, 0x1043, 0x2122, RADEON_PX_QUIRK_DISABLE_PX },
> + /* Asus K53TK laptop with AMD A6-3420M APU and Radeon 7670m GPU
> + * https://bugs.freedesktop.org/show_bug.cgi?id=101491
> + */
> + { PCI_VENDOR_ID_ATI, 0x6741, 0x1043, 0x2122, RADEON_PX_QUIRK_DISABLE_PX },
> - /* macbook pro 8.2 */
> - { PCI_VENDOR_ID_ATI, 0x6741, PCI_VENDOR_ID_APPLE, 0x00e2, RADEON_PX_QUIRK_LONG_WAKEUP },
> { 0, 0, 0, 0, 0 },
> };
>
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the sound-asoc tree with the pm tree
From: Stephen Rothwell @ 2017-07-03 2:55 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Rafael J. Wysocki
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Sakari Ailus,
Rob Herring, Kuninori Morimoto, Takashi Iwai
In-Reply-To: <20170623122534.3303f515@canb.auug.org.au>
Hi all,
[cc-ing the sound tree maintainer]
With the merge window opening, just a reminder that this conflict
still exists.
On Fri, 23 Jun 2017 12:25:34 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the sound-asoc tree got a conflict in:
>
> drivers/of/base.c
>
> between commit:
>
> 1df09bc66f9b ("of: Move OF property and graph API from base.c to property.c")
>
> from the pm tree and commits:
>
> 4c9c3d595f1b ("of_graph: add of_graph_get_remote_endpoint()")
> 0ef472a973eb ("of_graph: add of_graph_get_port_parent()")
> ac1e6958d3be ("of_graph: add of_graph_get_endpoint_count()")
>
> from the sound-asoc tree.
>
> This pm tree commit appeared briefly in the devicetree tree 9 days ago,
> so I have done the same resolution as I did then.
>
> I added the merge fix patch below. This is now fixed as far as linux-next
> is concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging. You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 23 Jun 2017 12:22:19 +1000
> Subject: [PATCH] of_graph: merge fix up for creating of drivers/of/property.c
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/of/property.c | 60 ++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 50 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index c96389b7c6b3..eda50b4be934 100644
> --- a/drivers/of/property.c
> +++ b/drivers/of/property.c
> @@ -684,6 +684,41 @@ struct device_node *of_graph_get_endpoint_by_regs(
> EXPORT_SYMBOL(of_graph_get_endpoint_by_regs);
>
> /**
> + * of_graph_get_remote_endpoint() - get remote endpoint node
> + * @node: pointer to a local endpoint device_node
> + *
> + * Return: Remote endpoint node associated with remote endpoint node linked
> + * to @node. Use of_node_put() on it when done.
> + */
> +struct device_node *of_graph_get_remote_endpoint(const struct device_node *node)
> +{
> + /* Get remote endpoint node. */
> + return of_parse_phandle(node, "remote-endpoint", 0);
> +}
> +EXPORT_SYMBOL(of_graph_get_remote_endpoint);
> +
> +/**
> + * of_graph_get_port_parent() - get port's parent node
> + * @node: pointer to a local endpoint device_node
> + *
> + * Return: device node associated with endpoint node linked
> + * to @node. Use of_node_put() on it when done.
> + */
> +struct device_node *of_graph_get_port_parent(struct device_node *node)
> +{
> + unsigned int depth;
> +
> + /* Walk 3 levels up only if there is 'ports' node. */
> + for (depth = 3; depth && node; depth--) {
> + node = of_get_next_parent(node);
> + if (depth == 2 && of_node_cmp(node->name, "ports"))
> + break;
> + }
> + return node;
> +}
> +EXPORT_SYMBOL(of_graph_get_port_parent);
> +
> +/**
> * of_graph_get_remote_port_parent() - get remote port's parent node
> * @node: pointer to a local endpoint device_node
> *
> @@ -694,18 +729,11 @@ struct device_node *of_graph_get_remote_port_parent(
> const struct device_node *node)
> {
> struct device_node *np;
> - unsigned int depth;
>
> /* Get remote endpoint node. */
> - np = of_parse_phandle(node, "remote-endpoint", 0);
> + np = of_graph_get_remote_endpoint(node);
>
> - /* Walk 3 levels up only if there is 'ports' node. */
> - for (depth = 3; depth && np; depth--) {
> - np = of_get_next_parent(np);
> - if (depth == 2 && of_node_cmp(np->name, "ports"))
> - break;
> - }
> - return np;
> + return of_graph_get_port_parent(np);
> }
> EXPORT_SYMBOL(of_graph_get_remote_port_parent);
>
> @@ -721,13 +749,25 @@ struct device_node *of_graph_get_remote_port(const struct device_node *node)
> struct device_node *np;
>
> /* Get remote endpoint node. */
> - np = of_parse_phandle(node, "remote-endpoint", 0);
> + np = of_graph_get_remote_endpoint(node);
> if (!np)
> return NULL;
> return of_get_next_parent(np);
> }
> EXPORT_SYMBOL(of_graph_get_remote_port);
>
> +int of_graph_get_endpoint_count(const struct device_node *np)
> +{
> + struct device_node *endpoint;
> + int num = 0;
> +
> + for_each_endpoint_of_node(np, endpoint)
> + num++;
> +
> + return num;
> +}
> +EXPORT_SYMBOL(of_graph_get_endpoint_count);
> +
> /**
> * of_graph_get_remote_node() - get remote parent device_node for given port/endpoint
> * @node: pointer to parent device_node containing graph port/endpoint
> --
> 2.11.0
>
> --
> Cheers,
> Stephen Rothwell
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* linux-next: build warning after merge of the sound-asoc tree
From: Stephen Rothwell @ 2017-07-03 2:26 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Vunny Sodhi
Hi all,
After merging the sound-asoc tree, today's linux-next build (x86_64
allmodconfig) produced this warning:
In file included from sound/soc/intel/skylake/skl-debug.c:23:0:
sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning: 'struct sst_pdata' declared inside parameter list
int (*init)(struct sst_dsp *sst, struct sst_pdata *pdata);
^
sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning: its scope is only this definition or declaration, which is probably not what you want
Exposed by commit
bdd0384a5ada ("ASoC: Intel: Skylake: Add support to read firmware registers")
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* linux-next: manual merge of the drm tree with the vfs tree
From: Stephen Rothwell @ 2017-07-03 2:07 UTC (permalink / raw)
To: Dave Airlie, Al Viro; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List
Hi Dave,
Today's linux-next merge of the drm tree got a conflict in:
drivers/gpu/drm/drm_internal.h
between commits:
012c6741c6aa ("switch compat_drm_version() to drm_ioctl_kernel()")
17e3dade62d6 ("switch compat_drm_getunique() to drm_ioctl_kernel()")
9e92662d01d8 ("switch compat_drm_getclient() to drm_ioctl_kernel()")
from the vfs tree and commit:
e9083420bbac ("drm: introduce sync objects (v4)")
from the drm tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/gpu/drm/drm_internal.h
index 14dfa9c83d1d,5cecc974d2f9..000000000000
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@@ -142,7 -143,17 +143,20 @@@ static inline int drm_debugfs_crtc_crc_
{
return 0;
}
+
#endif
+drm_ioctl_t drm_version;
+drm_ioctl_t drm_getunique;
+drm_ioctl_t drm_getclient;
+
+ /* drm_syncobj.c */
+ void drm_syncobj_open(struct drm_file *file_private);
+ void drm_syncobj_release(struct drm_file *file_private);
+ int drm_syncobj_create_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_private);
+ int drm_syncobj_destroy_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_private);
+ int drm_syncobj_handle_to_fd_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_private);
+ int drm_syncobj_fd_to_handle_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_private);
^ permalink raw reply
* Re: linux-next: manual merge of the kvms390 tree with the s390 tree
From: Stephen Rothwell @ 2017-07-03 1:55 UTC (permalink / raw)
To: Christian Borntraeger, Cornelia Huck, Martin Schwidefsky,
Heiko Carstens
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Marcelo Tosatti, Gleb Natapov, KVM
In-Reply-To: <20170622125928.76918255@canb.auug.org.au>
Hi all,
[cc'ing kvm tree maintainers]
Withe the merge window opening, just a reminder that this conflict
still exists.
On Thu, 22 Jun 2017 12:59:28 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the kvms390 tree got a conflict in:
>
> arch/s390/kvm/gaccess.c
>
> between commit:
>
> a75259825401 ("s390: rename struct psw_bits members")
>
> from the s390 tree and commit:
>
> 8993df124642 ("KVM: s390: implement instruction execution protection for emulated")
>
> from the kvms390 tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc arch/s390/kvm/gaccess.c
> index e0f7d5fc7efd,6fda095f1a99..000000000000
> --- a/arch/s390/kvm/gaccess.c
> +++ b/arch/s390/kvm/gaccess.c
> @@@ -790,8 -808,8 +808,8 @@@ static int guest_page_range(struct kvm_
> return trans_exc(vcpu, PGM_PROTECTION, ga, ar, mode,
> PROT_TYPE_LA);
> ga &= PAGE_MASK;
> - if (psw_bits(*psw).t) {
> + if (psw_bits(*psw).dat) {
> - rc = guest_translate(vcpu, ga, pages, asce, mode);
> + rc = guest_translate(vcpu, ga, pages, asce, mode, &prot);
> if (rc < 0)
> return rc;
> } else {
> @@@ -899,10 -918,10 +918,10 @@@ int guest_translate_address(struct kvm_
> mode, PROT_TYPE_LA);
> }
>
> - if (psw_bits(*psw).t && !asce.r) { /* Use DAT? */
> + if (psw_bits(*psw).dat && !asce.r) { /* Use DAT? */
> - rc = guest_translate(vcpu, gva, gpa, asce, mode);
> + rc = guest_translate(vcpu, gva, gpa, asce, mode, &prot);
> if (rc > 0)
> - return trans_exc(vcpu, rc, gva, 0, mode, PROT_TYPE_DAT);
> + return trans_exc(vcpu, rc, gva, 0, mode, prot);
> } else {
> *gpa = kvm_s390_real_to_abs(vcpu, gva);
> if (kvm_is_error_gpa(vcpu->kvm, *gpa))
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: build failure after merge of the md tree
From: Stephen Rothwell @ 2017-07-03 1:52 UTC (permalink / raw)
To: Shaohua Li, Jens Axboe
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, NeilBrown
In-Reply-To: <20170622114456.329ec8ca@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this merge fixup is
still required.
On Thu, 22 Jun 2017 11:44:56 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the md tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> drivers/md/md.c: In function 'md_run':
> drivers/md/md.c:5449:21: error: too few arguments to function 'bioset_create'
> mddev->sync_set = bioset_create(BIO_POOL_SIZE, 0);
> ^
> In file included from include/linux/blkdev.h:20:0,
> from drivers/md/md.c:49:
> include/linux/bio.h:375:24: note: declared here
> extern struct bio_set *bioset_create(unsigned int, unsigned int, int flags);
> ^
>
> Caused by commit
>
> 5a85071c2cbc ("md: use a separate bio_set for synchronous IO.")
>
> interacting with commit
>
> 011067b05668 ("blk: replace bioset_create_nobvec() with a flags arg to bioset_create()")
>
> from the block tree.
>
> I applied the following merge fix patch:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 22 Jun 2017 11:42:02 +1000
> Subject: [PATCH] md: fix up for "blk: replace bioset_create_nobvec() with a
> flags arg to bioset_create()"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/md/md.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index c5d9cac4760c..ffccee45af8c 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -5446,7 +5446,7 @@ int md_run(struct mddev *mddev)
> return -ENOMEM;
> }
> if (mddev->sync_set == NULL) {
> - mddev->sync_set = bioset_create(BIO_POOL_SIZE, 0);
> + mddev->sync_set = bioset_create(BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
> if (!mddev->sync_set)
> return -ENOMEM;
> }
> --
> 2.11.0
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the net-next tree with the pci tree
From: Stephen Rothwell @ 2017-07-03 1:49 UTC (permalink / raw)
To: David Miller, Networking, Bjorn Helgaas
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Christoph Hellwig, Brian Norris, Kalle Valo
In-Reply-To: <20170621115443.3e10f0bc@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Wed, 21 Jun 2017 11:54:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the net-next tree got a conflict in:
>
> drivers/net/wireless/marvell/mwifiex/pcie.c
>
> between commit:
>
> c336cc0ee4eb ("PCI: Split ->reset_notify() method into ->reset_prepare() and ->reset_done()")
>
> from the pci tree and commit:
>
> 68efd0386988 ("mwifiex: pcie: stop setting/clearing 'surprise_removed'")
>
> from the net-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/net/wireless/marvell/mwifiex/pcie.c
> index 279adf124fc9,b53ecf1eddda..000000000000
> --- a/drivers/net/wireless/marvell/mwifiex/pcie.c
> +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
> @@@ -361,48 -359,35 +361,46 @@@ static void mwifiex_pcie_reset_prepare(
> }
>
> mwifiex_dbg(adapter, INFO,
> - "%s: vendor=0x%4.04x device=0x%4.04x rev=%d %s\n",
> - __func__, pdev->vendor, pdev->device,
> - pdev->revision,
> - prepare ? "Pre-FLR" : "Post-FLR");
> -
> - if (prepare) {
> - /* Kernel would be performing FLR after this notification.
> - * Cleanup all software without cleaning anything related to
> - * PCIe and HW.
> - */
> - mwifiex_shutdown_sw(adapter);
> - clear_bit(MWIFIEX_IFACE_WORK_DEVICE_DUMP, &card->work_flags);
> - clear_bit(MWIFIEX_IFACE_WORK_CARD_RESET, &card->work_flags);
> - } else {
> - /* Kernel stores and restores PCIe function context before and
> - * after performing FLR respectively. Reconfigure the software
> - * and firmware including firmware redownload
> - */
> - ret = mwifiex_reinit_sw(adapter);
> - if (ret) {
> - dev_err(&pdev->dev, "reinit failed: %d\n", ret);
> - return;
> - }
> - }
> + "%s: vendor=0x%4.04x device=0x%4.04x rev=%d Pre-FLR\n",
> + __func__, pdev->vendor, pdev->device, pdev->revision);
> +
> + mwifiex_shutdown_sw(adapter);
> - adapter->surprise_removed = true;
> + clear_bit(MWIFIEX_IFACE_WORK_DEVICE_DUMP, &card->work_flags);
> + clear_bit(MWIFIEX_IFACE_WORK_CARD_RESET, &card->work_flags);
> mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__);
> }
>
> -static const struct pci_error_handlers mwifiex_pcie_err_handler[] = {
> - { .reset_notify = mwifiex_pcie_reset_notify, },
> +/*
> + * Kernel stores and restores PCIe function context before and after performing
> + * FLR respectively. Reconfigure the software and firmware including firmware
> + * redownload.
> + */
> +static void mwifiex_pcie_reset_done(struct pci_dev *pdev)
> +{
> + struct pcie_service_card *card = pci_get_drvdata(pdev);
> + struct mwifiex_adapter *adapter = card->adapter;
> + int ret;
> +
> + if (!adapter) {
> + dev_err(&pdev->dev, "%s: adapter structure is not valid\n",
> + __func__);
> + return;
> + }
> +
> + mwifiex_dbg(adapter, INFO,
> + "%s: vendor=0x%4.04x device=0x%4.04x rev=%d Post-FLR\n",
> + __func__, pdev->vendor, pdev->device, pdev->revision);
> +
> - adapter->surprise_removed = false;
> + ret = mwifiex_reinit_sw(adapter);
> + if (ret)
> + dev_err(&pdev->dev, "reinit failed: %d\n", ret);
> + else
> + mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__);
> +}
> +
> +static const struct pci_error_handlers mwifiex_pcie_err_handler = {
> + .reset_prepare = mwifiex_pcie_reset_prepare,
> + .reset_done = mwifiex_pcie_reset_done,
> };
>
> #ifdef CONFIG_PM_SLEEP
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the kspp tree with the file-locks tree
From: Stephen Rothwell @ 2017-07-03 1:48 UTC (permalink / raw)
To: Kees Cook, Jeff Layton; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List
In-Reply-To: <20170621163211.35abbb57@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Wed, 21 Jun 2017 16:32:11 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the kspp tree got a conflict in:
>
> include/linux/fs.h
>
> between commits:
>
> 7356fd927059 ("fs: new infrastructure for writeback error handling and reporting")
> c7fe314be636 ("fs: add f_md_wb_err field to struct file for tracking metadata errors")
>
> from the file-locks tree and commit:
>
> 1a12979f61e4 ("randstruct: Mark various structs for randomization")
>
> from the kspp tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc include/linux/fs.h
> index 39e4603cd17a,8f28143486c4..000000000000
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@@ -397,8 -392,7 +397,8 @@@ struct address_space
> gfp_t gfp_mask; /* implicit gfp mask for allocations */
> struct list_head private_list; /* ditto */
> void *private_data; /* ditto */
> + errseq_t wb_err;
> - } __attribute__((aligned(sizeof(long))));
> + } __attribute__((aligned(sizeof(long)))) __randomize_layout;
> /*
> * On most architectures that alignment is already the case; but
> * must be enforced here for CRIS, to let the least significant bit
> @@@ -875,8 -868,8 +875,9 @@@ struct file
> struct list_head f_tfile_llink;
> #endif /* #ifdef CONFIG_EPOLL */
> struct address_space *f_mapping;
> + errseq_t f_md_wb_err; /* metadata wb error tracking */
> - } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */
> + } __randomize_layout
> + __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */
>
> struct file_handle {
> __u32 handle_bytes;
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* linux-next: manual merge of the net-next tree with the net tree
From: Stephen Rothwell @ 2017-07-03 1:43 UTC (permalink / raw)
To: David Miller, Networking
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Mohamad Haj Yahia, Saeed Mahameed, Moshe Shemesh, Ilan Tayari
Hi all,
Today's linux-next merge of the net-next tree got conflicts in:
drivers/net/ethernet/mellanox/mlx5/core/health.c
include/linux/mlx5/driver.h
between commit:
2a0165a034ac ("net/mlx5: Cancel delayed recovery work when unloading the driver")
from the net tree and commit:
0179720d6be2 ("Introduce new function for entering bad-health state.")
from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/net/ethernet/mellanox/mlx5/core/health.c
index 8a8b5f0e497c,0648a659b21d..000000000000
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@@ -193,8 -193,8 +194,8 @@@ static void health_care(struct work_str
mlx5_core_warn(dev, "handling bad device here\n");
mlx5_handle_bad_state(dev);
- spin_lock(&health->wq_lock);
+ spin_lock_irqsave(&health->wq_lock, flags);
- if (!test_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags))
+ if (!test_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags))
schedule_delayed_work(&health->recover_work, recover_delay);
else
dev_err(&dev->pdev->dev,
@@@ -334,11 -341,11 +343,12 @@@ void mlx5_stop_health_poll(struct mlx5_
void mlx5_drain_health_wq(struct mlx5_core_dev *dev)
{
struct mlx5_core_health *health = &dev->priv.health;
+ unsigned long flags;
- spin_lock(&health->wq_lock);
+ spin_lock_irqsave(&health->wq_lock, flags);
set_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags);
+ set_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags);
- spin_unlock(&health->wq_lock);
+ spin_unlock_irqrestore(&health->wq_lock, flags);
cancel_delayed_work_sync(&health->recover_work);
cancel_work_sync(&health->work);
}
diff --cc include/linux/mlx5/driver.h
index ba260330ce5e,2ab4ae3e3a1a..000000000000
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@@ -925,7 -945,7 +945,8 @@@ int mlx5_health_init(struct mlx5_core_d
void mlx5_start_health_poll(struct mlx5_core_dev *dev);
void mlx5_stop_health_poll(struct mlx5_core_dev *dev);
void mlx5_drain_health_wq(struct mlx5_core_dev *dev);
+void mlx5_drain_health_recovery(struct mlx5_core_dev *dev);
+ void mlx5_trigger_health_work(struct mlx5_core_dev *dev);
int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
struct mlx5_buf *buf, int node);
int mlx5_buf_alloc(struct mlx5_core_dev *dev, int size, struct mlx5_buf *buf);
^ permalink raw reply
* linux-next: manual merge of the net-next tree with the arm64 tree
From: Stephen Rothwell @ 2017-07-03 1:37 UTC (permalink / raw)
To: David Miller, Networking, Catalin Marinas
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Luc Van Oostenryck, Will Deacon, Daniel Borkmann
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
arch/arm64/net/bpf_jit_comp.c
between commit:
425e1ed73e65 ("arm64: fix endianness annotation for 'struct jit_ctx' and friends")
from the arm64 tree and commit:
f1c9eed7f437 ("bpf, arm64: take advantage of stack_depth tracking")
from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/arm64/net/bpf_jit_comp.c
index 8860bb9c33a1,2f0505b5c240..000000000000
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@@ -70,7 -70,8 +70,8 @@@ struct jit_ctx
int idx;
int epilogue_offset;
int *offset;
- u32 *image;
+ __le32 *image;
+ u32 stack_size;
};
static inline void emit(const u32 insn, struct jit_ctx *ctx)
^ permalink raw reply
* Re: linux-next: manual merge of the tip tree with the jc_docs tree
From: Stephen Rothwell @ 2017-07-03 1:33 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Jonathan Corbet
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Mauro Carvalho Chehab
In-Reply-To: <20170621141809.11103aab@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Wed, 21 Jun 2017 14:18:09 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
>
> Documentation/DocBook/kernel-hacking.tmpl
>
> between commit:
>
> c4fcd7cabb83 ("docs-rst: convert kernel-hacking to ReST")
>
> from the jc_docs tree and commit:
>
> ac6424b981bc ("sched/wait: Rename wait_queue_t => wait_queue_entry_t")
>
> from the tip tree.
>
> I deleted the file and added the following fixup patch.
>
> This is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 21 Jun 2017 14:14:45 +1000
> Subject: [PATCH] sched/wait: fix up for "docs-rst: convert kernel-hacking to
> ReST"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> Documentation/kernel-hacking/hacking.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/kernel-hacking/hacking.rst b/Documentation/kernel-hacking/hacking.rst
> index 1a456b60a7cf..daf3883b2694 100644
> --- a/Documentation/kernel-hacking/hacking.rst
> +++ b/Documentation/kernel-hacking/hacking.rst
> @@ -498,7 +498,7 @@ Wait Queues ``include/linux/wait.h``
> A wait queue is used to wait for someone to wake you up when a certain
> condition is true. They must be used carefully to ensure there is no
> race condition. You declare a :c:type:`wait_queue_head_t`, and then processes
> -which want to wait for that condition declare a :c:type:`wait_queue_t`
> +which want to wait for that condition declare a :c:type:`wait_queue_entry_t`
> referring to themselves, and place that in the queue.
>
> Declaring
> --
> 2.11.0
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the akpm-current tree with the kspp tree
From: Stephen Rothwell @ 2017-07-03 1:31 UTC (permalink / raw)
To: Andrew Morton, Kees Cook
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Manfred Spraul
In-Reply-To: <20170620151549.3380276f@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Tue, 20 Jun 2017 15:15:49 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> include/linux/sem.h
>
> between commit:
>
> 1a12979f61e4 ("randstruct: Mark various structs for randomization")
>
> from the kspp tree and commit:
>
> 337e62a32a54 ("ipc/sem.c: remove sem_base, embed struct sem")
>
> from the akpm-current tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc include/linux/sem.h
> index 23bcbdfad4a6,be5cf2ea14ad..000000000000
> --- a/include/linux/sem.h
> +++ b/include/linux/sem.h
> @@@ -21,7 -39,9 +39,9 @@@ struct sem_array
> int sem_nsems; /* no. of semaphores in array */
> int complex_count; /* pending complex operations */
> unsigned int use_global_lock;/* >0: global lock required */
> +
> + struct sem sems[];
> -};
> +} __randomize_layout;
>
> #ifdef CONFIG_SYSVIPC
>
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the tty tree with the arm-soc tree
From: Stephen Rothwell @ 2017-07-03 1:30 UTC (permalink / raw)
To: Greg KH, Olof Johansson, Arnd Bergmann, ARM
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Alexandre Belloni
In-Reply-To: <20170620135242.14ecdcb4@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Tue, 20 Jun 2017 13:52:42 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the tty tree got a conflict in:
>
> include/linux/platform_data/atmel.h
>
> between commit:
>
> 8a3d809373c6 ("ARM: at91: remove atmel_nand_data")
>
> from the arm-soc tree and commit:
>
> 92c8f7c0e109 ("tty/serial: atmel: make the driver DT only")
>
> from the tty tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc include/linux/platform_data/atmel.h
> index 70c5c766628e,d36bc8d17e97..000000000000
> --- a/include/linux/platform_data/atmel.h
> +++ b/include/linux/platform_data/atmel.h
> @@@ -7,8 -7,9 +7,6 @@@
> #ifndef __ATMEL_H__
> #define __ATMEL_H__
>
> - #include <linux/serial.h>
> -#include <linux/mtd/nand.h>
> -#include <linux/mtd/partitions.h>
> --
> /* Compact Flash */
> struct at91_cf_data {
> int irq_pin; /* I/O IRQ */
> @@@ -21,23 -22,26 +19,14 @@@
> #define AT91_IDE_SWAP_A0_A2 0x02
> };
>
> - /* Serial */
> - struct atmel_uart_data {
> - int num; /* port num */
> - short use_dma_tx; /* use transmit DMA? */
> - short use_dma_rx; /* use receive DMA? */
> - void __iomem *regs; /* virt. base address, if any */
> - struct serial_rs485 rs485; /* rs485 settings */
> - /* NAND / SmartMedia */
> -struct atmel_nand_data {
> - int enable_pin; /* chip enable */
> - int det_pin; /* card detect */
> - int rdy_pin; /* ready/busy */
> - u8 rdy_pin_active_low; /* rdy_pin value is inverted */
> - u8 ale; /* address line number connected to ALE */
> - u8 cle; /* address line number connected to CLE */
> - u8 bus_width_16; /* buswidth is 16 bit */
> - u8 ecc_mode; /* ecc mode */
> - u8 on_flash_bbt; /* bbt on flash */
> - struct mtd_partition *parts;
> - unsigned int num_parts;
> - bool has_dma; /* support dma transfer */
> -
> - /* default is false, only for at32ap7000 chip is true */
> - bool need_reset_workaround;
> --};
> --
> /* FIXME: this needs a better location, but gets stuff building again */
> +#ifdef CONFIG_ATMEL_PM
> extern int at91_suspend_entering_slow_clock(void);
> +#else
> +static inline int at91_suspend_entering_slow_clock(void)
> +{
> + return 0;
> +}
> +#endif
>
> #endif /* __ATMEL_H__ */
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the tip tree with the arm64 tree
From: Stephen Rothwell @ 2017-07-03 1:29 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Catalin Marinas
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Shiju Jose,
James Morse, Borislav Petkov, Tyler Baicar
In-Reply-To: <20170616132503.776d6d51@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still exists.
On Fri, 16 Jun 2017 13:25:03 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
>
> drivers/acpi/apei/ghes.c
>
> between commit:
>
> d0189b2eef2e ("acpi: apei: handle SEA notification type for ARMv8")
>
> from the arm64 tree and commit:
>
> 7bf130e4a065 ("ACPI/APEI: Handle GSIV and GPIO notification types")
>
> from the tip tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/acpi/apei/ghes.c
> index dfdb33f09f0a,d2c8a9286fa8..000000000000
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@@ -810,59 -718,10 +810,59 @@@ static int ghes_notify_hed(struct notif
> return ret;
> }
>
> - static struct notifier_block ghes_notifier_sci = {
> - .notifier_call = ghes_notify_sci,
> + static struct notifier_block ghes_notifier_hed = {
> + .notifier_call = ghes_notify_hed,
> };
>
> +#ifdef CONFIG_ACPI_APEI_SEA
> +static LIST_HEAD(ghes_sea);
> +
> +/*
> + * Return 0 only if one of the SEA error sources successfully reported an error
> + * record sent from the firmware.
> + */
> +int ghes_notify_sea(void)
> +{
> + struct ghes *ghes;
> + int ret = -ENOENT;
> +
> + rcu_read_lock();
> + list_for_each_entry_rcu(ghes, &ghes_sea, list) {
> + if (!ghes_proc(ghes))
> + ret = 0;
> + }
> + rcu_read_unlock();
> + return ret;
> +}
> +
> +static void ghes_sea_add(struct ghes *ghes)
> +{
> + mutex_lock(&ghes_list_mutex);
> + list_add_rcu(&ghes->list, &ghes_sea);
> + mutex_unlock(&ghes_list_mutex);
> +}
> +
> +static void ghes_sea_remove(struct ghes *ghes)
> +{
> + mutex_lock(&ghes_list_mutex);
> + list_del_rcu(&ghes->list);
> + mutex_unlock(&ghes_list_mutex);
> + synchronize_rcu();
> +}
> +#else /* CONFIG_ACPI_APEI_SEA */
> +static inline void ghes_sea_add(struct ghes *ghes)
> +{
> + pr_err(GHES_PFX "ID: %d, trying to add SEA notification which is not supported\n",
> + ghes->generic->header.source_id);
> +}
> +
> +static inline void ghes_sea_remove(struct ghes *ghes)
> +{
> + pr_err(GHES_PFX "ID: %d, trying to remove SEA notification which is not supported\n",
> + ghes->generic->header.source_id);
> +}
> +#endif /* CONFIG_ACPI_APEI_SEA */
> +
> #ifdef CONFIG_HAVE_ACPI_APEI_NMI
> /*
> * printk is not safe in NMI context. So in NMI handler, we allocate
> @@@ -1096,15 -966,10 +1096,18 @@@ static int ghes_probe(struct platform_d
> case ACPI_HEST_NOTIFY_POLLED:
> case ACPI_HEST_NOTIFY_EXTERNAL:
> case ACPI_HEST_NOTIFY_SCI:
> + case ACPI_HEST_NOTIFY_GSIV:
> + case ACPI_HEST_NOTIFY_GPIO:
> break;
> + case ACPI_HEST_NOTIFY_SEA:
> + if (!IS_ENABLED(CONFIG_ACPI_APEI_SEA)) {
> + pr_warn(GHES_PFX "Generic hardware error source: %d notified via SEA is not supported\n",
> + generic->header.source_id);
> + rc = -ENOTSUPP;
> + goto err;
> + }
> + break;
> +
> case ACPI_HEST_NOTIFY_NMI:
> if (!IS_ENABLED(CONFIG_HAVE_ACPI_APEI_NMI)) {
> pr_warn(GHES_PFX "Generic hardware error source: %d notified via NMI interrupt is not supported!\n",
> @@@ -1162,16 -1027,17 +1165,20 @@@
> goto err_edac_unreg;
> }
> break;
> +
> case ACPI_HEST_NOTIFY_SCI:
> + case ACPI_HEST_NOTIFY_GSIV:
> + case ACPI_HEST_NOTIFY_GPIO:
> mutex_lock(&ghes_list_mutex);
> - if (list_empty(&ghes_sci))
> - register_acpi_hed_notifier(&ghes_notifier_sci);
> - list_add_rcu(&ghes->list, &ghes_sci);
> + if (list_empty(&ghes_hed))
> + register_acpi_hed_notifier(&ghes_notifier_hed);
> + list_add_rcu(&ghes->list, &ghes_hed);
> mutex_unlock(&ghes_list_mutex);
> break;
> + case ACPI_HEST_NOTIFY_SEA:
> + ghes_sea_add(ghes);
> + break;
> +
> case ACPI_HEST_NOTIFY_NMI:
> ghes_nmi_add(ghes);
> break;
> @@@ -1218,9 -1084,7 +1228,10 @@@ static int ghes_remove(struct platform_
> mutex_unlock(&ghes_list_mutex);
> synchronize_rcu();
> break;
> + case ACPI_HEST_NOTIFY_SEA:
> + ghes_sea_remove(ghes);
> + break;
> +
> case ACPI_HEST_NOTIFY_NMI:
> ghes_nmi_remove(ghes);
> break;
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: manual merge of the char-misc tree with the jc_docs tree
From: Stephen Rothwell @ 2017-07-03 1:27 UTC (permalink / raw)
To: Greg KH, Arnd Bergmann, Jonathan Corbet
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Mauro Carvalho Chehab, Andrew F. Davis
In-Reply-To: <20170614140416.26b97944@canb.auug.org.au>
Hi all,
With the merge window opening, just a reminder that this conflict still
exists.
On Wed, 14 Jun 2017 14:04:16 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the char-misc tree got a conflict in:
>
> Documentation/DocBook/w1.tmpl
>
> between commit:
>
> b4c1064a76e7 ("docs-rst: convert w1 book to ReST")
>
> from the jc_docs tree and commit:
>
> f85e8813b2c9 ("DocBook: w1: Update W1 file locations and names in DocBook")
>
> from the char-misc tree.
>
> I fixed it up (I removed the file and added the patch below) and can
> carry the fix as necessary. This is now fixed as far as linux-next is
> concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging. You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 14 Jun 2017 14:01:14 +1000
> Subject: [PATCH] docs-rst: merge fix for "DocBook: w1: Update W1 file
> locations and names in DocBook"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> Documentation/driver-api/w1.rst | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/driver-api/w1.rst b/Documentation/driver-api/w1.rst
> index c1da8f0cb476..64826ceba2de 100644
> --- a/Documentation/driver-api/w1.rst
> +++ b/Documentation/driver-api/w1.rst
> @@ -10,12 +10,12 @@ W1 API internal to the kernel
> W1 API internal to the kernel
> -----------------------------
>
> -drivers/w1/w1.h
> -~~~~~~~~~~~~~~~
> +include/linux/w1.h
> +~~~~~~~~~~~~~~~~~~
>
> -W1 core functions.
> +W1 kernel API functions.
>
> -.. kernel-doc:: drivers/w1/w1.h
> +.. kernel-doc:: include/linux/w1.h
> :internal:
>
> drivers/w1/w1.c
> @@ -26,20 +26,20 @@ W1 core functions.
> .. kernel-doc:: drivers/w1/w1.c
> :internal:
>
> -drivers/w1/w1_family.h
> +drivers/w1/w1_family.c
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> Allows registering device family operations.
>
> -.. kernel-doc:: drivers/w1/w1_family.h
> - :internal:
> +.. kernel-doc:: drivers/w1/w1_family.c
> + :export:
>
> -drivers/w1/w1_family.c
> -~~~~~~~~~~~~~~~~~~~~~~~
> +drivers/w1/w1_internal.h
> +~~~~~~~~~~~~~~~~~~~~~~~~
>
> -Allows registering device family operations.
> +W1 internal initialization for master devices.
>
> -.. kernel-doc:: drivers/w1/w1_family.c
> +.. kernel-doc:: drivers/w1/w1_internal.h
> :export:
>
> drivers/w1/w1_int.c
> --
> 2.11.0
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* linux-next: merge conflicts reminder
From: Stephen Rothwell @ 2017-07-03 1:26 UTC (permalink / raw)
To: Jens Axboe, David Sterba, Ulf Hansson, Martin Schwidefsky,
Heiko Carstens, James Bottomley, Jeff Layton, Bjorn Helgaas,
Kees Cook
Cc: Linux-Next Mailing List, Christoph Hellwig, Josef Bacik,
Linus Walleij, Sebastian Ott, Ming Lei, Bart Van Assche,
Martin K. Petersen, Liu Bo, Guoqing Jiang, Goldwyn Rodrigues,
Mike Snitzer
Hi all,
With the merge window open, just a reminder of the (bit of a mess) with
merge conflicts involving the block tree. There are conflicts against
the s390, btrfs-kdave, mmc, scsi, file-locks, kspp, pci and Linus' trees.
I think this is some kind of record :-(
Anyway, the merge resolution when merging the block tree on Friday is
below. This does not include the resolutions for the kspp, scsi and
mmc trees where are merged after the block tree in linux-next.
--
Cheers,
Stephen Rothwell
ef467dc885aaa4aa6167e86afd3656107df68dfe
diff --cc drivers/md/dm-io.c
index 8d5ca30f6551,81248a8a8b57..25039607f3cb
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@@ -317,9 -318,9 +318,9 @@@ static void do_region(int op, int op_fl
else if (op == REQ_OP_WRITE_SAME)
special_cmd_max_sectors = q->limits.max_write_same_sectors;
if ((op == REQ_OP_DISCARD || op == REQ_OP_WRITE_ZEROES ||
- op == REQ_OP_WRITE_SAME) &&
- special_cmd_max_sectors == 0) {
+ op == REQ_OP_WRITE_SAME) && special_cmd_max_sectors == 0) {
+ atomic_inc(&io->count);
- dec_count(io, region, -EOPNOTSUPP);
+ dec_count(io, region, BLK_STS_NOTSUPP);
return;
}
diff --cc drivers/md/dm-raid1.c
index 4da8858856fb,3ab584b686e0..84a9b2050794
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@@ -1255,26 -1253,16 +1256,26 @@@ static int mirror_end_io(struct dm_targ
if (!(bio->bi_opf & REQ_PREFLUSH) &&
bio_op(bio) != REQ_OP_DISCARD)
dm_rh_dec(ms->rh, bio_record->write_region);
- return error;
+ return DM_ENDIO_DONE;
}
- if (error == -EOPNOTSUPP)
+ if (*error == BLK_STS_NOTSUPP)
- return DM_ENDIO_DONE;
+ goto out;
- if ((error == -EWOULDBLOCK) && (bio->bi_opf & REQ_RAHEAD))
+ if (bio->bi_opf & REQ_RAHEAD)
- return DM_ENDIO_DONE;
+ goto out;
- if (unlikely(error)) {
+ if (unlikely(*error)) {
+ if (!bio_record->details.bi_bdev) {
+ /*
+ * There wasn't enough memory to record necessary
+ * information for a retry or there was no other
+ * mirror in-sync.
+ */
+ DMERR_LIMIT("Mirror read failed.");
- return -EIO;
++ return BLK_STS_IOERR;
+ }
+
m = bio_record->m;
DMERR("Mirror read failed from %s. Trying alternative device.",
@@@ -1290,8 -1278,7 +1291,8 @@@
bd = &bio_record->details;
dm_bio_restore(bd, bio);
+ bio_record->details.bi_bdev = NULL;
- bio->bi_error = 0;
+ bio->bi_status = 0;
queue_bio(ms, bio, rw);
return DM_ENDIO_INCOMPLETE;
@@@ -1299,10 -1286,7 +1300,10 @@@
DMERR("All replicated volumes dead, failing I/O");
}
+out:
+ bio_record->details.bi_bdev = NULL;
+
- return error;
+ return DM_ENDIO_DONE;
}
static void mirror_presuspend(struct dm_target *ti)
diff --cc drivers/nvme/host/pci.c
index 311060af0dce,32a98e2740ad..5f80c4b1c4d9
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@@ -2151,14 -2302,14 +2303,15 @@@ static int nvme_probe(struct pci_dev *p
return result;
}
-static void nvme_reset_notify(struct pci_dev *pdev, bool prepare)
+static void nvme_reset_prepare(struct pci_dev *pdev)
{
- struct nvme_dev *dev = pci_get_drvdata(pdev);
+ nvme_dev_disable(pci_get_drvdata(pdev), false);
+}
- if (prepare)
- nvme_dev_disable(dev, false);
- else
- nvme_reset_ctrl(&dev->ctrl);
+static void nvme_reset_done(struct pci_dev *pdev)
+{
- nvme_reset(pci_get_drvdata(pdev));
++ struct nvme_dev *dev = pci_get_drvdata(pdev);
++ nvme_reset_ctrl(&dev->ctrl);
}
static void nvme_shutdown(struct pci_dev *pdev)
diff --cc drivers/s390/block/scm_blk.c
index 725f912fab41,3c2c84b72877..0071febac9e6
--- a/drivers/s390/block/scm_blk.c
+++ b/drivers/s390/block/scm_blk.c
@@@ -228,12 -231,22 +228,12 @@@ static inline void scm_request_init(str
aob->request.data = (u64) aobrq;
scmrq->bdev = bdev;
scmrq->retries = 4;
- scmrq->error = 0;
+ scmrq->error = BLK_STS_OK;
/* We don't use all msbs - place aidaws at the end of the aob page. */
scmrq->next_aidaw = (void *) &aob->msb[nr_requests_per_io];
- scm_request_cluster_init(scmrq);
}
-static void scm_ensure_queue_restart(struct scm_blk_dev *bdev)
-{
- if (atomic_read(&bdev->queued_reqs)) {
- /* Queue restart is triggered by the next interrupt. */
- return;
- }
- blk_delay_queue(bdev->rq, SCM_QUEUE_DELAY);
-}
-
-void scm_request_requeue(struct scm_request *scmrq)
+static void scm_request_requeue(struct scm_request *scmrq)
{
struct scm_blk_dev *bdev = scmrq->bdev;
int i;
@@@ -271,83 -289,75 +271,83 @@@ static void scm_request_start(struct sc
SCM_LOG(5, "no subchannel");
scm_request_requeue(scmrq);
}
- return ret;
}
-static void scm_blk_request(struct request_queue *rq)
+struct scm_queue {
+ struct scm_request *scmrq;
+ spinlock_t lock;
+};
+
- static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
++static blk_status_t scm_blk_request(struct blk_mq_hw_ctx *hctx,
+ const struct blk_mq_queue_data *qd)
{
- struct scm_device *scmdev = rq->queuedata;
+ struct scm_device *scmdev = hctx->queue->queuedata;
struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
- struct scm_request *scmrq = NULL;
- struct request *req;
+ struct scm_queue *sq = hctx->driver_data;
+ struct request *req = qd->rq;
+ struct scm_request *scmrq;
- while ((req = blk_peek_request(rq))) {
- if (!scm_permit_request(bdev, req))
- goto out;
+ spin_lock(&sq->lock);
+ if (!scm_permit_request(bdev, req)) {
+ spin_unlock(&sq->lock);
- return BLK_MQ_RQ_QUEUE_BUSY;
++ return BLK_STS_RESOURCE;
+ }
+ scmrq = sq->scmrq;
+ if (!scmrq) {
+ scmrq = scm_request_fetch();
if (!scmrq) {
- scmrq = scm_request_fetch();
- if (!scmrq) {
- SCM_LOG(5, "no request");
- goto out;
- }
- scm_request_init(bdev, scmrq);
+ SCM_LOG(5, "no request");
+ spin_unlock(&sq->lock);
- return BLK_MQ_RQ_QUEUE_BUSY;
++ return BLK_STS_RESOURCE;
}
- scm_request_set(scmrq, req);
+ scm_request_init(bdev, scmrq);
+ sq->scmrq = scmrq;
+ }
+ scm_request_set(scmrq, req);
- if (!scm_reserve_cluster(scmrq)) {
- SCM_LOG(5, "cluster busy");
- scm_request_set(scmrq, NULL);
- if (scmrq->aob->request.msb_count)
- goto out;
+ if (scm_request_prepare(scmrq)) {
+ SCM_LOG(5, "aidaw alloc failed");
+ scm_request_set(scmrq, NULL);
- scm_request_done(scmrq);
- return;
- }
+ if (scmrq->aob->request.msb_count)
+ scm_request_start(scmrq);
- if (scm_need_cluster_request(scmrq)) {
- if (scmrq->aob->request.msb_count) {
- /* Start cluster requests separately. */
- scm_request_set(scmrq, NULL);
- if (scm_request_start(scmrq))
- return;
- } else {
- atomic_inc(&bdev->queued_reqs);
- blk_start_request(req);
- scm_initiate_cluster_request(scmrq);
- }
- scmrq = NULL;
- continue;
- }
+ sq->scmrq = NULL;
+ spin_unlock(&sq->lock);
- return BLK_MQ_RQ_QUEUE_BUSY;
++ return BLK_STS_RESOURCE;
+ }
+ blk_mq_start_request(req);
- if (scm_request_prepare(scmrq)) {
- SCM_LOG(5, "aidaw alloc failed");
- scm_request_set(scmrq, NULL);
- goto out;
- }
- blk_start_request(req);
+ if (qd->last || scmrq->aob->request.msb_count == nr_requests_per_io) {
+ scm_request_start(scmrq);
+ sq->scmrq = NULL;
+ }
+ spin_unlock(&sq->lock);
- return BLK_MQ_RQ_QUEUE_OK;
++ return BLK_STS_OK;
+}
- if (scmrq->aob->request.msb_count < nr_requests_per_io)
- continue;
+static int scm_blk_init_hctx(struct blk_mq_hw_ctx *hctx, void *data,
+ unsigned int idx)
+{
+ struct scm_queue *qd = kzalloc(sizeof(*qd), GFP_KERNEL);
- if (scm_request_start(scmrq))
- return;
+ if (!qd)
+ return -ENOMEM;
- scmrq = NULL;
- }
-out:
- if (scmrq)
- scm_request_start(scmrq);
- else
- scm_ensure_queue_restart(bdev);
+ spin_lock_init(&qd->lock);
+ hctx->driver_data = qd;
+
+ return 0;
+}
+
+static void scm_blk_exit_hctx(struct blk_mq_hw_ctx *hctx, unsigned int idx)
+{
+ struct scm_queue *qd = hctx->driver_data;
+
+ WARN_ON(qd->scmrq);
+ kfree(hctx->driver_data);
+ hctx->driver_data = NULL;
}
static void __scmrq_log_error(struct scm_request *scmrq)
@@@ -394,28 -419,43 +394,28 @@@ restart
return;
requeue:
- spin_lock_irqsave(&bdev->rq_lock, flags);
scm_request_requeue(scmrq);
- spin_unlock_irqrestore(&bdev->rq_lock, flags);
}
- void scm_blk_irq(struct scm_device *scmdev, void *data, int error)
-static void scm_blk_tasklet(struct scm_blk_dev *bdev)
++void scm_blk_irq(struct scm_device *scmdev, void *data, blk_status_t error)
{
- struct scm_request *scmrq;
- unsigned long flags;
-
- spin_lock_irqsave(&bdev->lock, flags);
- while (!list_empty(&bdev->finished_requests)) {
- scmrq = list_first_entry(&bdev->finished_requests,
- struct scm_request, list);
- list_del(&scmrq->list);
- spin_unlock_irqrestore(&bdev->lock, flags);
+ struct scm_request *scmrq = data;
- if (scmrq->error && scmrq->retries-- > 0) {
+ scmrq->error = error;
+ if (error) {
+ __scmrq_log_error(scmrq);
+ if (scmrq->retries-- > 0) {
scm_blk_handle_error(scmrq);
-
- /* Request restarted or requeued, handle next. */
- spin_lock_irqsave(&bdev->lock, flags);
- continue;
+ return;
}
+ }
- if (scm_test_cluster_request(scmrq)) {
- scm_cluster_request_irq(scmrq);
- spin_lock_irqsave(&bdev->lock, flags);
- continue;
- }
+ scm_request_finish(scmrq);
+}
- scm_request_finish(scmrq);
- spin_lock_irqsave(&bdev->lock, flags);
- }
- spin_unlock_irqrestore(&bdev->lock, flags);
- /* Look out for more requests. */
- blk_run_queue(bdev->rq);
+static void scm_blk_request_done(struct request *req)
+{
+ blk_mq_end_request(req, 0);
}
static const struct block_device_operations scm_blk_devops = {
diff --cc drivers/s390/block/scm_blk.h
index 242d17a91920,cd598d1a4eae..71288dd9dd7f
--- a/drivers/s390/block/scm_blk.h
+++ b/drivers/s390/block/scm_blk.h
@@@ -32,7 -35,14 +32,7 @@@ struct scm_request
struct aob *aob;
struct list_head list;
u8 retries;
- int error;
+ blk_status_t error;
-#ifdef CONFIG_SCM_BLOCK_CLUSTER_WRITE
- struct {
- enum {CLUSTER_NONE, CLUSTER_READ, CLUSTER_WRITE} state;
- struct list_head list;
- void **buf;
- } cluster;
-#endif
};
#define to_aobrq(rq) container_of((void *) rq, struct aob_rq_header, data)
@@@ -40,8 -50,11 +40,8 @@@
int scm_blk_dev_setup(struct scm_blk_dev *, struct scm_device *);
void scm_blk_dev_cleanup(struct scm_blk_dev *);
void scm_blk_set_available(struct scm_blk_dev *);
- void scm_blk_irq(struct scm_device *, void *, int);
+ void scm_blk_irq(struct scm_device *, void *, blk_status_t);
-void scm_request_finish(struct scm_request *);
-void scm_request_requeue(struct scm_request *);
-
struct aidaw *scm_aidaw_fetch(struct scm_request *scmrq, unsigned int bytes);
int scm_drv_init(void);
diff --cc fs/block_dev.c
index 9e9f25dc69bc,2c5f08696fff..9941dc8342df
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@@ -262,11 -263,8 +263,11 @@@ __blkdev_direct_IO_simple(struct kiocb
if (vecs != inline_vecs)
kfree(vecs);
- if (unlikely(bio.bi_error))
- ret = bio.bi_error;
+ if (unlikely(bio.bi_status))
- return blk_status_to_errno(bio.bi_status);
++ ret = blk_status_to_errno(bio.bi_status);
+
+ bio_uninit(&bio);
+
return ret;
}
diff --cc fs/btrfs/disk-io.c
index b6758892874f,6036d15b47b8..7065201bedcf
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@@ -87,8 -87,9 +87,8 @@@ struct btrfs_end_io_wq
bio_end_io_t *end_io;
void *private;
struct btrfs_fs_info *info;
- int error;
+ blk_status_t status;
enum btrfs_wq_endio_type metadata;
- struct list_head list;
struct btrfs_work work;
};
@@@ -867,10 -868,10 +867,10 @@@ unsigned long btrfs_async_submit_limit(
static void run_one_async_start(struct btrfs_work *work)
{
struct async_submit_bio *async;
- int ret;
+ blk_status_t ret;
async = container_of(work, struct async_submit_bio, work);
- ret = async->submit_bio_start(async->inode, async->bio,
+ ret = async->submit_bio_start(async->private_data, async->bio,
async->mirror_num, async->bio_flags,
async->bio_offset);
if (ret)
@@@ -915,20 -916,19 +915,20 @@@ static void run_one_async_free(struct b
kfree(async);
}
- int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
-blk_status_t btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info,
- struct inode *inode, struct bio *bio, int mirror_num,
- unsigned long bio_flags, u64 bio_offset,
- extent_submit_bio_hook_t *submit_bio_start,
- extent_submit_bio_hook_t *submit_bio_done)
++blk_status_t btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
+ int mirror_num, unsigned long bio_flags,
+ u64 bio_offset, void *private_data,
+ extent_submit_bio_hook_t *submit_bio_start,
+ extent_submit_bio_hook_t *submit_bio_done)
{
struct async_submit_bio *async;
async = kmalloc(sizeof(*async), GFP_NOFS);
if (!async)
- return -ENOMEM;
+ return BLK_STS_RESOURCE;
- async->inode = inode;
+ async->private_data = private_data;
+ async->fs_info = fs_info;
async->bio = bio;
async->mirror_num = mirror_num;
async->submit_bio_start = submit_bio_start;
@@@ -971,12 -971,12 +971,12 @@@ static blk_status_t btree_csum_one_bio(
break;
}
- return ret;
+ return errno_to_blk_status(ret);
}
- static int __btree_submit_bio_start(void *private_data, struct bio *bio,
-static blk_status_t __btree_submit_bio_start(struct inode *inode,
- struct bio *bio, int mirror_num, unsigned long bio_flags,
- u64 bio_offset)
++static blk_status_t __btree_submit_bio_start(void *private_data, struct bio *bio,
+ int mirror_num, unsigned long bio_flags,
+ u64 bio_offset)
{
/*
* when we're called for a write, we're already in the async
@@@ -985,12 -985,11 +985,12 @@@
return btree_csum_one_bio(bio);
}
- static int __btree_submit_bio_done(void *private_data, struct bio *bio,
-static blk_status_t __btree_submit_bio_done(struct inode *inode,
- struct bio *bio, int mirror_num, unsigned long bio_flags,
- u64 bio_offset)
++static blk_status_t __btree_submit_bio_done(void *private_data, struct bio *bio,
+ int mirror_num, unsigned long bio_flags,
+ u64 bio_offset)
{
+ struct inode *inode = private_data;
- int ret;
+ blk_status_t ret;
/*
* when we're called for a write, we're already in the async
@@@ -1015,14 -1014,13 +1015,14 @@@ static int check_async_write(unsigned l
return 1;
}
- static int btree_submit_bio_hook(void *private_data, struct bio *bio,
-static blk_status_t btree_submit_bio_hook(struct inode *inode, struct bio *bio,
++static blk_status_t btree_submit_bio_hook(void *private_data, struct bio *bio,
int mirror_num, unsigned long bio_flags,
u64 bio_offset)
{
+ struct inode *inode = private_data;
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
int async = check_async_write(bio_flags);
- int ret;
+ blk_status_t ret;
if (bio_op(bio) != REQ_OP_WRITE) {
/*
@@@ -3485,57 -3490,59 +3485,57 @@@ static void btrfs_end_empty_barrier(str
}
/*
- * trigger flushes for one the devices. If you pass wait == 0, the flushes are
- * sent down. With wait == 1, it waits for the previous flush.
- *
- * any device where the flush fails with eopnotsupp are flagged as not-barrier
- * capable
+ * Submit a flush request to the device if it supports it. Error handling is
+ * done in the waiting counterpart.
*/
-static blk_status_t write_dev_flush(struct btrfs_device *device, int wait)
+static void write_dev_flush(struct btrfs_device *device)
{
struct request_queue *q = bdev_get_queue(device->bdev);
- struct bio *bio;
- blk_status_t ret = 0;
+ struct bio *bio = device->flush_bio;
if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags))
- return 0;
+ return;
- if (wait) {
- bio = device->flush_bio;
- if (!bio)
- return 0;
+ bio_reset(bio);
+ bio->bi_end_io = btrfs_end_empty_barrier;
+ bio->bi_bdev = device->bdev;
+ bio->bi_opf = REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH;
+ init_completion(&device->flush_wait);
+ bio->bi_private = &device->flush_wait;
- wait_for_completion(&device->flush_wait);
+ submit_bio(bio);
+ device->flush_bio_sent = 1;
+}
- if (bio->bi_status) {
- ret = bio->bi_status;
- btrfs_dev_stat_inc_and_print(device,
- BTRFS_DEV_STAT_FLUSH_ERRS);
- }
+/*
+ * If the flush bio has been submitted by write_dev_flush, wait for it.
+ */
- static int wait_dev_flush(struct btrfs_device *device)
++static blk_status_t wait_dev_flush(struct btrfs_device *device)
+{
+ struct bio *bio = device->flush_bio;
- /* drop the reference from the wait == 0 run */
- bio_put(bio);
- device->flush_bio = NULL;
+ if (!device->flush_bio_sent)
+ return 0;
- return ret;
- }
+ device->flush_bio_sent = 0;
+ wait_for_completion_io(&device->flush_wait);
- return bio->bi_error;
- /*
- * one reference for us, and we leave it for the
- * caller
- */
- device->flush_bio = NULL;
- bio = btrfs_io_bio_alloc(GFP_NOFS, 0);
- if (!bio)
- return BLK_STS_RESOURCE;
++ return bio->bi_status;
+}
- bio->bi_end_io = btrfs_end_empty_barrier;
- bio->bi_bdev = device->bdev;
- bio->bi_opf = REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH;
- init_completion(&device->flush_wait);
- bio->bi_private = &device->flush_wait;
- device->flush_bio = bio;
+static int check_barrier_error(struct btrfs_fs_devices *fsdevs)
+{
+ int dev_flush_error = 0;
+ struct btrfs_device *dev;
- bio_get(bio);
- btrfsic_submit_bio(bio);
+ list_for_each_entry_rcu(dev, &fsdevs->devices, dev_list) {
+ if (!dev->bdev || dev->last_flush_error)
+ dev_flush_error++;
+ }
+
+ if (dev_flush_error >
+ fsdevs->fs_info->num_tolerated_disk_barrier_failures)
+ return -EIO;
return 0;
}
@@@ -3548,8 -3555,9 +3548,8 @@@ static int barrier_all_devices(struct b
{
struct list_head *head;
struct btrfs_device *dev;
- int errors_send = 0;
int errors_wait = 0;
- int ret;
+ blk_status_t ret;
/* send down all the barriers */
head = &info->fs_devices->devices;
diff --cc fs/btrfs/disk-io.h
index 4654d129aa76,c581927555f3..0a634d3ffc16
--- a/fs/btrfs/disk-io.h
+++ b/fs/btrfs/disk-io.h
@@@ -118,16 -118,16 +118,16 @@@ int btrfs_buffer_uptodate(struct extent
int btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid);
u32 btrfs_csum_data(const char *data, u32 seed, size_t len);
void btrfs_csum_final(u32 crc, u8 *result);
- int btrfs_bio_wq_end_io(struct btrfs_fs_info *info, struct bio *bio,
+ blk_status_t btrfs_bio_wq_end_io(struct btrfs_fs_info *info, struct bio *bio,
enum btrfs_wq_endio_type metadata);
- int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
-blk_status_t btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info,
- struct inode *inode, struct bio *bio, int mirror_num,
- unsigned long bio_flags, u64 bio_offset,
- extent_submit_bio_hook_t *submit_bio_start,
- extent_submit_bio_hook_t *submit_bio_done);
++blk_status_t btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
+ int mirror_num, unsigned long bio_flags,
+ u64 bio_offset, void *private_data,
+ extent_submit_bio_hook_t *submit_bio_start,
+ extent_submit_bio_hook_t *submit_bio_done);
unsigned long btrfs_async_submit_limit(struct btrfs_fs_info *info);
int btrfs_write_tree_block(struct extent_buffer *buf);
-int btrfs_wait_tree_block_writeback(struct extent_buffer *buf);
+void btrfs_wait_tree_block_writeback(struct extent_buffer *buf);
int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info);
int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
diff --cc fs/btrfs/extent_io.c
index 29a6111a68d2,d1cd60140817..6b0f0c586018
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@@ -2369,9 -2398,9 +2370,10 @@@ static int bio_readpage_error(struct bi
struct io_failure_record *failrec;
struct inode *inode = page->mapping->host;
struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
+ struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree;
struct bio *bio;
int read_mode = 0;
+ blk_status_t status;
int ret;
BUG_ON(bio_op(failed_bio) == REQ_OP_WRITE);
@@@ -2404,11 -2433,12 +2406,12 @@@
"Repair Read Error: submitting new read[%#x] to this_mirror=%d, in_validation=%d",
read_mode, failrec->this_mirror, failrec->in_validation);
- ret = tree->ops->submit_bio_hook(tree->private_data, bio, failrec->this_mirror,
- status = tree->ops->submit_bio_hook(inode, bio, failrec->this_mirror,
++ status = tree->ops->submit_bio_hook(tree->private_data, bio, failrec->this_mirror,
failrec->bio_flags, 0);
- if (ret) {
+ if (status) {
- free_io_failure(BTRFS_I(inode), failrec);
+ free_io_failure(failure_tree, tree, failrec);
bio_put(bio);
+ ret = blk_status_to_errno(status);
}
return ret;
@@@ -2509,9 -2540,9 +2513,9 @@@ endio_readpage_release_extent(struct ex
static void end_bio_extent_readpage(struct bio *bio)
{
struct bio_vec *bvec;
- int uptodate = !bio->bi_error;
+ int uptodate = !bio->bi_status;
struct btrfs_io_bio *io_bio = btrfs_io_bio(bio);
- struct extent_io_tree *tree;
+ struct extent_io_tree *tree, *failure_tree;
u64 offset = 0;
u64 start;
u64 end;
@@@ -2529,10 -2560,9 +2533,10 @@@
btrfs_debug(fs_info,
"end_bio_extent_readpage: bi_sector=%llu, err=%d, mirror=%u",
- (u64)bio->bi_iter.bi_sector, bio->bi_error,
+ (u64)bio->bi_iter.bi_sector, bio->bi_status,
io_bio->mirror_num);
tree = &BTRFS_I(inode)->io_tree;
+ failure_tree = &BTRFS_I(inode)->io_failure_tree;
/* We always issue full-page reads, but if some block
* in a page fails to read, blk_update_request() will
diff --cc fs/btrfs/extent_io.h
index aeafdb35d90b,487ca0207cb6..d4942d94a16b
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@@ -92,9 -92,9 +92,9 @@@ struct btrfs_inode
struct btrfs_io_bio;
struct io_failure_record;
- typedef int (extent_submit_bio_hook_t)(void *private_data, struct bio *bio,
- int mirror_num, unsigned long bio_flags,
- u64 bio_offset);
-typedef blk_status_t (extent_submit_bio_hook_t)(struct inode *inode,
++typedef blk_status_t (extent_submit_bio_hook_t)(void *private_data,
+ struct bio *bio, int mirror_num, unsigned long bio_flags,
+ u64 bio_offset);
struct extent_io_ops {
/*
* The following callbacks must be allways defined, the function
diff --cc fs/btrfs/inode.c
index 5d3c6ac960fd,556c93060606..8d050314591c
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@@ -1900,12 -1900,11 +1899,12 @@@ int btrfs_merge_bio_hook(struct page *p
* At IO completion time the cums attached on the ordered extent record
* are inserted into the btree
*/
- static int __btrfs_submit_bio_start(void *private_data, struct bio *bio,
-static blk_status_t __btrfs_submit_bio_start(struct inode *inode,
- struct bio *bio, int mirror_num, unsigned long bio_flags,
- u64 bio_offset)
++static blk_status_t __btrfs_submit_bio_start(void *private_data, struct bio *bio,
+ int mirror_num, unsigned long bio_flags,
+ u64 bio_offset)
{
+ struct inode *inode = private_data;
- int ret = 0;
+ blk_status_t ret = 0;
ret = btrfs_csum_one_bio(inode, bio, 0, 0);
BUG_ON(ret); /* -ENOMEM */
@@@ -1920,13 -1919,12 +1919,13 @@@
* At IO completion time the cums attached on the ordered extent record
* are inserted into the btree
*/
- static int __btrfs_submit_bio_done(void *private_data, struct bio *bio,
-static blk_status_t __btrfs_submit_bio_done(struct inode *inode,
- struct bio *bio, int mirror_num, unsigned long bio_flags,
- u64 bio_offset)
++static blk_status_t __btrfs_submit_bio_done(void *private_data, struct bio *bio,
+ int mirror_num, unsigned long bio_flags,
+ u64 bio_offset)
{
+ struct inode *inode = private_data;
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
- int ret;
+ blk_status_t ret;
ret = btrfs_map_bio(fs_info, bio, mirror_num, 1);
if (ret) {
@@@ -1940,11 -1938,10 +1939,11 @@@
* extent_io.c submission hook. This does the right thing for csum calculation
* on write, or reading the csums from the tree before a read
*/
- static int btrfs_submit_bio_hook(void *private_data, struct bio *bio,
-static blk_status_t btrfs_submit_bio_hook(struct inode *inode, struct bio *bio,
- int mirror_num, unsigned long bio_flags,
- u64 bio_offset)
++static blk_status_t btrfs_submit_bio_hook(void *private_data, struct bio *bio,
+ int mirror_num, unsigned long bio_flags,
+ u64 bio_offset)
{
+ struct inode *inode = private_data;
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
enum btrfs_wq_endio_type metadata = BTRFS_WQ_ENDIO_DATA;
@@@ -8046,12 -8033,10 +8045,12 @@@ struct btrfs_retry_complete
static void btrfs_retry_endio_nocsum(struct bio *bio)
{
struct btrfs_retry_complete *done = bio->bi_private;
+ struct inode *inode = done->inode;
struct bio_vec *bvec;
+ struct extent_io_tree *io_tree, *failure_tree;
int i;
- if (bio->bi_error)
+ if (bio->bi_status)
goto end;
ASSERT(bio->bi_vcnt == 1);
@@@ -8171,12 -8140,11 +8170,12 @@@ end
bio_put(bio);
}
- static int __btrfs_subio_endio_read(struct inode *inode,
- struct btrfs_io_bio *io_bio, int err)
+ static blk_status_t __btrfs_subio_endio_read(struct inode *inode,
+ struct btrfs_io_bio *io_bio, blk_status_t err)
{
struct btrfs_fs_info *fs_info;
- struct bio_vec *bvec;
+ struct bio_vec bvec;
+ struct bvec_iter iter;
struct btrfs_retry_complete done;
u64 start;
u64 offset = 0;
@@@ -8265,13 -8231,10 +8264,13 @@@ static void btrfs_endio_direct_read(str
struct inode *inode = dip->inode;
struct bio *dio_bio;
struct btrfs_io_bio *io_bio = btrfs_io_bio(bio);
- int err = bio->bi_error;
+ blk_status_t err = bio->bi_status;
- if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED)
+ if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) {
err = btrfs_subio_endio_read(inode, io_bio, err);
+ if (!err)
- bio->bi_error = 0;
++ bio->bi_status = 0;
+ }
unlock_extent(&BTRFS_I(inode)->io_tree, dip->logical_offset,
dip->logical_offset + dip->bytes - 1);
@@@ -8344,12 -8307,11 +8343,12 @@@ static void btrfs_endio_direct_write(st
bio_put(bio);
}
- static int __btrfs_submit_bio_start_direct_io(void *private_data,
-static blk_status_t __btrfs_submit_bio_start_direct_io(struct inode *inode,
++static blk_status_t __btrfs_submit_bio_start_direct_io(void *private_data,
struct bio *bio, int mirror_num,
unsigned long bio_flags, u64 offset)
{
+ struct inode *inode = private_data;
- int ret;
+ blk_status_t ret;
ret = btrfs_csum_one_bio(inode, bio, offset, 1);
BUG_ON(ret); /* -ENOMEM */
return 0;
@@@ -8395,7 -8357,17 +8394,7 @@@ out
bio_put(bio);
}
- static inline int btrfs_lookup_and_bind_dio_csum(struct inode *inode,
-static struct bio *btrfs_dio_bio_alloc(struct block_device *bdev,
- u64 first_sector, gfp_t gfp_flags)
-{
- struct bio *bio;
- bio = btrfs_bio_alloc(bdev, first_sector, BIO_MAX_PAGES, gfp_flags);
- if (bio)
- bio_associate_current(bio);
- return bio;
-}
-
+ static inline blk_status_t btrfs_lookup_and_bind_dio_csum(struct inode *inode,
struct btrfs_dio_private *dip,
struct bio *bio,
u64 file_offset)
@@@ -8675,10 -8672,10 +8674,10 @@@ free_ordered
* Releases and cleans up our dio_bio, no need to bio_put()
* nor bio_endio()/bio_io_error() against dio_bio.
*/
- dio_end_io(dio_bio, ret);
+ dio_end_io(dio_bio);
}
- if (io_bio)
- bio_put(io_bio);
+ if (bio)
+ bio_put(bio);
kfree(dip);
}
@@@ -8758,9 -8754,11 +8757,12 @@@ static ssize_t btrfs_direct_IO(struct k
dio_data.overwrite = 1;
inode_unlock(inode);
relock = true;
+ } else if (iocb->ki_flags & IOCB_NOWAIT) {
+ ret = -EAGAIN;
+ goto out;
}
- ret = btrfs_delalloc_reserve_space(inode, offset, count);
+ ret = btrfs_delalloc_reserve_space(inode, &data_reserved,
+ offset, count);
if (ret)
goto out;
dio_data.outstanding_extents = count_max_extents(count);
diff --cc fs/f2fs/segment.c
index e77ecd51aef0,ea9f455d94ba..d927afc457bb
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@@ -755,9 -749,9 +755,9 @@@ static void f2fs_submit_discard_endio(s
{
struct discard_cmd *dc = (struct discard_cmd *)bio->bi_private;
- dc->error = bio->bi_error;
+ dc->error = blk_status_to_errno(bio->bi_status);
dc->state = D_DONE;
- complete(&dc->wait);
+ complete_all(&dc->wait);
bio_put(bio);
}
diff --cc include/linux/fs.h
index afccabaaec0c,65adbddb3163..2811a90754cf
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@@ -2511,9 -2542,11 +2538,11 @@@ extern int write_inode_now(struct inod
extern int filemap_fdatawrite(struct address_space *);
extern int filemap_flush(struct address_space *);
extern int filemap_fdatawait(struct address_space *);
-extern void filemap_fdatawait_keep_errors(struct address_space *);
+extern int filemap_fdatawait_keep_errors(struct address_space *mapping);
extern int filemap_fdatawait_range(struct address_space *, loff_t lstart,
loff_t lend);
+ extern bool filemap_range_has_page(struct address_space *, loff_t lstart,
+ loff_t lend);
extern int filemap_write_and_wait(struct address_space *mapping);
extern int filemap_write_and_wait_range(struct address_space *mapping,
loff_t lstart, loff_t lend);
diff --cc mm/filemap.c
index d7a30aefee0d,742034e56100..b37e005dc7aa
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@@ -386,7 -376,39 +386,39 @@@ int filemap_flush(struct address_space
}
EXPORT_SYMBOL(filemap_flush);
+ /**
+ * filemap_range_has_page - check if a page exists in range.
+ * @mapping: address space within which to check
+ * @start_byte: offset in bytes where the range starts
+ * @end_byte: offset in bytes where the range ends (inclusive)
+ *
+ * Find at least one page in the range supplied, usually used to check if
+ * direct writing in this range will trigger a writeback.
+ */
+ bool filemap_range_has_page(struct address_space *mapping,
+ loff_t start_byte, loff_t end_byte)
+ {
+ pgoff_t index = start_byte >> PAGE_SHIFT;
+ pgoff_t end = end_byte >> PAGE_SHIFT;
+ struct pagevec pvec;
+ bool ret;
+
+ if (end_byte < start_byte)
+ return false;
+
+ if (mapping->nrpages == 0)
+ return false;
+
+ pagevec_init(&pvec, 0);
+ if (!pagevec_lookup(&pvec, mapping, index, 1))
+ return false;
+ ret = (pvec.pages[0]->index <= end);
+ pagevec_release(&pvec);
+ return ret;
+ }
+ EXPORT_SYMBOL(filemap_range_has_page);
+
-static int __filemap_fdatawait_range(struct address_space *mapping,
+static void __filemap_fdatawait_range(struct address_space *mapping,
loff_t start_byte, loff_t end_byte)
{
pgoff_t index = start_byte >> PAGE_SHIFT;
^ permalink raw reply
* Re: linux-next: manual merge of the tip tree with the kbuild tree
From: Stephen Rothwell @ 2017-07-03 1:08 UTC (permalink / raw)
To: Al Viro
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Masahiro Yamada, Linux-Next Mailing List,
Linux Kernel Mailing List, Christoph Hellwig
In-Reply-To: <20170623135017.01837f77@canb.auug.org.au>
Hi Al,
Since part of the tip tree has been merged into the vfs tree, this
conflict also applies to the vfs tree, now.
On Fri, 23 Jun 2017 13:50:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the tip tree got a conflict in:
>
> arch/arm/include/uapi/asm/Kbuild
>
> between commit:
>
> ae3f4151737d ("kbuild: replace genhdr-y with generated-y")
>
> from the kbuild tree and commit:
>
> 6bc51cbaa9d7 ("signal: Remove non-uapi <asm/siginfo.h>")
>
> from the tip tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc arch/arm/include/uapi/asm/Kbuild
> index 424935e4515d,e9b098d6b766..000000000000
> --- a/arch/arm/include/uapi/asm/Kbuild
> +++ b/arch/arm/include/uapi/asm/Kbuild
> @@@ -1,6 -1,8 +1,8 @@@
> # UAPI Header export list
> include include/uapi/asm-generic/Kbuild.asm
>
> -genhdr-y += unistd-common.h
> -genhdr-y += unistd-oabi.h
> -genhdr-y += unistd-eabi.h
> +generated-y += unistd-common.h
> +generated-y += unistd-oabi.h
> +generated-y += unistd-eabi.h
> +
> + generic-y += siginfo.h
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* linux-next: build warning after merge of the vfs tree
From: Stephen Rothwell @ 2017-07-03 0:53 UTC (permalink / raw)
To: Al Viro; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List
Hi Al,
After merging the vfs tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_send':
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1643:2: warning: ignoring return value of 'copy_from_iter', declared with attribute warn_unused_result [-Wunused-result]
copy_from_iter(&ibmsg->ibm_u.immediate.ibim_payload, IBLND_MSG_SIZE,
^
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_recv':
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1744:3: warning: ignoring return value of 'copy_to_iter', declared with attribute warn_unused_result [-Wunused-result]
copy_to_iter(&rxmsg->ibm_u.immediate.ibim_payload,
^
Introduced by commit
aa28de275a24 ("iov_iter/hardening: move object size checks to inlined part")
--
Cheers,
Stephen Rothwell
^ permalink raw reply
* Re: linux-next: build warning after merge of the drivers-x86 tree
From: Darren Hart @ 2017-07-01 3:32 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Arvind Yadav
In-Reply-To: <20170630140054.38f98968@canb.auug.org.au>
On Fri, Jun 30, 2017 at 02:00:54PM +1000, Stephen Rothwell wrote:
> Hi Darren,
>
> After merging the drivers-x86 tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/platform/x86/sony-laptop.c: In function 'sony_laptop_setup_input':
> drivers/platform/x86/sony-laptop.c:494:19: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers]
> key_dev->keycode = &sony_laptop_input_keycode_map;
> ^
>
> Introduced by commit
>
> a0f0a5e1978b ("platform/x86: sony-laptop: constify few static structures")
Apologies, and thanks for the catch. Rolled the fix from Arnd together with this
and the new one from Arvind. for-next had to be rebased to avoid introducing
this error into mainline.
--
Darren Hart
VMware Open Source Technology Center
^ permalink raw reply
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