* [U-Boot] [ANN] U-Boot v2016.11 is released
From: Wolfgang Denk @ 2016-11-14 22:15 UTC (permalink / raw)
To: u-boot
In-Reply-To: <CAD6G_RTFpFmFWVOtdkeRm_LA1nQgMxtSQSnbToyd_6Y8_icSiw@mail.gmail.com>
Dear Jagan,
In message <CAD6G_RTFpFmFWVOtdkeRm_LA1nQgMxtSQSnbToyd_6Y8_icSiw@mail.gmail.com> you wrote:
>
> Unfortunately "Amarula Solutions" is not listed in Employers list [1]
> for this I sent a domain-map mail to Wolfgang Denk during MW, any edit
> for this?
Where should it show up?
You sent me an entry for a
www.amarulasolutions.com -> Amarula Solutions
mapping, which I did add to the u-boot-config/domain-map used for
building this report. AFAICT, there is no single commit log
containing "www.amarulasolutions.com".
The git log from v2016.09 through v2016.11 shows author entries for
two mail addresses containing anything similar:
jagan at amarulasolutions.com
michael at amarulasolutions.com
But neither of them matches "www.amarulasolutions.com", so there are
no credits generated.
I was surprised about the "www" part in your domain mapping, but this
is what you sent me, so I added it. Please let me know if you think
this should be changed.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have a theory that it's impossible to prove anything, but I can't
prove it.
^ permalink raw reply
* Re: [PATCH v4 1/3] bus: simple-pm: add support to pm clocks
From: Bjorn Helgaas @ 2016-11-14 22:14 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: svarbanov, linux-pci, bhelgaas, robh+dt, linux-arm-msm,
devicetree, Geert Uytterhoeven, Kevin Hilman, Simon Horman
In-Reply-To: <1479122155-13393-2-git-send-email-srinivas.kandagatla@linaro.org>
[+cc Geert, Kevin, Simon]
On Mon, Nov 14, 2016 at 11:15:53AM +0000, Srinivas Kandagatla wrote:
> This patch adds support to pm clocks via device tree, so that the clocks
> can be turned on and off during runtime pm. This patch is required for
> Qualcomm msm8996 pcie controller which sits on a bus with its own
> power-domain and clocks.
>
> Without this patch the clock associated with the bus are never turned on.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
I don't see a formal maintainer for drivers/bus/simple-pm-bus.c, but I'd
like an ack or at least a review from Geert or Simon.
> ---
> drivers/bus/simple-pm-bus.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c
> index c5eb46c..63b7e8c 100644
> --- a/drivers/bus/simple-pm-bus.c
> +++ b/drivers/bus/simple-pm-bus.c
> @@ -11,6 +11,7 @@
> #include <linux/module.h>
> #include <linux/of_platform.h>
> #include <linux/platform_device.h>
> +#include <linux/pm_clock.h>
> #include <linux/pm_runtime.h>
>
>
> @@ -22,17 +23,26 @@ static int simple_pm_bus_probe(struct platform_device *pdev)
>
> pm_runtime_enable(&pdev->dev);
>
> - if (np)
> + if (np) {
> + of_pm_clk_add_clks(&pdev->dev);
> of_platform_populate(np, NULL, NULL, &pdev->dev);
> + }
>
> return 0;
> }
>
> +static const struct dev_pm_ops simple_pm_bus_pm_ops = {
> + SET_RUNTIME_PM_OPS(pm_clk_suspend,
> + pm_clk_resume, NULL)
> +};
> +
> static int simple_pm_bus_remove(struct platform_device *pdev)
> {
> dev_dbg(&pdev->dev, "%s\n", __func__);
>
> pm_runtime_disable(&pdev->dev);
> + pm_clk_destroy(&pdev->dev);
> +
> return 0;
> }
>
> @@ -48,6 +58,7 @@ static struct platform_driver simple_pm_bus_driver = {
> .driver = {
> .name = "simple-pm-bus",
> .of_match_table = simple_pm_bus_of_match,
> + .pm = &simple_pm_bus_pm_ops,
> },
> };
>
> --
> 2.10.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v1 2/2] kexec: Support -S paramter to return whether the kexec payload is loaded.
From: Konrad Rzeszutek Wilk @ 2016-11-14 22:12 UTC (permalink / raw)
To: david.vrabel, xen-devel, kexec
Cc: elena.ufimtseva, daniel.kiper, Konrad Rzeszutek Wilk
In-Reply-To: <1479161573-12671-1-git-send-email-konrad.wilk@oracle.com>
Instead of the scripts having to poke at various fields we can
provide that functionality via the -S parameter.
Returns 0 if the payload is loaded. Can be used in combination
with -l or -p to get the state of the proper kexec image.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
v0: First version (internal product).
v1: Posted on kexec mailing list. Changed -s to -S
CC: kexec@lists.infradead.org
CC: xen-devel@lists.xenproject.org
CC: Daniel Kiper <daniel.kiper@oracle.com>
---
kexec/kexec-xen.c | 20 ++++++++++++++++++
kexec/kexec.8 | 5 +++++
kexec/kexec.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
kexec/kexec.h | 5 ++++-
4 files changed, 85 insertions(+), 6 deletions(-)
diff --git a/kexec/kexec-xen.c b/kexec/kexec-xen.c
index 24a4191..5a1e9d2 100644
--- a/kexec/kexec-xen.c
+++ b/kexec/kexec-xen.c
@@ -105,6 +105,26 @@ int xen_kexec_unload(uint64_t kexec_flags)
return ret;
}
+int xen_kexec_status(uint64_t kexec_flags)
+{
+ xc_interface *xch;
+ uint8_t type;
+ int ret;
+
+ xch = xc_interface_open(NULL, NULL, 0);
+ if (!xch)
+ return -1;
+
+ type = (kexec_flags & KEXEC_ON_CRASH) ? KEXEC_TYPE_CRASH
+ : KEXEC_TYPE_DEFAULT;
+
+ ret = xc_kexec_status(xch, type);
+
+ xc_interface_close(xch);
+
+ return ret;
+}
+
void xen_kexec_exec(void)
{
xc_interface *xch;
diff --git a/kexec/kexec.8 b/kexec/kexec.8
index 4d0c1d1..02f4ccf 100644
--- a/kexec/kexec.8
+++ b/kexec/kexec.8
@@ -107,6 +107,11 @@ command:
.B \-d\ (\-\-debug)
Enable debugging messages.
.TP
+.B \-D\ (\-\-status)
+Return 0 if the type (by default crash) is loaded. Can be used in conjuction
+with -l or -p to toggle the type. Note it will
+.BR not\ load\ the\ kernel.
+.TP
.B \-e\ (\-\-exec)
Run the currently loaded kernel. Note that it will reboot into the loaded kernel without calling shutdown(8).
.TP
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 500e5a9..bc72688 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -855,6 +855,32 @@ static int k_unload (unsigned long kexec_flags)
return result;
}
+static int kexec_loaded(void);
+static int __kexec_loaded(const char *f);
+
+static int k_status(unsigned long kexec_flags)
+{
+ int result;
+ long native_arch;
+
+ /* set the arch */
+ native_arch = physical_arch();
+ if (native_arch < 0) {
+ return -1;
+ }
+ kexec_flags |= native_arch;
+
+ if (xen_present())
+ result = xen_kexec_status(kexec_flags);
+ else {
+ if (kexec_flags & KEXEC_ON_CRASH)
+ result = __kexec_loaded("/sys/kernel/kexec_crash_loaded");
+ else
+ result = kexec_loaded();
+ }
+ return result;
+}
+
/*
* Start a reboot.
*/
@@ -890,8 +916,6 @@ static int my_exec(void)
return -1;
}
-static int kexec_loaded(void);
-
static int load_jump_back_helper_image(unsigned long kexec_flags, void *entry)
{
int result;
@@ -970,6 +994,7 @@ void usage(void)
" to original kernel.\n"
" -s, --kexec-file-syscall Use file based syscall for kexec operation\n"
" -d, --debug Enable debugging to help spot a failure.\n"
+ " -S, --status Return 0 if the type (by default crash) is loaded.\n"
"\n"
"Supported kernel file types and options: \n");
for (i = 0; i < file_types; i++) {
@@ -981,7 +1006,7 @@ void usage(void)
printf("\n");
}
-static int kexec_loaded(void)
+static int __kexec_loaded(const char *file)
{
long ret = -1;
FILE *fp;
@@ -992,7 +1017,7 @@ static int kexec_loaded(void)
if (xen_present())
return 1;
- fp = fopen("/sys/kernel/kexec_loaded", "r");
+ fp = fopen(file, "r");
if (fp == NULL)
return -1;
@@ -1015,6 +1040,12 @@ static int kexec_loaded(void)
return (int)ret;
}
+static int kexec_loaded(void)
+{
+ return __kexec_loaded("/sys/kernel/kexec_loaded");
+}
+
+
/*
* Remove parameter from a kernel command line. Helper function by get_command_line().
*/
@@ -1204,6 +1235,7 @@ int main(int argc, char *argv[])
int do_unload = 0;
int do_reuse_initrd = 0;
int do_kexec_file_syscall = 0;
+ int do_status = 0;
void *entry = 0;
char *type = 0;
char *endptr;
@@ -1345,6 +1377,9 @@ int main(int argc, char *argv[])
case OPT_KEXEC_FILE_SYSCALL:
/* We already parsed it. Nothing to do. */
break;
+ case OPT_STATUS:
+ do_status = 1;
+ break;
default:
break;
}
@@ -1355,6 +1390,20 @@ int main(int argc, char *argv[])
if (skip_sync)
do_sync = 0;
+ if (do_status) {
+ if (kexec_flags == 0)
+ kexec_flags = KEXEC_ON_CRASH;
+ do_load = 0;
+ do_reuse_initrd = 0;
+ do_unload = 0;
+ do_load = 0;
+ do_shutdown = 0;
+ do_sync = 0;
+ do_ifdown = 0;
+ do_exec = 0;
+ do_load_jump_back_helper = 0;
+ }
+
if (do_load && (kexec_flags & KEXEC_ON_CRASH) &&
!is_crashkernel_mem_reserved()) {
die("Memory for crashkernel is not reserved\n"
@@ -1392,7 +1441,9 @@ int main(int argc, char *argv[])
check_reuse_initrd();
arch_reuse_initrd();
}
-
+ if (do_status) {
+ result = k_status(kexec_flags);
+ }
if (do_unload) {
if (do_kexec_file_syscall)
result = kexec_file_unload(kexec_file_flags);
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 9194f1c..2b06f59 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -219,6 +219,7 @@ extern int file_types;
#define OPT_TYPE 't'
#define OPT_PANIC 'p'
#define OPT_KEXEC_FILE_SYSCALL 's'
+#define OPT_STATUS 'S'
#define OPT_MEM_MIN 256
#define OPT_MEM_MAX 257
#define OPT_REUSE_INITRD 258
@@ -245,8 +246,9 @@ extern int file_types;
{ "reuseinitrd", 0, 0, OPT_REUSE_INITRD }, \
{ "kexec-file-syscall", 0, 0, OPT_KEXEC_FILE_SYSCALL }, \
{ "debug", 0, 0, OPT_DEBUG }, \
+ { "status", 0, 0, OPT_STATUS }, \
-#define KEXEC_OPT_STR "h?vdfxyluet:ps"
+#define KEXEC_OPT_STR "h?vdfxyluet:psS"
extern void dbgprint_mem_range(const char *prefix, struct memory_range *mr, int nr_mr);
extern void die(const char *fmt, ...)
@@ -311,5 +313,6 @@ int xen_present(void);
int xen_kexec_load(struct kexec_info *info);
int xen_kexec_unload(uint64_t kexec_flags);
void xen_kexec_exec(void);
+int xen_kexec_status(uint64_t kexec_flags);
#endif /* KEXEC_H */
--
2.5.5
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related
* [PATCH v1] Add in kexec -S for status, and add new Xen hypercall to support this.
From: Konrad Rzeszutek Wilk @ 2016-11-14 22:12 UTC (permalink / raw)
To: david.vrabel, xen-devel, kexec; +Cc: elena.ufimtseva, daniel.kiper
Heya!
I am cross-posting on two mailing lists:
xen-devel@lists.xenproject.org
kexec@lists.infradead.org
as it may be easier to review and provide input then me going back and forth.
Anyhow the patches are to help with the various distro's poking in
/sys/../kexec to figure out whether an kexec image is loaded.
This can be done using the -S parameter now with the patch #2.
Also I add an hypercall to Xen so that if kexec is running under Xen
the same information can be retrieved (see patch #1).
Thanks!
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply
* [PATCH v1 1/2] xen/kexec: Find out whether an kexec type is loaded.
From: Konrad Rzeszutek Wilk @ 2016-11-14 22:12 UTC (permalink / raw)
To: david.vrabel, xen-devel, kexec
Cc: elena.ufimtseva, daniel.kiper, Konrad Rzeszutek Wilk
In-Reply-To: <1479161573-12671-1-git-send-email-konrad.wilk@oracle.com>
The tools that use kexec are asynchronous in nature and do
not keep state changes. As such provide an hypercall to find
out whether an image has been loaded for either type.
Note: No need to modify XSM as it has one size fits all
check and does not check for subcommands.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
v0: Internal version.
v1: Dropped Reviewed-by, posting on xen-devel.
CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
CC: Daniel Kiper <daniel.kiper@oracle.com>
---
tools/libxc/include/xenctrl.h | 8 ++++++++
tools/libxc/xc_kexec.c | 27 +++++++++++++++++++++++++++
xen/common/kexec.c | 25 +++++++++++++++++++++++++
xen/include/public/kexec.h | 11 +++++++++++
4 files changed, 71 insertions(+)
diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 2c83544..aa5d798 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -2574,6 +2574,14 @@ int xc_kexec_load(xc_interface *xch, uint8_t type, uint16_t arch,
*/
int xc_kexec_unload(xc_interface *xch, int type);
+/*
+ * Find out whether the image has been succesfully loaded.
+ *
+ * The can be either KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH.
+ * If zero is returned that means the image is loaded for the type.
+ */
+int xc_kexec_status(xc_interface *xch, int type);
+
typedef xenpf_resource_entry_t xc_resource_entry_t;
/*
diff --git a/tools/libxc/xc_kexec.c b/tools/libxc/xc_kexec.c
index 1cceb5d..95d36ff 100644
--- a/tools/libxc/xc_kexec.c
+++ b/tools/libxc/xc_kexec.c
@@ -126,3 +126,30 @@ out:
return ret;
}
+
+int xc_kexec_status(xc_interface *xch, int type)
+{
+ DECLARE_HYPERCALL;
+ DECLARE_HYPERCALL_BUFFER(xen_kexec_status_t, status);
+ int ret = -1;
+
+ status = xc_hypercall_buffer_alloc(xch, status, sizeof(*status));
+ if ( status == NULL )
+ {
+ PERROR("Count not alloc buffer for kexec status hypercall");
+ goto out;
+ }
+
+ status->type = type;
+
+ hypercall.op = __HYPERVISOR_kexec_op;
+ hypercall.arg[0] = KEXEC_CMD_kexec_status;
+ hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(status);
+
+ ret = do_xen_hypercall(xch, &hypercall);
+
+out:
+ xc_hypercall_buffer_free(xch, status);
+
+ return ret;
+}
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index c83d48f..1148f85 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -1169,6 +1169,28 @@ static int kexec_unload(XEN_GUEST_HANDLE_PARAM(void) uarg)
return kexec_do_unload(&unload);
}
+static int kexec_status(XEN_GUEST_HANDLE_PARAM(void) uarg)
+{
+ xen_kexec_status_t status;
+ int base, bit, pos;
+
+ if ( unlikely(copy_from_guest(&status, uarg, 1)) )
+ return -EFAULT;
+
+ if ( test_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags) )
+ return -EBUSY;
+
+ if ( kexec_load_get_bits(status.type, &base, &bit) )
+ return -EINVAL;
+
+ pos = (test_bit(bit, &kexec_flags) != 0);
+
+ if ( !test_bit(base + pos, &kexec_flags) )
+ return -ENOENT;
+
+ return 0;
+}
+
static int do_kexec_op_internal(unsigned long op,
XEN_GUEST_HANDLE_PARAM(void) uarg,
bool_t compat)
@@ -1208,6 +1230,9 @@ static int do_kexec_op_internal(unsigned long op,
case KEXEC_CMD_kexec_unload:
ret = kexec_unload(uarg);
break;
+ case KEXEC_CMD_kexec_status:
+ ret = kexec_status(uarg);
+ break;
}
return ret;
diff --git a/xen/include/public/kexec.h b/xen/include/public/kexec.h
index a6a0a88..29dcb5d 100644
--- a/xen/include/public/kexec.h
+++ b/xen/include/public/kexec.h
@@ -227,6 +227,17 @@ typedef struct xen_kexec_unload {
} xen_kexec_unload_t;
DEFINE_XEN_GUEST_HANDLE(xen_kexec_unload_t);
+/*
+ * Figure out whether we have an image loaded. An return value of
+ * zero indicates success while XEN_ENODEV implies no image loaded.
+ *
+ * Type must be one of KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH.
+ */
+#define KEXEC_CMD_kexec_status 6
+typedef struct xen_kexec_status {
+ uint8_t type;
+} xen_kexec_status_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_status_t);
#else /* __XEN_INTERFACE_VERSION__ < 0x00040400 */
#define KEXEC_CMD_kexec_load KEXEC_CMD_kexec_load_v1
--
2.5.5
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related
* Re: powerpc-ieee1275 and grub-mkfont dependency
From: Aaro Koskinen @ 2016-11-14 22:13 UTC (permalink / raw)
To: The development of GNU GRUB
Cc: Vladimir 'φ-coder/phcoder' Serbinenko
In-Reply-To: <CAA91j0URv_T8k39D-Z45ZdScvrwBE35_enJvioHU43acqc28uQ@mail.gmail.com>
Hi,
On Thu, Nov 10, 2016 at 04:53:23PM +0300, Andrei Borzenkov wrote:
> I do not like it, sorry. If this platform supports framebuffer we
> should build grub with framebuffer. If you do not (want to) use it -
> fine, nobody forces you to do it. But on this path we get
> proliferation of slightly different incompatible binaries in the wild.
What's then the point of having --disable-grub-mkfont (or any
--disable/enable-* option)?
A.
^ permalink raw reply
* [PATCH v1 2/2] kexec: Support -S paramter to return whether the kexec payload is loaded.
From: Konrad Rzeszutek Wilk @ 2016-11-14 22:12 UTC (permalink / raw)
To: david.vrabel, xen-devel, kexec
Cc: elena.ufimtseva, daniel.kiper, Konrad Rzeszutek Wilk
In-Reply-To: <1479161573-12671-1-git-send-email-konrad.wilk@oracle.com>
Instead of the scripts having to poke at various fields we can
provide that functionality via the -S parameter.
Returns 0 if the payload is loaded. Can be used in combination
with -l or -p to get the state of the proper kexec image.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
v0: First version (internal product).
v1: Posted on kexec mailing list. Changed -s to -S
CC: kexec@lists.infradead.org
CC: xen-devel@lists.xenproject.org
CC: Daniel Kiper <daniel.kiper@oracle.com>
---
kexec/kexec-xen.c | 20 ++++++++++++++++++
kexec/kexec.8 | 5 +++++
kexec/kexec.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
kexec/kexec.h | 5 ++++-
4 files changed, 85 insertions(+), 6 deletions(-)
diff --git a/kexec/kexec-xen.c b/kexec/kexec-xen.c
index 24a4191..5a1e9d2 100644
--- a/kexec/kexec-xen.c
+++ b/kexec/kexec-xen.c
@@ -105,6 +105,26 @@ int xen_kexec_unload(uint64_t kexec_flags)
return ret;
}
+int xen_kexec_status(uint64_t kexec_flags)
+{
+ xc_interface *xch;
+ uint8_t type;
+ int ret;
+
+ xch = xc_interface_open(NULL, NULL, 0);
+ if (!xch)
+ return -1;
+
+ type = (kexec_flags & KEXEC_ON_CRASH) ? KEXEC_TYPE_CRASH
+ : KEXEC_TYPE_DEFAULT;
+
+ ret = xc_kexec_status(xch, type);
+
+ xc_interface_close(xch);
+
+ return ret;
+}
+
void xen_kexec_exec(void)
{
xc_interface *xch;
diff --git a/kexec/kexec.8 b/kexec/kexec.8
index 4d0c1d1..02f4ccf 100644
--- a/kexec/kexec.8
+++ b/kexec/kexec.8
@@ -107,6 +107,11 @@ command:
.B \-d\ (\-\-debug)
Enable debugging messages.
.TP
+.B \-D\ (\-\-status)
+Return 0 if the type (by default crash) is loaded. Can be used in conjuction
+with -l or -p to toggle the type. Note it will
+.BR not\ load\ the\ kernel.
+.TP
.B \-e\ (\-\-exec)
Run the currently loaded kernel. Note that it will reboot into the loaded kernel without calling shutdown(8).
.TP
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 500e5a9..bc72688 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -855,6 +855,32 @@ static int k_unload (unsigned long kexec_flags)
return result;
}
+static int kexec_loaded(void);
+static int __kexec_loaded(const char *f);
+
+static int k_status(unsigned long kexec_flags)
+{
+ int result;
+ long native_arch;
+
+ /* set the arch */
+ native_arch = physical_arch();
+ if (native_arch < 0) {
+ return -1;
+ }
+ kexec_flags |= native_arch;
+
+ if (xen_present())
+ result = xen_kexec_status(kexec_flags);
+ else {
+ if (kexec_flags & KEXEC_ON_CRASH)
+ result = __kexec_loaded("/sys/kernel/kexec_crash_loaded");
+ else
+ result = kexec_loaded();
+ }
+ return result;
+}
+
/*
* Start a reboot.
*/
@@ -890,8 +916,6 @@ static int my_exec(void)
return -1;
}
-static int kexec_loaded(void);
-
static int load_jump_back_helper_image(unsigned long kexec_flags, void *entry)
{
int result;
@@ -970,6 +994,7 @@ void usage(void)
" to original kernel.\n"
" -s, --kexec-file-syscall Use file based syscall for kexec operation\n"
" -d, --debug Enable debugging to help spot a failure.\n"
+ " -S, --status Return 0 if the type (by default crash) is loaded.\n"
"\n"
"Supported kernel file types and options: \n");
for (i = 0; i < file_types; i++) {
@@ -981,7 +1006,7 @@ void usage(void)
printf("\n");
}
-static int kexec_loaded(void)
+static int __kexec_loaded(const char *file)
{
long ret = -1;
FILE *fp;
@@ -992,7 +1017,7 @@ static int kexec_loaded(void)
if (xen_present())
return 1;
- fp = fopen("/sys/kernel/kexec_loaded", "r");
+ fp = fopen(file, "r");
if (fp == NULL)
return -1;
@@ -1015,6 +1040,12 @@ static int kexec_loaded(void)
return (int)ret;
}
+static int kexec_loaded(void)
+{
+ return __kexec_loaded("/sys/kernel/kexec_loaded");
+}
+
+
/*
* Remove parameter from a kernel command line. Helper function by get_command_line().
*/
@@ -1204,6 +1235,7 @@ int main(int argc, char *argv[])
int do_unload = 0;
int do_reuse_initrd = 0;
int do_kexec_file_syscall = 0;
+ int do_status = 0;
void *entry = 0;
char *type = 0;
char *endptr;
@@ -1345,6 +1377,9 @@ int main(int argc, char *argv[])
case OPT_KEXEC_FILE_SYSCALL:
/* We already parsed it. Nothing to do. */
break;
+ case OPT_STATUS:
+ do_status = 1;
+ break;
default:
break;
}
@@ -1355,6 +1390,20 @@ int main(int argc, char *argv[])
if (skip_sync)
do_sync = 0;
+ if (do_status) {
+ if (kexec_flags == 0)
+ kexec_flags = KEXEC_ON_CRASH;
+ do_load = 0;
+ do_reuse_initrd = 0;
+ do_unload = 0;
+ do_load = 0;
+ do_shutdown = 0;
+ do_sync = 0;
+ do_ifdown = 0;
+ do_exec = 0;
+ do_load_jump_back_helper = 0;
+ }
+
if (do_load && (kexec_flags & KEXEC_ON_CRASH) &&
!is_crashkernel_mem_reserved()) {
die("Memory for crashkernel is not reserved\n"
@@ -1392,7 +1441,9 @@ int main(int argc, char *argv[])
check_reuse_initrd();
arch_reuse_initrd();
}
-
+ if (do_status) {
+ result = k_status(kexec_flags);
+ }
if (do_unload) {
if (do_kexec_file_syscall)
result = kexec_file_unload(kexec_file_flags);
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 9194f1c..2b06f59 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -219,6 +219,7 @@ extern int file_types;
#define OPT_TYPE 't'
#define OPT_PANIC 'p'
#define OPT_KEXEC_FILE_SYSCALL 's'
+#define OPT_STATUS 'S'
#define OPT_MEM_MIN 256
#define OPT_MEM_MAX 257
#define OPT_REUSE_INITRD 258
@@ -245,8 +246,9 @@ extern int file_types;
{ "reuseinitrd", 0, 0, OPT_REUSE_INITRD }, \
{ "kexec-file-syscall", 0, 0, OPT_KEXEC_FILE_SYSCALL }, \
{ "debug", 0, 0, OPT_DEBUG }, \
+ { "status", 0, 0, OPT_STATUS }, \
-#define KEXEC_OPT_STR "h?vdfxyluet:ps"
+#define KEXEC_OPT_STR "h?vdfxyluet:psS"
extern void dbgprint_mem_range(const char *prefix, struct memory_range *mr, int nr_mr);
extern void die(const char *fmt, ...)
@@ -311,5 +313,6 @@ int xen_present(void);
int xen_kexec_load(struct kexec_info *info);
int xen_kexec_unload(uint64_t kexec_flags);
void xen_kexec_exec(void);
+int xen_kexec_status(uint64_t kexec_flags);
#endif /* KEXEC_H */
--
2.5.5
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related
* [PATCH v1 1/2] xen/kexec: Find out whether an kexec type is loaded.
From: Konrad Rzeszutek Wilk @ 2016-11-14 22:12 UTC (permalink / raw)
To: david.vrabel, xen-devel, kexec
Cc: elena.ufimtseva, daniel.kiper, Konrad Rzeszutek Wilk
In-Reply-To: <1479161573-12671-1-git-send-email-konrad.wilk@oracle.com>
The tools that use kexec are asynchronous in nature and do
not keep state changes. As such provide an hypercall to find
out whether an image has been loaded for either type.
Note: No need to modify XSM as it has one size fits all
check and does not check for subcommands.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
v0: Internal version.
v1: Dropped Reviewed-by, posting on xen-devel.
CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
CC: Daniel Kiper <daniel.kiper@oracle.com>
---
tools/libxc/include/xenctrl.h | 8 ++++++++
tools/libxc/xc_kexec.c | 27 +++++++++++++++++++++++++++
xen/common/kexec.c | 25 +++++++++++++++++++++++++
xen/include/public/kexec.h | 11 +++++++++++
4 files changed, 71 insertions(+)
diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 2c83544..aa5d798 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -2574,6 +2574,14 @@ int xc_kexec_load(xc_interface *xch, uint8_t type, uint16_t arch,
*/
int xc_kexec_unload(xc_interface *xch, int type);
+/*
+ * Find out whether the image has been succesfully loaded.
+ *
+ * The can be either KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH.
+ * If zero is returned that means the image is loaded for the type.
+ */
+int xc_kexec_status(xc_interface *xch, int type);
+
typedef xenpf_resource_entry_t xc_resource_entry_t;
/*
diff --git a/tools/libxc/xc_kexec.c b/tools/libxc/xc_kexec.c
index 1cceb5d..95d36ff 100644
--- a/tools/libxc/xc_kexec.c
+++ b/tools/libxc/xc_kexec.c
@@ -126,3 +126,30 @@ out:
return ret;
}
+
+int xc_kexec_status(xc_interface *xch, int type)
+{
+ DECLARE_HYPERCALL;
+ DECLARE_HYPERCALL_BUFFER(xen_kexec_status_t, status);
+ int ret = -1;
+
+ status = xc_hypercall_buffer_alloc(xch, status, sizeof(*status));
+ if ( status == NULL )
+ {
+ PERROR("Count not alloc buffer for kexec status hypercall");
+ goto out;
+ }
+
+ status->type = type;
+
+ hypercall.op = __HYPERVISOR_kexec_op;
+ hypercall.arg[0] = KEXEC_CMD_kexec_status;
+ hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(status);
+
+ ret = do_xen_hypercall(xch, &hypercall);
+
+out:
+ xc_hypercall_buffer_free(xch, status);
+
+ return ret;
+}
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index c83d48f..1148f85 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -1169,6 +1169,28 @@ static int kexec_unload(XEN_GUEST_HANDLE_PARAM(void) uarg)
return kexec_do_unload(&unload);
}
+static int kexec_status(XEN_GUEST_HANDLE_PARAM(void) uarg)
+{
+ xen_kexec_status_t status;
+ int base, bit, pos;
+
+ if ( unlikely(copy_from_guest(&status, uarg, 1)) )
+ return -EFAULT;
+
+ if ( test_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags) )
+ return -EBUSY;
+
+ if ( kexec_load_get_bits(status.type, &base, &bit) )
+ return -EINVAL;
+
+ pos = (test_bit(bit, &kexec_flags) != 0);
+
+ if ( !test_bit(base + pos, &kexec_flags) )
+ return -ENOENT;
+
+ return 0;
+}
+
static int do_kexec_op_internal(unsigned long op,
XEN_GUEST_HANDLE_PARAM(void) uarg,
bool_t compat)
@@ -1208,6 +1230,9 @@ static int do_kexec_op_internal(unsigned long op,
case KEXEC_CMD_kexec_unload:
ret = kexec_unload(uarg);
break;
+ case KEXEC_CMD_kexec_status:
+ ret = kexec_status(uarg);
+ break;
}
return ret;
diff --git a/xen/include/public/kexec.h b/xen/include/public/kexec.h
index a6a0a88..29dcb5d 100644
--- a/xen/include/public/kexec.h
+++ b/xen/include/public/kexec.h
@@ -227,6 +227,17 @@ typedef struct xen_kexec_unload {
} xen_kexec_unload_t;
DEFINE_XEN_GUEST_HANDLE(xen_kexec_unload_t);
+/*
+ * Figure out whether we have an image loaded. An return value of
+ * zero indicates success while XEN_ENODEV implies no image loaded.
+ *
+ * Type must be one of KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH.
+ */
+#define KEXEC_CMD_kexec_status 6
+typedef struct xen_kexec_status {
+ uint8_t type;
+} xen_kexec_status_t;
+DEFINE_XEN_GUEST_HANDLE(xen_kexec_status_t);
#else /* __XEN_INTERFACE_VERSION__ < 0x00040400 */
#define KEXEC_CMD_kexec_load KEXEC_CMD_kexec_load_v1
--
2.5.5
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related
* [PATCH v1] Add in kexec -S for status, and add new Xen hypercall to support this.
From: Konrad Rzeszutek Wilk @ 2016-11-14 22:12 UTC (permalink / raw)
To: david.vrabel, xen-devel, kexec; +Cc: elena.ufimtseva, daniel.kiper
Heya!
I am cross-posting on two mailing lists:
xen-devel@lists.xenproject.org
kexec@lists.infradead.org
as it may be easier to review and provide input then me going back and forth.
Anyhow the patches are to help with the various distro's poking in
/sys/../kexec to figure out whether an kexec image is loaded.
This can be done using the -S parameter now with the patch #2.
Also I add an hypercall to Xen so that if kexec is running under Xen
the same information can be retrieved (see patch #1).
Thanks!
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply
* [PATCH] cmem: add special handling for dra72x variant
From: Denys Dmytriyenko @ 2016-11-14 22:13 UTC (permalink / raw)
To: meta-ti
From: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
recipes-kernel/linux/cmem.inc | 7 +++++-
recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi | 29 ++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi
diff --git a/recipes-kernel/linux/cmem.inc b/recipes-kernel/linux/cmem.inc
index b60909c..d4edc60 100644
--- a/recipes-kernel/linux/cmem.inc
+++ b/recipes-kernel/linux/cmem.inc
@@ -4,17 +4,22 @@
CMEM_MACHINE = "${MACHINE}"
CMEM_MACHINE_am57xx-evm = "am571x am572x"
CMEM_MACHINE_am57xx-hs-evm = "am571x am572x"
+CMEM_MACHINE_dra7xx-evm = "dra72x dra74x"
+CMEM_MACHINE_dra7xx-hs-evm = "dra72x dra74x"
# Set cmem.dtsi per machine or machine variant
CMEM_DTSI = "cmem.dtsi"
CMEM_DTSI_am571x = "cmem-am571x.dtsi"
+CMEM_DTSI_dra72x = "cmem-dra72x.dtsi"
# Split device trees between variants
CMEM_DEVICETREE = "${KERNEL_DEVICETREE}"
CMEM_DEVICETREE_am571x = "am571x-idk.dtb am571x-idk-lcd-osd.dtb am571x-idk-lcd-osd101t2587.dtb"
CMEM_DEVICETREE_am572x = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revb1.dtb am57xx-evm.dtb am57xx-evm-reva3.dtb am572x-idk.dtb \
am572x-idk-lcd-osd.dtb am572x-idk-lcd-osd101t2587.dtb"
-
+CMEM_DEVICETREE_dra72x = "dra72-evm.dtb dra72-evm-lcd-lg.dtb dra72-evm-lcd-osd.dtb dra72-evm-lcd-osd101t2587.dtb \
+ dra72-evm-revc.dtb dra72-evm-revc-lcd-osd101t2045.dtb dra72-evm-revc-lcd-osd101t2587.dtb"
+CMEM_DEVICETREE_dra74x = "dra7-evm.dtb dra7-evm-lcd-lg.dtb dra7-evm-lcd-osd.dtb dra7-evm-lcd-osd101t2587.dtb"
# Flag to enable CMEM injection
RESERVE_CMEM ?= "0"
diff --git a/recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi b/recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi
new file mode 100644
index 0000000..ebd6129
--- /dev/null
+++ b/recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi
@@ -0,0 +1,29 @@
+/ {
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ cmem_block_mem_0: cmem_block_mem@a0000000 {
+ reg = <0x0 0xa0000000 0x0 0x0c000000>;
+ no-map;
+ status = "okay";
+ };
+ };
+
+ cmem {
+ compatible = "ti,cmem";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ #pool-size-cells = <2>;
+
+ status = "okay";
+
+ cmem_block_0: cmem_block@0 {
+ reg = <0>;
+ memory-region = <&cmem_block_mem_0>;
+ cmem-buf-pools = <1 0x0 0x0c000000>;
+ };
+ };
+};
--
2.7.4
^ permalink raw reply related
* blk-mq: preparation of the ground for BFQ inclusion
From: Paolo Valente @ 2016-11-14 22:13 UTC (permalink / raw)
To: Jens Axboe
Cc: Linus Walleij, Mark Brown, Ulf Hansson, Omar Sandoval, Jan Kara,
Bart Van Assche, linux-block, Christoph Hellwig
Hi Jens,
have you had time to look into the first extensions/changes required?
Any time plan?
Thanks,
Paolo
^ permalink raw reply
* Re: [PATCH] cpufreq: intel_pstate: Synchronize sysfs limits
From: Rafael J. Wysocki @ 2016-11-14 22:11 UTC (permalink / raw)
To: Srinivas Pandruvada
Cc: Rafael J. Wysocki, Len Brown, Rafael J. Wysocki, Linux PM
In-Reply-To: <1479161257.6544.33.camel@linux.intel.com>
On Mon, Nov 14, 2016 at 11:07 PM, Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
> On Mon, 2016-11-14 at 02:04 +0100, Rafael J. Wysocki wrote:
>> On Sat, Nov 12, 2016 at 1:11 AM, Srinivas Pandruvada
>>
> [...]
>> + get_online_cpus();
>> > + for_each_online_cpu(cpu) {
>> > + if (all_cpu_data[cpu])
>> > + cpufreq_update_policy(cpu);
>>
>> cpufreq_update_policy() calls cpufreq_cpu_get() to get the policy
>> anyway which does the requisite policy existence check (although it
>> is
>> a bit racy now, but that's a bug in there that we should not have to
>> work around here), so it should be sufficient to do this
>> for_each_possible_cpu() without additional locking.
>>
> I will change in the next patch set.
Wait, wait, there's a better way I think, but I'll need to send a
patch to explain what I mean. :-) Will do that shortly.
Thanks,
Rafael
^ permalink raw reply
* qed, qedi patchset submission
From: Arun Easi @ 2016-11-14 21:53 UTC (permalink / raw)
To: Martin K. Petersen, David Miller, linux-scsi, netdev
Hi Martin, David,
This is regarding the submission of the recent patch series we have posted
to linux-scsi and netdev:
[PATCH v2 0/6] Add QLogic FastLinQ iSCSI (qedi) driver.
[PATCH v2 1/6] qed: Add support for hardware offloaded iSCSI.
[PATCH v2 2/6] qed: Add iSCSI out of order packet handling.
[PATCH v2 3/6] qedi: Add QLogic FastLinQ offload iSCSI driver framework.
[PATCH v2 4/6] qedi: Add LL2 iSCSI interface for offload iSCSI.
[PATCH v2 5/6] qedi: Add support for iSCSI session management.
[PATCH v2 6/6] qedi: Add support for data path.
Patches 1 & 2 are "qed" module patches that goes under
drivers/net/ethernet/qlogic/qed/ and include/linux/qed/ directory.
- These are the iSCSI enablement changes to the common "qed"
module. There is no dependency for these patches and so
can go independently.
Patches 3, 4, 5 & 6 are the qedi patches that is aimed towards
drivers/scsi/qedi/ directory.
- These are the core qedi changes and is dependent on the
qed changes (invokes qed_XXX functions).
As qed sits in the net tree, the patches are usually submitted via netdev.
Do you have any preference or thoughts on how the "qed" patches be
approached? Just as a reference, our rdma driver "qedr" went through
something similar[1], and eventually "qed" patches were taken by David
in the net tree and "qedr", in the rdma tree (obviously) by Doug L.
Hi David,
For the "qed" enablement sent with the v2 series, we did not prefix the
qed patches with "[PATCH net-next]" prefix, so netdev folks may have
failed to notice/review that, sorry about that. We will send the next (v3)
series with that corrected.
Right now, we are basing the "qed" patches on top of latest net + net-next
tree. FYI, I tried a test merge of net-next/master + qed patches with
"net/master" and I see no conflict in qed.
Regards,
-Arun
[1] http://marc.info/?l=linux-rdma&m=147509152719831&w=2
^ permalink raw reply
* Re: [PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred
From: Rafael J. Wysocki @ 2016-11-14 22:09 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Stratos Karafotis, Rafael J. Wysocki, Viresh Kumar,
linux-pm@vger.kernel.org, LKML
In-Reply-To: <CAJZ5v0hO2T41qkPNETqJv7yfJ-=V34gqr_gEy7bNxg83e5HB+g@mail.gmail.com>
On Mon, Nov 14, 2016 at 10:59 PM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Mon, Nov 14, 2016 at 10:46 PM, Stratos Karafotis
> <stratosk@semaphore.gr> wrote:
>>
>>
>> On 14/11/2016 10:44 μμ, Rafael J. Wysocki wrote:
>>> On Sat, Nov 12, 2016 at 10:04 PM, Stratos Karafotis
>>> <stratosk@semaphore.gr> wrote:
>>>> Conservative governor changes the CPU frequency in steps.
>>>> That means that if a CPU runs at max frequency, it will need several
>>>> sampling periods to return to min frequency when the workload
>>>> is finished.
>>>>
>>>> If the update function that calculates the load and target frequency
>>>> is deferred, the governor might need even more time to decrease the
>>>> frequency.
>>>>
>>>> This may have impact to power consumption and after all conservative
>>>> should decrease the frequency if there is no workload at every sampling
>>>> rate.
>>>>
>>>> To resolve the above issue calculate the number of sampling periods
>>>> that the update is deferred. Considering that for each sampling period
>>>> conservative should drop the frequency by a freq_step because the
>>>> CPU was idle apply the proper subtraction to requested frequency.
>>>>
>>>> Below, the kernel trace with and without this patch. First an
>>>> intensive workload is applied on a specific CPU. Then the workload
>>>> is removed and the CPU goes to idle.
>>>>
>>>> WITHOUT
>>>>
>>>> <idle>-0 [007] dN.. 620.329153: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.350857: cpu_frequency: state=1700000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.370856: cpu_frequency: state=1900000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.390854: cpu_frequency: state=2100000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.411853: cpu_frequency: state=2200000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.432854: cpu_frequency: state=2400000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.453854: cpu_frequency: state=2600000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.494856: cpu_frequency: state=2900000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.515856: cpu_frequency: state=3100000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.536858: cpu_frequency: state=3300000 cpu_id=7
>>>> kworker/7:2-556 [007] .... 620.557857: cpu_frequency: state=3401000 cpu_id=7
>>>> <idle>-0 [007] d... 669.591363: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 669.591939: cpu_idle: state=4294967295 cpu_id=7
>>>> <idle>-0 [007] d... 669.591980: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] dN.. 669.591989: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 670.201224: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 670.221975: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 670.222016: cpu_frequency: state=3300000 cpu_id=7
>>>> <idle>-0 [007] d... 670.222026: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 670.234964: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 670.801251: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 671.236046: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 671.236073: cpu_frequency: state=3100000 cpu_id=7
>>>> <idle>-0 [007] d... 671.236112: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 671.393437: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 671.401277: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 671.404083: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 671.404111: cpu_frequency: state=2900000 cpu_id=7
>>>> <idle>-0 [007] d... 671.404125: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 671.404974: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 671.501180: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 671.995414: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 671.995459: cpu_frequency: state=2800000 cpu_id=7
>>>> <idle>-0 [007] d... 671.995469: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 671.996287: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 672.001305: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.078374: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 672.078410: cpu_frequency: state=2600000 cpu_id=7
>>>> <idle>-0 [007] d... 672.078419: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.158020: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 672.158040: cpu_frequency: state=2400000 cpu_id=7
>>>> <idle>-0 [007] d... 672.158044: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.160038: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 672.234557: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.237121: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 672.237174: cpu_frequency: state=2100000 cpu_id=7
>>>> <idle>-0 [007] d... 672.237186: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.237778: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 672.267902: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.269860: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 672.269906: cpu_frequency: state=1900000 cpu_id=7
>>>> <idle>-0 [007] d... 672.269914: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.271902: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 672.751342: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 672.823056: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-556 [007] .... 672.823095: cpu_frequency: state=1600000 cpu_id=7
>>>>
>>>> WITH
>>>>
>>>> <idle>-0 [007] dN.. 4380.928009: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4380.949767: cpu_frequency: state=2000000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4380.969765: cpu_frequency: state=2200000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4381.009766: cpu_frequency: state=2500000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4381.029767: cpu_frequency: state=2600000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4381.049769: cpu_frequency: state=2800000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4381.069769: cpu_frequency: state=3000000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4381.089771: cpu_frequency: state=3100000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4381.109772: cpu_frequency: state=3400000 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4381.129773: cpu_frequency: state=3401000 cpu_id=7
>>>> <idle>-0 [007] d... 4428.226159: cpu_idle: state=1 cpu_id=7
>>>> <idle>-0 [007] d... 4428.226176: cpu_idle: state=4294967295 cpu_id=7
>>>> <idle>-0 [007] d... 4428.226181: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 4428.227177: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 4428.551640: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 4428.649239: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4428.649268: cpu_frequency: state=2800000 cpu_id=7
>>>> <idle>-0 [007] d... 4428.649278: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 4428.689856: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 4428.799542: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 4428.801683: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4428.801748: cpu_frequency: state=1700000 cpu_id=7
>>>> <idle>-0 [007] d... 4428.801761: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 4428.806545: cpu_idle: state=4294967295 cpu_id=7
>>>> ...
>>>> <idle>-0 [007] d... 4429.051880: cpu_idle: state=4 cpu_id=7
>>>> <idle>-0 [007] d... 4429.086240: cpu_idle: state=4294967295 cpu_id=7
>>>> kworker/7:2-399 [007] .... 4429.086293: cpu_frequency: state=1600000 cpu_id=7
>>>>
>>>> Without the patch the CPU dropped to min frequency after 3.2s
>>>> With the patch applied the CPU dropped to min frequency after 0.86s
>>>>
>>>> Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
>>>> ---
>>>> v1 -> v2
>>>> - Use correct terminology in change log
>>>> - Change the member variable name from 'deferred_periods' to 'idle_periods'
>>>> - Fix format issue
>>>>
>>>> drivers/cpufreq/cpufreq_conservative.c | 14 +++++++++++++-
>>>> drivers/cpufreq/cpufreq_governor.c | 18 +++++++++++++-----
>>>> drivers/cpufreq/cpufreq_governor.h | 1 +
>>>> 3 files changed, 27 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
>>>> index fa5ece3..d787772 100644
>>>> --- a/drivers/cpufreq/cpufreq_conservative.c
>>>> +++ b/drivers/cpufreq/cpufreq_conservative.c
>>>> @@ -73,7 +73,19 @@ static unsigned int cs_dbs_update(struct cpufreq_policy *policy)
>>>> */
>>>> if (cs_tuners->freq_step == 0)
>>>> goto out;
>>>> -
>>>> + /*
>>>> + * Decrease requested_freq for each idle period that we didn't
>>>> + * update the frequency
>>>> + */
>>>> + if (policy_dbs->idle_periods < UINT_MAX) {
>>>> + unsigned int freq_target = policy_dbs->idle_periods *
>>>> + get_freq_target(cs_tuners, policy);
>>>> + if (requested_freq > freq_target)
>>>> + requested_freq -= freq_target;
>>>> + else
>>>> + requested_freq = policy->min;
>>>> + policy_dbs->idle_periods = UINT_MAX;
>>>> + }
>>>> /*
>>>> * If requested_freq is out of range, it is likely that the limits
>>>> * changed in the meantime, so fall back to current frequency in that
>>>> diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
>>>> index 3729474..1bc7137 100644
>>>> --- a/drivers/cpufreq/cpufreq_governor.c
>>>> +++ b/drivers/cpufreq/cpufreq_governor.c
>>>> @@ -117,7 +117,7 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
>>>> struct policy_dbs_info *policy_dbs = policy->governor_data;
>>>> struct dbs_data *dbs_data = policy_dbs->dbs_data;
>>>> unsigned int ignore_nice = dbs_data->ignore_nice_load;
>>>> - unsigned int max_load = 0;
>>>> + unsigned int max_load = 0, idle_periods = UINT_MAX;
>>>> unsigned int sampling_rate, io_busy, j;
>>>>
>>>> /*
>>>> @@ -163,8 +163,12 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
>>>> * calls, so the previous load value can be used then.
>>>> */
>>>> load = j_cdbs->prev_load;
>>>> - } else if (unlikely(time_elapsed > 2 * sampling_rate &&
>>>> - j_cdbs->prev_load)) {
>>>> + } else if (unlikely(time_elapsed > 2 * sampling_rate)) {
>>>> + unsigned int periods = time_elapsed / sampling_rate;
>>>> +
>>>> + if (periods < idle_periods)
>>>> + idle_periods = periods;
>>>> +
>>>> /*
>>>> * If the CPU had gone completely idle and a task has
>>>> * just woken up on this CPU now, it would be unfair to
>>>> @@ -189,8 +193,10 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
>>>> * 'time_elapsed' (as compared to the sampling rate)
>>>> * indicates this scenario.
>>>> */
>>>> - load = j_cdbs->prev_load;
>>>> - j_cdbs->prev_load = 0;
>>>> + if (j_cdbs->prev_load) {
>>>> + load = j_cdbs->prev_load;
>>>> + j_cdbs->prev_load = 0;
>>>> + }
>>>> } else {
>>>> if (time_elapsed >= idle_time) {
>>>> load = 100 * (time_elapsed - idle_time) / time_elapsed;
>>>> @@ -218,6 +224,8 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
>>>> if (load > max_load)
>>>> max_load = load;
>>>> }
>>>> + policy_dbs->idle_periods = idle_periods;
>>>> +
>>>> return max_load;
>>>> }
>>>> EXPORT_SYMBOL_GPL(dbs_update);
>>>
>>> I have a murky suspicion that the changes in dbs_update() are going to
>>> break something. I need to recall what it was, though.
>>
>> The only change in dbs_update() is the calculation of 'idle_periods'.
>> If I don't miss something I left current functionality untouched.
>
> Well, not quite. The else branch may now trigger when
> j_cdbs->prev_load is zero too which it didn't do before, AFAICS.
What I mean is that the "if else" never triggers when
j_cdbs->prev_load is zero before the change, but that changes, so the
"else" branch will not cover the "j_cdbs->prev_load equal to zero"
case any more. I'm not sure how much that matters ATM, though.
Sent too quickly, sorry.
Thanks,
Rafael
^ permalink raw reply
* Re: [PATCH] net/phy/vitesse: Configure RGMII skew on VSC8601, if needed
From: Alex @ 2016-11-14 21:54 UTC (permalink / raw)
To: Florian Fainelli, David Miller; +Cc: gokhan, netdev, linux-kernel
In-Reply-To: <d567c69f-6b57-7083-9090-df01fb140e36@gmail.com>
On 11/14/2016 01:25 PM, Florian Fainelli wrote:
> On 11/14/2016 01:18 PM, David Miller wrote:
>> From: Alexandru Gagniuc <alex.g@adaptrum.com>
>> Date: Sat, 12 Nov 2016 15:32:13 -0800
>>
>>> + if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
>>> + ret = vsc8601_add_skew(phydev);
>>
>> I think you should use phy_interface_is_rgmii() here.
>>
>
> This would include all RGMII modes, here I think the intent is to check
> for PHY_INTERFACE_MODE_RGMII_ID and PHY_INTERFACE_MODE_RGMII_TXID (or
> RXID),
That is correct.
> Alexandru, what direction does the skew settings apply to?
It applies a skew in both TX and RX directions.
Alex
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2016-11-14 22:08 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Fix off by one wrt. indexing when dumping /proc/net/route entries, from
Alexander Duyck.
2) Fix lockdep splats in iwlwifi, from Johannes Berg.
3) Cure panic when inserting certain netfilter rules when NFT_SET_HASH
is disabled, from Liping Zhang.
4) Memory leak when nft_expr_clone() fails, also from Liping Zhang.
5) Disable UFO when path will apply IPSEC tranformations, from Jakub
Sitnicki.
6) Don't bogusly double cwnd in dctcp module, from Florian Westphal.
7) skb_checksum_help() should never actually use the value "0" for
the resulting checksum, that has a special meaning, use CSUM_MANGLED_0
instead. From Eric Dumazet.
8) Per-tx/rx queue statistic strings are wrong in qed driver, fix from
Yuval MIntz.
9) Fix SCTP reference counting of associations and transports in
sctp_diag. From Xin Long.
10) When we hit ip6tunnel_xmit() we could have come from an ipv4
path in a previous layer or similar, so explicitly clear the
ipv6 control block in the skb. From Eli Cooper.
11) Fix bogus sleeping inside of inet_wait_for_connect(), from WANG
Cong.
12) Correct deivce ID of T6 adapter in cxgb4 driver, from Hariprasad
Shenai.
13) Fix potential access past the end of the skb page frag array in
tcp_sendmsg(). From Eric Dumazet.
14) 'skb' can legitimately be NULL in inet{,6}_exact_dif_match(). Fix
from David Ahern.
15) Don't return an error in tcp_sendmsg() if we wronte any bytes
successfully, from Eric Dumazet.
16) Extraneous unlocks in netlink_diag_dump(), we removed the locking
but forgot to purge these unlock calls. From Eric Dumazet.
17) Fix memory leak in error path of __genl_register_family(). We
leak the attrbuf, from WANG Cong.
18) cgroupstats netlink policy table is mis-sized, from WANG Cong.
19) Several XDP bug fixes in mlx5, from Saeed Mahameed.
20) Fix several device refcount leaks in network drivers, from Johan
Hovold.
21) icmp6_send() should use skb dst device not skb->dev to determine
L3 routing domain. From David Ahern.
22) ip_vs_genl_family sets maxattr incorrectly, from WANG Cong.
23) We leak new macvlan port in some cases of maclan_common_netlink()
errors. Fix from Gao Feng.
24) Similar to the icmp6_send() fix, icmp_route_lookup() should determine
L3 routing domain using skb_dst(skb)->dev not skb->dev. Also
from David Ahern.
25) Several fixes for route offloading and FIB notification handling
in mlxsw driver, from Jiri Pirko.
26) Properly cap __skb_flow_dissect()'s return value, from Eric
Dumazet.
27) Fix long standing regression in ipv4 redirect handling,
wrt. validating the new neighbour's reachability. From
Stephen Suryaputra Lin.
28) If sk_filter() trims the packet excessively, handle it reasonably
in tcp input instead of exploding. From Eric Dumazet.
29) Fix handling of napi hash state when copying channels in sfc
driver, from Bert Kenward.
Please pull, thanks a lot!
The following changes since commit 2a26d99b251b8625d27aed14e97fc10707a3a81f:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2016-10-29 20:33:20 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
for you to fetch changes up to ac571de999e14b87890cb960ad6f03fbdde6abc8:
mlxsw: spectrum_router: Flush FIB tables during fini (2016-11-14 16:45:16 -0500)
----------------------------------------------------------------
Alexander Duyck (1):
fib_trie: Correct /proc/net/route off by one error
Allan Chou (1):
Net Driver: Add Cypress GX3 VID=04b4 PID=3610.
Andy Gospodarek (1):
bgmac: stop clearing DMA receive control register right after it is set
Arkadi Sharshevsky (1):
mlxsw: spectrum_router: Correctly dump neighbour activity
Arnd Bergmann (3):
brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap
netfilter: ip_vs_sync: fix bogus maybe-uninitialized warning
vxlan: hide unused local variable
Baoquan He (2):
Revert "bnx2: Reset device during driver initialization"
bnx2: Wait for in-flight DMA to complete at probe stage
Baruch Siach (1):
net: bpqether.h: remove if_ether.h guard
Benjamin Poirier (1):
bna: Add synchronization for tx ring.
Bert Kenward (1):
sfc: clear napi_hash state when copying channels
Christophe Jaillet (1):
net/mlx5: Simplify a test
Colin Ian King (2):
net: ethernet: ixp4xx_eth: fix spelling mistake in debug message
ps3_gelic: fix spelling mistake in debug message
Daniel Borkmann (2):
bpf: fix htab map destruction when extra reserve is in use
bpf: fix map not being uncharged during map creation failure
David Ahern (4):
net: tcp: check skb is non-NULL for exact match on lookups
net: icmp6_send should use dst dev to determine L3 domain
net: icmp_route_lookup should use rt dev to determine L3 domain
net: tcp response should set oif only if it is L3 master
David S. Miller (14):
Merge tag 'wireless-drivers-for-davem-2016-10-30' of git://git.kernel.org/.../kvalo/wireless-drivers
Merge branch 'sctp-hold-transport-fixes'
Merge tag 'linux-can-fixes-for-4.9-20161031' of git://git.kernel.org/.../mkl/linux-can
Merge branch 'xgene-coalescing-bugs'
Merge branch 'mlx5-fixes'
Merge branch 'phy-ref-leaks'
Merge branch 'qcom-emac-pause'
Merge git://git.kernel.org/.../pablo/nf
Merge branch 'qed-fixes'
Merge branch 'mlxsw-fixes'
Merge branch 'fix-bpf_redirect'
Merge branch 'bnxt_en-fixes'
Merge branch 'mlxsw-fixes'
Merge branch 'bnx2-kdump-fix'
Dongli Zhang (2):
xen-netfront: do not cast grant table reference to signed short
xen-netfront: cast grant table reference first to type int
Eli Cooper (2):
ip6_tunnel: Clear IP6CB in ip6tunnel_xmit()
ip6_udp_tunnel: remove unused IPCB related codes
Eric Dumazet (12):
net: clear sk_err_soft in sk_clone_lock()
net: mangle zero checksum in skb_checksum_help()
tcp: fix potential memory corruption
tcp: fix return value for partial writes
dccp: do not release listeners too soon
dccp: do not send reset to already closed sockets
dccp: fix out of bound access in dccp_v4_err()
netlink: netlink_diag_dump() runs without locks
ipv6: dccp: fix out of bound access in dccp_v6_err()
ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped
net: __skb_flow_dissect() must cap its return value
tcp: take care of truncations done by sk_filter()
Fabian Mewes (1):
Documentation: networking: dsa: Update tagging protocols
Florian Fainelli (1):
net: stmmac: Fix lack of link transition for fixed PHYs
Florian Westphal (5):
netfilter: conntrack: avoid excess memory allocation
dctcp: avoid bogus doubling of cwnd after loss
netfilter: connmark: ignore skbs with magic untracked conntrack objects
netfilter: conntrack: fix CT target for UNSPEC helpers
netfilter: conntrack: refine gc worker heuristics
Gao Feng (1):
driver: macvlan: Destroy new macvlan port if macvlan_common_newlink failed.
Guenter Roeck (1):
r8152: Fix error path in open function
Guilherme G. Piccoli (1):
ehea: fix operation state report
Haim Dreyfuss (1):
iwlwifi: mvm: comply with fw_restart mod param on suspend
Hariprasad Shenai (1):
cxgb4: correct device ID of T6 adapter
Huy Nguyen (1):
net/mlx5: Fix invalid pointer reference when prof_sel parameter is invalid
Ido Schimmel (2):
mlxsw: spectrum: Fix incorrect reuse of MID entries
mlxsw: spectrum_router: Flush FIB tables during fini
Isaac Boukris (1):
unix: escape all null bytes in abstract unix domain socket
Iyappan Subramanian (2):
drivers: net: xgene: fix: Disable coalescing on v1 hardware
drivers: net: xgene: fix: Coalescing values for v2 hardware
Jakub Sitnicki (1):
ipv6: Don't use ufo handling on later transformed packets
Jiri Pirko (2):
mlxsw: spectrum_router: Fix handling of neighbour structure
mlxsw: spectrum_router: Ignore FIB notification events for non-init namespaces
Johan Hovold (4):
phy: fix device reference leaks
net: ethernet: ti: cpsw: fix device and of_node leaks
net: ethernet: ti: davinci_emac: fix device reference leak
net: hns: fix device reference leaks
Johannes Berg (1):
iwlwifi: pcie: mark command queue lock with separate lockdep class
John Allen (1):
ibmvnic: Start completion queue negotiation at server-provided optimum values
John W. Linville (1):
netfilter: nf_tables: fix type mismatch with error return from nft_parse_u32_check
Kalle Valo (1):
Merge tag 'iwlwifi-for-kalle-2015-10-25' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Lance Richardson (2):
ipv4: allow local fragmentation in ip_finish_output_gso()
ipv4: update comment to document GSO fragmentation cases.
Liping Zhang (6):
netfilter: nft_dynset: fix panic if NFT_SET_HASH is not enabled
netfilter: nf_tables: fix *leak* when expr clone fail
netfilter: nf_tables: fix race when create new element in dynset
netfilter: nf_tables: destroy the set if fail to add transaction
netfilter: nft_dup: do not use sreg_dev if the user doesn't specify it
netfilter: nf_tables: fix oops when inserting an element into a verdict map
Luca Coelho (4):
iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read()
iwlwifi: mvm: fix d3_test with unified D0/D3 images
iwlwifi: pcie: fix SPLC structure parsing
iwlwifi: mvm: fix netdetect starting/stopping for unified images
Lukas Resch (1):
can: sja1000: plx_pci: Add support for Moxa CAN devices
Maciej Żenczykowski (1):
net-ipv6: on device mtu change do not add mtu to mtu-less routes
Marcelo Ricardo Leitner (1):
sctp: assign assoc_id earlier in __sctp_connect
Mark Lord (1):
r8152: Fix broken RX checksums.
Martin KaFai Lau (2):
bpf: Fix bpf_redirect to an ipip/ip6tnl dev
bpf: Add test for bpf_redirect to ipip/ip6tnl
Mathias Krause (1):
rtnl: reset calcit fptr in rtnl_unregister()
Michael Chan (2):
bnxt_en: Fix ring arithmetic in bnxt_setup_tc().
bnxt_en: Fix VF virtual link state.
Michael S. Tsirkin (1):
virtio-net: drop legacy features in virtio 1 mode
Mike Frysinger (1):
Revert "include/uapi/linux/atm_zatm.h: include linux/time.h"
Mintz, Yuval (2):
qede: Fix statistics' strings for Tx/Rx queues
qede: Correctly map aggregation replacement pages
Oliver Hartkopp (1):
can: bcm: fix warning in bcm_connect/proc_register
Or Gerlitz (3):
net/mlx5e: Disallow changing name-space for VF representors
net/mlx5e: Handle matching on vlan priority for offloaded TC rules
net/mlx5: E-Switch, Set the actions for offloaded rules properly
Rafał Miłecki (1):
net: bgmac: fix reversed checks for clock control flag
Ram Amrani (2):
qed: configure ll2 RoCE v1/v2 flavor correctly
qed: Correct rdma params configuration
Russell King (1):
net: mv643xx_eth: ensure coalesce settings survive read-modify-write
Saeed Mahameed (3):
MAINTAINERS: Update MELLANOX MLX5 core VPI driver maintainers
net/mlx5e: Fix XDP error path of mlx5e_open_channel()
net/mlx5e: Re-arrange XDP SQ/CQ creation
Sara Sharon (1):
iwlwifi: mvm: wake the wait queue when the RX sync counter is zero
Soheil Hassas Yeganeh (1):
sock: fix sendmmsg for partial sendmsg
Stephen Suryaputra Lin (1):
ipv4: use new_gw for redirect neigh lookup
Tariq Toukan (1):
Revert "net/mlx4_en: Fix panic during reboot"
Thomas Falcon (2):
ibmvnic: Unmap ibmvnic_statistics structure
ibmvnic: Fix size of debugfs name buffer
Timur Tabi (3):
net: qcom/emac: use correct value for SGMII_LN_UCDR_SO_GAIN_MODE0
net: qcom/emac: configure the external phy to allow pause frames
net: qcom/emac: enable flow control if requested
Ulrich Weber (1):
netfilter: nf_conntrack_sip: extend request line validation
WANG Cong (4):
inet: fix sleeping inside inet_wait_for_connect()
genetlink: fix a memory leak on error path
taskstats: fix the length of cgroupstats_cmd_get_policy
ipvs: use IPVS_CMD_ATTR_MAX for family.maxattr
Xin Long (5):
ipv6: add mtu lock check in __ip6_rt_update_pmtu
sctp: hold transport instead of assoc in sctp_diag
sctp: return back transport in __sctp_rcv_init_lookup
sctp: hold transport instead of assoc when lookup assoc in rx path
sctp: change sk state only when it has assocs in sctp_shutdown
Yotam Gigi (1):
mlxsw: spectrum: Fix refcount bug on span entries
Documentation/networking/dsa/dsa.txt | 3 +-
MAINTAINERS | 1 +
drivers/net/can/sja1000/plx_pci.c | 18 ++++++++++
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 12 -------
drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 2 ++
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 3 +-
drivers/net/ethernet/apm/xgene/xgene_enet_ring2.c | 12 ++++---
drivers/net/ethernet/broadcom/bgmac.c | 9 +++--
drivers/net/ethernet/broadcom/bnx2.c | 48 +++++++++++++++++++-------
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 +++---
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 4 +--
drivers/net/ethernet/brocade/bna/bnad.c | 4 +--
drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 2 +-
drivers/net/ethernet/hisilicon/hns/hnae.c | 8 ++++-
drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 ++
drivers/net/ethernet/ibm/ibmvnic.c | 10 +++---
drivers/net/ethernet/marvell/mv643xx_eth.c | 2 ++
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 -
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 31 +++++++++--------
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 ++-
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +--
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-
drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 134 ++++++++++++++++++++++++++++++++++++----------------------------------
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 14 ++++----
drivers/net/ethernet/qlogic/qed/qed_hsi.h | 3 --
drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 +
drivers/net/ethernet/qlogic/qed/qed_main.c | 17 +++++----
drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 25 +++++++++-----
drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +-
drivers/net/ethernet/qualcomm/emac/emac-mac.c | 15 +++++---
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 2 +-
drivers/net/ethernet/sfc/efx.c | 3 ++
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++
drivers/net/ethernet/ti/cpsw-phy-sel.c | 3 ++
drivers/net/ethernet/ti/davinci_emac.c | 10 +++---
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 2 +-
drivers/net/ethernet/xscale/ixp4xx_eth.c | 3 +-
drivers/net/macvlan.c | 31 ++++++++++++-----
drivers/net/phy/phy_device.c | 2 ++
drivers/net/usb/ax88179_178a.c | 17 +++++++++
drivers/net/usb/r8152.c | 21 ++++++-----
drivers/net/virtio_net.c | 30 ++++++++++------
drivers/net/vxlan.c | 4 ++-
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 49 ++++++++++++++++++++------
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 +--
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 33 ++++++++++++++----
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 79 +++++++++++++++++++++++++-----------------
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 +++++
drivers/net/xen-netfront.c | 4 +--
include/linux/ipv6.h | 2 +-
include/linux/netdevice.h | 15 ++++++++
include/net/ip.h | 3 +-
include/net/ip6_tunnel.h | 1 +
include/net/netfilter/nf_conntrack_labels.h | 3 +-
include/net/netfilter/nf_tables.h | 8 +++--
include/net/sctp/sctp.h | 2 +-
include/net/sock.h | 4 +--
include/net/tcp.h | 3 +-
include/uapi/linux/atm_zatm.h | 1 -
include/uapi/linux/bpqether.h | 2 --
kernel/bpf/hashtab.c | 3 +-
kernel/bpf/syscall.c | 4 ++-
kernel/taskstats.c | 6 +++-
net/can/bcm.c | 32 ++++++++++++-----
net/core/dev.c | 19 ++++------
net/core/filter.c | 68 +++++++++++++++++++++++++++++++-----
net/core/flow_dissector.c | 11 ++++--
net/core/rtnetlink.c | 1 +
net/core/sock.c | 6 ++--
net/dccp/ipv4.c | 16 +++++----
net/dccp/ipv6.c | 19 +++++-----
net/dccp/proto.c | 4 +++
net/ipv4/af_inet.c | 9 +++--
net/ipv4/fib_trie.c | 21 +++++------
net/ipv4/icmp.c | 4 +--
net/ipv4/ip_forward.c | 2 +-
net/ipv4/ip_output.c | 25 ++++++++------
net/ipv4/ip_tunnel_core.c | 11 ------
net/ipv4/ipmr.c | 2 +-
net/ipv4/netfilter/nft_dup_ipv4.c | 6 ++--
net/ipv4/route.c | 4 ++-
net/ipv4/tcp.c | 4 +--
net/ipv4/tcp_dctcp.c | 13 ++++++-
net/ipv4/tcp_ipv4.c | 19 +++++++++-
net/ipv6/icmp.c | 2 +-
net/ipv6/ip6_output.c | 2 +-
net/ipv6/ip6_udp_tunnel.c | 3 --
net/ipv6/netfilter/nft_dup_ipv6.c | 6 ++--
net/ipv6/route.c | 4 +++
net/ipv6/tcp_ipv6.c | 14 +++++---
net/netfilter/ipvs/ip_vs_ctl.c | 2 +-
net/netfilter/ipvs/ip_vs_sync.c | 7 ++--
net/netfilter/nf_conntrack_core.c | 49 +++++++++++++++++++++-----
net/netfilter/nf_conntrack_helper.c | 11 ++++--
net/netfilter/nf_conntrack_sip.c | 5 ++-
net/netfilter/nf_tables_api.c | 18 ++++++----
net/netfilter/nft_dynset.c | 19 ++++++----
net/netfilter/nft_set_hash.c | 19 +++++++---
net/netfilter/nft_set_rbtree.c | 2 +-
net/netfilter/xt_connmark.c | 4 +--
net/netlink/diag.c | 5 +--
net/netlink/genetlink.c | 4 ++-
net/sctp/input.c | 35 +++++++++----------
net/sctp/ipv6.c | 2 +-
net/sctp/socket.c | 27 +++++++--------
net/socket.c | 2 ++
net/unix/af_unix.c | 3 +-
samples/bpf/Makefile | 4 +++
samples/bpf/tc_l2_redirect.sh | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
samples/bpf/tc_l2_redirect_kern.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
samples/bpf/tc_l2_redirect_user.c | 73 +++++++++++++++++++++++++++++++++++++++
120 files changed, 1358 insertions(+), 465 deletions(-)
create mode 100755 samples/bpf/tc_l2_redirect.sh
create mode 100644 samples/bpf/tc_l2_redirect_kern.c
create mode 100644 samples/bpf/tc_l2_redirect_user.c
^ permalink raw reply
* Re: [PATCH 1/5] pinctrl: core: Use delayed work for hogs
From: Tony Lindgren @ 2016-11-14 22:08 UTC (permalink / raw)
To: Linus Walleij
Cc: Haojian Zhuang, Masahiro Yamada, Grygorii Strashko,
Nishanth Menon, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Linux-OMAP
In-Reply-To: <20161114205243.GU7138@atomide.com>
* Tony Lindgren <tony@atomide.com> [161114 12:54]:
> * Tony Lindgren <tony@atomide.com> [161111 12:27]:
> > * Linus Walleij <linus.walleij@linaro.org> [161111 12:17]:
> > > On Tue, Oct 25, 2016 at 11:02 PM, Tony Lindgren <tony@atomide.com> wrote:
> > > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > >
> > > I don't see why this is necessary?
> >
> > It's needed because the pin controller driver has not yet
> > finished it's probe at this point. We end up calling functions
> > in the device driver where no struct pinctrl_dev is yet known
> > to the driver. Asking a device driver to do something before
> > it's probe is done does not quite follow the Linux driver model :)
> >
> > > The hogging was placed inside pinctrl_register() so that any hogs
> > > would be taken before it returns, so nothing else can take it
> > > before the controller itself has the first chance. This semantic
> > > needs to be preserved I think.
> > >
> > > > + schedule_delayed_work(&pctldev->hog_work,
> > > > + msecs_to_jiffies(100));
> > >
> > > If we arbitrarily delay, something else can go in and take the
> > > pins used by the hogs before the pinctrl core? That is what
> > > we want to avoid.
> > >
> > > Hm, 100ms seems arbitrarily chosen BTW. Can it be 1 ms?
> > > 1 ns?
> >
> > Yeah well seems like it should not matter but the race we need
> > to remove somehow.
> >
> > > I'm pretty sure that whatever it is that needs to happen before
> > > the hog work runs can race with this delayed work under
> > > some circumstances (such as slow external expanders
> > > on i2c). It should be impossible for that to happen
> > > and I don't think it is?
> >
> > Yes it's totally possible even with delay set to 0.
> >
> > Maybe we could add some trigger on the first consumer request
> > and if that does not happen use the timer?
>
> Below is what I came up with for removing the race for hogs. We
> can do it by not registering the pctldev until in the deferred
> work, does that seem OK to you?
Oops, that does not yet work, will have to look into it more.
Regards,
Tony
^ permalink raw reply
* Re: [PATCH 1/5] pinctrl: core: Use delayed work for hogs
From: Tony Lindgren @ 2016-11-14 22:08 UTC (permalink / raw)
To: Linus Walleij
Cc: Haojian Zhuang, Masahiro Yamada, Grygorii Strashko,
Nishanth Menon,
linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux-OMAP
In-Reply-To: <20161114205243.GU7138-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
* Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> [161114 12:54]:
> * Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> [161111 12:27]:
> > * Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> [161111 12:17]:
> > > On Tue, Oct 25, 2016 at 11:02 PM, Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> wrote:
> > > > Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> > >
> > > I don't see why this is necessary?
> >
> > It's needed because the pin controller driver has not yet
> > finished it's probe at this point. We end up calling functions
> > in the device driver where no struct pinctrl_dev is yet known
> > to the driver. Asking a device driver to do something before
> > it's probe is done does not quite follow the Linux driver model :)
> >
> > > The hogging was placed inside pinctrl_register() so that any hogs
> > > would be taken before it returns, so nothing else can take it
> > > before the controller itself has the first chance. This semantic
> > > needs to be preserved I think.
> > >
> > > > + schedule_delayed_work(&pctldev->hog_work,
> > > > + msecs_to_jiffies(100));
> > >
> > > If we arbitrarily delay, something else can go in and take the
> > > pins used by the hogs before the pinctrl core? That is what
> > > we want to avoid.
> > >
> > > Hm, 100ms seems arbitrarily chosen BTW. Can it be 1 ms?
> > > 1 ns?
> >
> > Yeah well seems like it should not matter but the race we need
> > to remove somehow.
> >
> > > I'm pretty sure that whatever it is that needs to happen before
> > > the hog work runs can race with this delayed work under
> > > some circumstances (such as slow external expanders
> > > on i2c). It should be impossible for that to happen
> > > and I don't think it is?
> >
> > Yes it's totally possible even with delay set to 0.
> >
> > Maybe we could add some trigger on the first consumer request
> > and if that does not happen use the timer?
>
> Below is what I came up with for removing the race for hogs. We
> can do it by not registering the pctldev until in the deferred
> work, does that seem OK to you?
Oops, that does not yet work, will have to look into it more.
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v2 00/12] Additional iProc PCIe host support/fixes
From: Bjorn Helgaas @ 2016-11-14 22:08 UTC (permalink / raw)
To: Ray Jui
Cc: Bjorn Helgaas, linux-kernel, bcm-kernel-feedback-list, linux-pci,
Alex Barba, Oza Oza
In-Reply-To: <1477960721-17649-1-git-send-email-ray.jui@broadcom.com>
On Mon, Oct 31, 2016 at 05:38:29PM -0700, Ray Jui wrote:
> This patch series contains various changes and fixes to the iProc PCIe
> host driver. It also adds support for the next generation of PAXB and
> PAXC based host controllers
>
> This patch series was developed based on v4.9-rc1 and tested on both NS2
> SVK and Cygnus wireless audio platform
>
> repo: https://github.com/Broadcom/arm64-linux.git
> branch: iproc-pcie-v2
>
> Changes from v1:
> - Fixed varioues typos in the commit message
> - Improved various DT binding patch titles with more specific information
>
> Ray Jui (12):
> PCI: iproc: Improve core register population
> PCI: iproc: Do not reset PAXC when initializing the driver
> PCI: iproc: Add BCMA type
> PCI: iproc: Fix exception with multi-function devices
> PCI: iproc: Added PAXCv2 related binding
> PCI: iproc: Add PAXC v2 support
> PCI: iproc: Remove redundant outbound properties
> PCI: iproc: Making outbound mapping code more generic
> PCI: iproc: Add optional dma-ranges
> PCI: iproc: Add inbound DMA mapping support
> PCI: iproc: Add PAXBv2 binding info
> PCI: iproc: Add support for the next-gen PAXB controller
>
> .../devicetree/bindings/pci/brcm,iproc-pcie.txt | 43 +-
> drivers/pci/host/pcie-iproc-bcma.c | 1 +
> drivers/pci/host/pcie-iproc-msi.c | 1 +
> drivers/pci/host/pcie-iproc-platform.c | 19 +-
> drivers/pci/host/pcie-iproc.c | 942 ++++++++++++++++++---
> drivers/pci/host/pcie-iproc.h | 45 +-
> 6 files changed, 916 insertions(+), 135 deletions(-)
Applied to pci/host-iproc for v4.10, thanks!
^ permalink raw reply
* Re: [PATCH] cpufreq: intel_pstate: Synchronize sysfs limits
From: Srinivas Pandruvada @ 2016-11-14 22:07 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Len Brown, Rafael J. Wysocki, Linux PM
In-Reply-To: <CAJZ5v0j8CQk8tbxsCA_R0M2RJ4u58UexQkb7Waq4qRYQdRcw1A@mail.gmail.com>
On Mon, 2016-11-14 at 02:04 +0100, Rafael J. Wysocki wrote:
> On Sat, Nov 12, 2016 at 1:11 AM, Srinivas Pandruvada
>
[...]
> + get_online_cpus();
> > + for_each_online_cpu(cpu) {
> > + if (all_cpu_data[cpu])
> > + cpufreq_update_policy(cpu);
>
> cpufreq_update_policy() calls cpufreq_cpu_get() to get the policy
> anyway which does the requisite policy existence check (although it
> is
> a bit racy now, but that's a bug in there that we should not have to
> work around here), so it should be sufficient to do this
> for_each_possible_cpu() without additional locking.
>
I will change in the next patch set.
> >
[...]
> > + cpufreq_register_notifier(&intel_pstate_cpufreq_notifier_bl
> > ock,
> > + CPUFREQ_POLICY_NOTIFIER);
> > +
>
> cpufreq_set_policy() will call our ->verify() and ->set_policy()
> things, so why do we need the notifier?
>
I was simply replicating what is done for _PPC notifiers. But we can do
in verify() callback here. In the next patch, I will change this.
Thanks,
Srinivas
^ permalink raw reply
* [PATCH] rmc: Fix compiling issue with musl
From: Jianxun Zhang @ 2016-11-14 22:10 UTC (permalink / raw)
To: openembedded-core
| src/rmcl/rmcl.c: In function 'query_policy_from_db':
| src/rmcl/rmcl.c:254:25: error: unknown type name 'ssize_t'
| ssize_t cmd_name_len = strlen((char *)&rmc_db[policy_idx]) + 1;
| ^~~~~~~~
The musl C lib provides ssize_t but we need to enable it
with a macro.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
---
Before maintainer(s) push "merge" button, please read this short summary.
I feel there could be a better syntax to do it. And We could need to get
an ack from Hernandez, Alejandro who reported this issue and seems still
have (other) compiling errors even with this patch.
I submit this patch based on my thoughts and test out of tiny config.
Tests:
() Specify TCLIBC = "musl" in local.conf in my build dir.
() Build quark
() I can see this issue happens without the fix
() With this patch and do clean builds for quark and corei7-64,
Compiling passes. Boot test passed on RMC targets quark and Broxton-m.
Thanks
common/recipes-bsp/rmc/rmc.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/recipes-bsp/rmc/rmc.bb b/common/recipes-bsp/rmc/rmc.bb
index aeaf12e..61a1bdb 100644
--- a/common/recipes-bsp/rmc/rmc.bb
+++ b/common/recipes-bsp/rmc/rmc.bb
@@ -24,6 +24,8 @@ COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*"
EXTRA_OEMAKE='RMC_CFLAGS="-Wl,--hash-style=both"'
+EXTRA_OEMAKE_append_libc-musl = '" -D__NEED_ssize_t"'
+
# from gnu-efi, we should align arch-mapping with it.
def rmc_efi_arch(d):
import re
--
2.7.4
^ permalink raw reply related
* [PATCH] python3-pip: upgrade to 9.0.1
From: Edwin Plauchu @ 2016-11-14 22:09 UTC (permalink / raw)
To: openembedded-core; +Cc: Edwin Plauchu
From: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@linux.intel.com>
---
.../python/{python3-pip_8.1.2.bb => python3-pip_9.0.1.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/python/{python3-pip_8.1.2.bb => python3-pip_9.0.1.bb} (90%)
diff --git a/meta/recipes-devtools/python/python3-pip_8.1.2.bb b/meta/recipes-devtools/python/python3-pip_9.0.1.bb
similarity index 90%
rename from meta/recipes-devtools/python/python3-pip_8.1.2.bb
rename to meta/recipes-devtools/python/python3-pip_9.0.1.bb
index eefb4cb..6ac94bb 100644
--- a/meta/recipes-devtools/python/python3-pip_8.1.2.bb
+++ b/meta/recipes-devtools/python/python3-pip_9.0.1.bb
@@ -9,8 +9,8 @@ DEPENDS += "python3 python3-setuptools-native"
SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "87083c0b9867963b29f7aba3613e8f4a"
-SRC_URI[sha256sum] = "4d24b03ffa67638a3fa931c09fd9e0273ffa904e95ebebe7d4b1a54c93d7b732"
+SRC_URI[md5sum] = "35f01da33009719497f01a4ba69d63c9"
+SRC_URI[sha256sum] = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"
UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
--
1.9.1
^ permalink raw reply related
* Re: [PATCH] qla2xxx: do not abort all commands in the adapter during EEH recovery
From: Madhani, Himanshu @ 2016-11-14 22:07 UTC (permalink / raw)
To: Mauricio Faria de Oliveira, qla2xxx-upstream@qlogic.com
Cc: martin.petersen@oracle.com, jejb@linux.vnet.ibm.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <1479158782-4544-1-git-send-email-mauricfo@linux.vnet.ibm.com>
On 11/14/16, 1:26 PM, "Mauricio Faria de Oliveira" <mauricfo@linux.vnet.ibm.com> wrote:
>The previous commit ("qla2xxx: fix invalid DMA access after command
>aborts in PCI device remove") introduced a regression during an EEH
>recovery, since the change to the qla2x00_abort_all_cmds() function
>calls qla2xxx_eh_abort(), which verifies the EEH recovery condition
>but handles it heavy-handed. (commit a465537ad1a4 "qla2xxx: Disable
>the adapter and skip error recovery in case of register disconnect.")
>
>This problem warrants a more general/optimistic solution right into
>qla2xxx_eh_abort() (eg in case a real command abort arrives during
>EEH recovery, or if it takes long enough to trigger command aborts);
>but it's still worth to add a check to ensure the code added by the
>previous commit is correct and contained within its owner function.
>
>This commit just adds a 'if (!ha->flags.eeh_busy)' check around it.
>(ahem; a trivial fix for this -rc series; sorry for this oversight.)
>
>With it applied, both PCI device remove and EEH recovery works fine.
>
>Fixes: 1535aa75a3d8 ("scsi: qla2xxx: fix invalid DMA access after
>command aborts in PCI device remove")
>Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
>---
> drivers/scsi/qla2xxx/qla_os.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
>index 567fa080e261..56d6142852a5 100644
>--- a/drivers/scsi/qla2xxx/qla_os.c
>+++ b/drivers/scsi/qla2xxx/qla_os.c
>@@ -1456,15 +1456,20 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
> for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) {
> sp = req->outstanding_cmds[cnt];
> if (sp) {
>- /* Get a reference to the sp and drop the lock.
>- * The reference ensures this sp->done() call
>- * - and not the call in qla2xxx_eh_abort() -
>- * ends the SCSI command (with result 'res').
>+ /* Don't abort commands in adapter during EEH
>+ * recovery as it's not accessible/responding.
> */
>- sp_get(sp);
>- spin_unlock_irqrestore(&ha->hardware_lock, flags);
>- qla2xxx_eh_abort(GET_CMD_SP(sp));
>- spin_lock_irqsave(&ha->hardware_lock, flags);
>+ if (!ha->flags.eeh_busy) {
>+ /* Get a reference to the sp and drop the lock.
>+ * The reference ensures this sp->done() call
>+ * - and not the call in qla2xxx_eh_abort() -
>+ * ends the SCSI command (with result 'res').
>+ */
>+ sp_get(sp);
>+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
>+ qla2xxx_eh_abort(GET_CMD_SP(sp));
>+ spin_lock_irqsave(&ha->hardware_lock, flags);
>+ }
> req->outstanding_cmds[cnt] = NULL;
> sp->done(vha, sp, res);
> }
>--
>1.8.3.1
>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Thanks,
Himanshu
^ permalink raw reply
* [Buildroot] [PATCH] package/gdb: disable simulator support for microblaze
From: Romain Naour @ 2016-11-14 22:05 UTC (permalink / raw)
To: buildroot
The gdb simulator seems missing with the Xilinx fork of gdb.
Disable it for microblaze since only the Xilinx version of gdb is
currently available.
Fixes:
http://autobuild.buildroot.net/results/907/9079dad3f138c313a6abb40825baf4d9683a2422
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Waldemar Brodkorb <mail@waldemar-brodkorb.de>
---
package/gdb/Config.in.host | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index b6eb41f..da6b30e 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -27,7 +27,7 @@ config BR2_PACKAGE_HOST_GDB_PYTHON
config BR2_PACKAGE_HOST_GDB_SIM
bool "Simulator support"
- depends on !BR2_arc
+ depends on !BR2_arc && !BR2_microblaze
help
This option enables the simulator support in the cross gdb.
--
2.5.5
^ permalink raw reply related
* [U-Boot] [PATCH v2 1/4] Introduce CONFIG_SPL_ABORT_ON_NON_FIT_IMAGE
From: Andrew F. Davis @ 2016-11-14 22:05 UTC (permalink / raw)
To: u-boot
In-Reply-To: <CAPnjgZ2AboA7_3+e=Ovyg6Y9-hLLPt4c2gkrFnpMO2k-ezNGOg@mail.gmail.com>
On 11/14/2016 02:44 PM, Simon Glass wrote:
> Hi Andrew,
>
> On 14 November 2016 at 12:14, Andrew F. Davis <afd@ti.com> wrote:
>> Introduce CONFIG_SPL_ABORT_ON_NON_FIT_IMAGE. An SPL which define
>> this will abort image loading if the image is not a FIT image.
>>
>> Signed-off-by: Andrew F. Davis <afd@ti.com>
>> ---
>> Kconfig | 9 +++++++++
>> common/spl/spl.c | 5 +++++
>> 2 files changed, 14 insertions(+)
>>
>> diff --git a/Kconfig b/Kconfig
>> index 1263d0b..eefebef 100644
>> --- a/Kconfig
>> +++ b/Kconfig
>> @@ -291,6 +291,15 @@ config FIT_IMAGE_POST_PROCESS
>> injected into the FIT creation (i.e. the blobs would have been pre-
>> processed before being added to the FIT image).
>>
>> +config SPL_ABORT_ON_NON_FIT_IMAGE
>
> We already have CONFIG_IMAGE_FORMAT_LEGACY so how about
> CONFIG_SPL_IMAGE_FORMAT_LEGACY instead? It can default to y if secure
> boot is disabled.
>
We also already have CONFIG_SPL_ABORT_ON_RAW_IMAGE on which this is
based. If we only disable legacy image support then RAW images should
still be allowed, but we will fail early anyway, we will start to need
an unmaintainable amount of pre-processor logic to to handle the
different image types and what is allowed/not allowed.
Even worse some boot modes don't seem to support FIT images (net,
onenand) so these will alway expect legacy to work. Right now we simply
have to disable these modes.
>> + bool "Disable SPL loading of non-FIT images"
>> + default y if SPL_FIT_SIGNATURE
>> + help
>> + SPL will not load and image if it is not a FIT image. This is
>> + useful for devices that only support authentication/encryption
>> + through SPL FIT loading paths and do not want SPL falling back
>> + to legacy image loading when a non-FIT image is present.
>> +
>> config SPL_DFU_SUPPORT
>> bool "Enable SPL with DFU to load binaries to memory device"
>> depends on USB
>> diff --git a/common/spl/spl.c b/common/spl/spl.c
>> index bdb165a..3d8bee9 100644
>> --- a/common/spl/spl.c
>> +++ b/common/spl/spl.c
>> @@ -93,6 +93,10 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
>> int spl_parse_image_header(struct spl_image_info *spl_image,
>> const struct image_header *header)
>> {
>> +#ifdef CONFIG_SPL_ABORT_ON_NON_FIT_IMAGE
>> + /* non-FIT image found, proceed to other boot methods. */
>> + return -EINVAL;
>
> How about -EPROTONOSUPPORT since the request is not really invalid.
>
>> +#else
>> u32 header_size = sizeof(struct image_header);
>>
>> if (image_get_magic(header) == IH_MAGIC) {
>> @@ -156,6 +160,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
>> spl_set_header_raw_uboot(spl_image);
>> #endif
>> }
>> +#endif
>> return 0;
>> }
>>
>> --
>> 2.10.1
>>
>
> Regards,
> Simon
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.