* [v3,09/23] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
Wait until an SRQ (service request) is received on the interrupt pipe
or until the given period of time is expired. In contrast to the
poll() function this ioctl does not return when other (a)synchronous
I/O operations fail with EPOLLERR.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 57 ++++++++++++++++++++++++++++++++++++
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 58 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 3babca045c02..edce0a753623 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -130,6 +130,7 @@ struct usbtmc_file_data {
u32 timeout;
u8 srq_byte;
atomic_t srq_asserted;
+ atomic_t closing;
u8 eom_val;
u8 term_char;
@@ -208,6 +209,8 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
mutex_lock(&data->io_mutex);
file_data->data = data;
+ atomic_set(&file_data->closing, 0);
+
/* copy default values from device settings */
file_data->timeout = USBTMC_TIMEOUT;
file_data->term_char = data->TermChar;
@@ -238,6 +241,7 @@ static int usbtmc_flush(struct file *file, fl_owner_t id)
if (file_data == NULL)
return -ENODEV;
+ atomic_set(&file_data->closing, 1);
data = file_data->data;
/* wait for io to stop */
@@ -591,6 +595,54 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
return rv;
}
+static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
+ __u32 __user *arg)
+{
+ struct usbtmc_device_data *data = file_data->data;
+ struct device *dev = &data->intf->dev;
+ int rv;
+ u32 timeout;
+ unsigned long expire;
+
+ if (!data->iin_ep_present) {
+ dev_dbg(dev, "no interrupt endpoint present\n");
+ return -EFAULT;
+ }
+
+ if (get_user(timeout, arg))
+ return -EFAULT;
+
+ expire = msecs_to_jiffies(timeout);
+
+ mutex_unlock(&data->io_mutex);
+
+ rv = wait_event_interruptible_timeout(
+ data->waitq,
+ atomic_read(&file_data->srq_asserted) != 0 ||
+ atomic_read(&file_data->closing),
+ expire);
+
+ mutex_lock(&data->io_mutex);
+
+ /* Note! disconnect or close could be called in the meantime */
+ if (atomic_read(&file_data->closing) || data->zombie)
+ rv = -ENODEV;
+
+ if (rv < 0) {
+ /* dev can be invalid now! */
+ pr_debug("%s - wait interrupted %d\n", __func__, rv);
+ return rv;
+ }
+
+ if (rv == 0) {
+ dev_dbg(dev, "%s - wait timed out\n", __func__);
+ return -ETIMEDOUT;
+ }
+
+ dev_dbg(dev, "%s - srq asserted\n", __func__);
+ return 0;
+}
+
static int usbtmc488_ioctl_simple(struct usbtmc_device_data *data,
void __user *arg, unsigned int cmd)
{
@@ -2157,6 +2209,11 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
retval = usbtmc488_ioctl_trigger(file_data);
break;
+ case USBTMC488_IOCTL_WAIT_SRQ:
+ retval = usbtmc488_ioctl_wait_srq(file_data,
+ (__u32 __user *)arg);
+ break;
+
case USBTMC_IOCTL_CANCEL_IO:
retval = usbtmc_ioctl_cancel_io(file_data);
break;
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index d638c198c7a8..56c76a9680e5 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -96,6 +96,7 @@ struct usbtmc_message {
#define USBTMC488_IOCTL_GOTO_LOCAL _IO(USBTMC_IOC_NR, 20)
#define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21)
#define USBTMC488_IOCTL_TRIGGER _IO(USBTMC_IOC_NR, 22)
+#define USBTMC488_IOCTL_WAIT_SRQ _IOW(USBTMC_IOC_NR, 23, __u32)
/* Cancel and cleanup asynchronous calls */
#define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35)
^ permalink raw reply related
* [v3,08/23] usb: usbtmc: Fix suspend/resume
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
Submitted urbs are not allowed when system is suspended.
Thus the submitted urb waiting at interrupt pipe is killed
during suspend callback and submitted again when system resumes.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index fe140d400e1d..3babca045c02 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -2321,7 +2321,9 @@ static void usbtmc_free_int(struct usbtmc_device_data *data)
return;
usb_kill_urb(data->iin_urb);
kfree(data->iin_buffer);
+ data->iin_buffer = NULL;
usb_free_urb(data->iin_urb);
+ data->iin_urb = NULL;
kref_put(&data->kref, usbtmc_delete);
}
@@ -2503,13 +2505,25 @@ static int usbtmc_suspend(struct usb_interface *intf, pm_message_t message)
file_elem);
usbtmc_draw_down(file_data);
}
+
+ if (data->iin_ep_present && data->iin_urb)
+ usb_kill_urb(data->iin_urb);
+
mutex_unlock(&data->io_mutex);
return 0;
}
static int usbtmc_resume(struct usb_interface *intf)
{
- return 0;
+ struct usbtmc_device_data *data = usb_get_intfdata(intf);
+ int retcode = 0;
+
+ if (data->iin_ep_present && data->iin_urb)
+ retcode = usb_submit_urb(data->iin_urb, GFP_KERNEL);
+ if (retcode)
+ dev_err(&intf->dev, "Failed to submit iin_urb\n");
+
+ return retcode;
}
static int usbtmc_pre_reset(struct usb_interface *intf)
^ permalink raw reply related
* [v3,07/23] usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
The ioctl USBTMC_IOCTL_CLEANUP_IO kills all submitted urbs to OUT
and IN bulk, and clears all received data from IN bulk. Internal
transfer counters and error states are reset.
An application should use this ioctl after an asnychronous transfer
was canceled and/or error handling has finished.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 19 +++++++++++++++++++
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 67cdf5df90d7..fe140d400e1d 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1721,6 +1721,21 @@ static int usbtmc_ioctl_cancel_io(struct usbtmc_file_data *file_data)
return 0;
}
+static int usbtmc_ioctl_cleanup_io(struct usbtmc_file_data *file_data)
+{
+ usb_kill_anchored_urbs(&file_data->submitted);
+ usb_scuttle_anchored_urbs(&file_data->in_anchor);
+ spin_lock_irq(&file_data->err_lock);
+ file_data->in_status = 0;
+ file_data->in_transfer_size = 0;
+ file_data->out_status = 0;
+ file_data->out_transfer_size = 0;
+ spin_unlock_irq(&file_data->err_lock);
+
+ file_data->in_urbs_used = 0;
+ return 0;
+}
+
static int get_capabilities(struct usbtmc_device_data *data)
{
struct device *dev = &data->usb_dev->dev;
@@ -2145,6 +2160,10 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case USBTMC_IOCTL_CANCEL_IO:
retval = usbtmc_ioctl_cancel_io(file_data);
break;
+
+ case USBTMC_IOCTL_CLEANUP_IO:
+ retval = usbtmc_ioctl_cleanup_io(file_data);
+ break;
}
skip_io_on_zombie:
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index 934991624a28..d638c198c7a8 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -99,6 +99,7 @@ struct usbtmc_message {
/* Cancel and cleanup asynchronous calls */
#define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35)
+#define USBTMC_IOCTL_CLEANUP_IO _IO(USBTMC_IOC_NR, 36)
/* Driver encoded usb488 capabilities */
#define USBTMC488_CAPABILITY_TRIGGER 1
^ permalink raw reply related
* [v3,06/23] usb: usbtmc: Add ioctl USBTMC_IOCTL_CANCEL_IO
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
ioctl USBTMC_IOCTL_CANCEL_IO stops and kills all flying urbs of
last USBTMC_IOCTL_READ and USBTMC_IOCTL_WRITE function calls.
A subsequent call to USBTMC_IOCTL_READ or
USBTMC_IOCTL_WRITE_RESULT returns -ECANCELED with
information about current transferred data.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 4 ++++
include/uapi/linux/usb/tmc.h | 3 +++
2 files changed, 7 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 32b588eb0304..67cdf5df90d7 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -2141,6 +2141,10 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case USBTMC488_IOCTL_TRIGGER:
retval = usbtmc488_ioctl_trigger(file_data);
break;
+
+ case USBTMC_IOCTL_CANCEL_IO:
+ retval = usbtmc_ioctl_cancel_io(file_data);
+ break;
}
skip_io_on_zombie:
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index c75354dfd592..934991624a28 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -97,6 +97,9 @@ struct usbtmc_message {
#define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21)
#define USBTMC488_IOCTL_TRIGGER _IO(USBTMC_IOC_NR, 22)
+/* Cancel and cleanup asynchronous calls */
+#define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35)
+
/* Driver encoded usb488 capabilities */
#define USBTMC488_CAPABILITY_TRIGGER 1
#define USBTMC488_CAPABILITY_SIMPLE 2
^ permalink raw reply related
* [v3,05/23] usb: usbtmc: Add ioctl for vendor specific read
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
The USBTMC_IOCTL_READ call provides for generic synchronous and
asynchronous reads on bulk IN to implement vendor specific library
routines.
Depending on transfer_size the function submits one or more urbs (up
to 16) each with a size of up to 4kB.
The flag USBTMC_FLAG_IGNORE_TRAILER can be used when the transmission
size is already known. Then the function does not truncate the
transfer_size to a multiple of 4 kB, but does reserve extra space
to receive the final short or zero length packet. Note that the
instrument is allowed to send up to wMaxPacketSize - 1 bytes at the
end of a message to avoid sending a zero length packet.
With flag USBTMC_FLAG_ASYNC the ioctl is non blocking. When no
received data is available, the read function submits as many urbs as
needed to receive transfer_size bytes. However the number of flying
urbs (=4kB) is limited to 16 even with subsequent calls of this ioctl.
Returns -EAGAIN when non blocking and no data is received.
Signals EPOLLIN | EPOLLRDNORM when asynchronous urbs are ready to
be read.
In non blocking mode the usbtmc_message.message pointer may be NULL
and the ioctl just submits urbs to initiate receiving data. However if
data is already available due to a previous non blocking call the ioctl
will return -EINVAL when the message pointer is NULL.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 336 ++++++++++++++++++++++++++++++++++-
include/uapi/linux/usb/tmc.h | 2 +
2 files changed, 337 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index ea4e6f033c26..32b588eb0304 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -85,6 +85,9 @@ struct usbtmc_device_data {
u8 bTag_last_write; /* needed for abort */
u8 bTag_last_read; /* needed for abort */
+ /* packet size of IN bulk */
+ u16 wMaxPacketSize;
+
/* data for interrupt in endpoint handling */
u8 bNotify1;
u8 bNotify2;
@@ -140,6 +143,13 @@ struct usbtmc_file_data {
struct semaphore limit_write_sem;
u32 out_transfer_size;
int out_status;
+
+ /* data for generic_read */
+ u32 in_transfer_size;
+ int in_status;
+ int in_urbs_used;
+ struct usb_anchor in_anchor;
+ wait_queue_head_t wait_bulk_in;
};
/* Forward declarations */
@@ -188,6 +198,8 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
spin_lock_init(&file_data->err_lock);
sema_init(&file_data->limit_write_sem, MAX_URBS_IN_FLIGHT);
init_usb_anchor(&file_data->submitted);
+ init_usb_anchor(&file_data->in_anchor);
+ init_waitqueue_head(&file_data->wait_bulk_in);
data = usb_get_intfdata(intf);
/* Protect reference to data from file structure until release */
@@ -234,6 +246,9 @@ static int usbtmc_flush(struct file *file, fl_owner_t id)
usbtmc_draw_down(file_data);
spin_lock_irq(&file_data->err_lock);
+ file_data->in_status = 0;
+ file_data->in_transfer_size = 0;
+ file_data->in_urbs_used = 0;
file_data->out_status = 0;
file_data->out_transfer_size = 0;
spin_unlock_irq(&file_data->err_lock);
@@ -697,6 +712,307 @@ static struct urb *usbtmc_create_urb(void)
return urb;
}
+static void usbtmc_read_bulk_cb(struct urb *urb)
+{
+ struct usbtmc_file_data *file_data = urb->context;
+ int status = urb->status;
+ unsigned long flags;
+
+ /* sync/async unlink faults aren't errors */
+ if (status) {
+ if (!(/* status == -ENOENT || */
+ status == -ECONNRESET ||
+ status == -EREMOTEIO || /* Short packet */
+ status == -ESHUTDOWN))
+ dev_err(&file_data->data->intf->dev,
+ "%s - nonzero read bulk status received: %d\n",
+ __func__, status);
+
+ spin_lock_irqsave(&file_data->err_lock, flags);
+ if (!file_data->in_status)
+ file_data->in_status = status;
+ spin_unlock_irqrestore(&file_data->err_lock, flags);
+ }
+
+ spin_lock_irqsave(&file_data->err_lock, flags);
+ file_data->in_transfer_size += urb->actual_length;
+ dev_dbg(&file_data->data->intf->dev,
+ "%s - total size: %u current: %d status: %d\n",
+ __func__, file_data->in_transfer_size,
+ urb->actual_length, status);
+ spin_unlock_irqrestore(&file_data->err_lock, flags);
+ usb_anchor_urb(urb, &file_data->in_anchor);
+
+ wake_up_interruptible(&file_data->wait_bulk_in);
+ wake_up_interruptible(&file_data->data->waitq);
+}
+
+static inline bool usbtmc_do_transfer(struct usbtmc_file_data *file_data)
+{
+ bool data_or_error;
+
+ spin_lock_irq(&file_data->err_lock);
+ data_or_error = !usb_anchor_empty(&file_data->in_anchor)
+ || file_data->in_status;
+ spin_unlock_irq(&file_data->err_lock);
+ dev_dbg(&file_data->data->intf->dev, "%s: returns %d\n", __func__,
+ data_or_error);
+ return data_or_error;
+}
+
+static ssize_t usbtmc_generic_read(struct usbtmc_file_data *file_data,
+ void __user *user_buffer,
+ u32 transfer_size,
+ u32 *transferred,
+ u32 flags)
+{
+ struct usbtmc_device_data *data = file_data->data;
+ struct device *dev = &data->intf->dev;
+ u32 done = 0;
+ u32 remaining;
+ const u32 bufsize = USBTMC_BUFSIZE;
+ int retval = 0;
+ u32 max_transfer_size;
+ unsigned long expire;
+ int bufcount = 1;
+ int again = 0;
+
+ /* mutex already locked */
+
+ *transferred = done;
+
+ max_transfer_size = transfer_size;
+
+ if (flags & USBTMC_FLAG_IGNORE_TRAILER) {
+ /* The device may send extra alignment bytes (up to
+ * wMaxPacketSize – 1) to avoid sending a zero-length
+ * packet
+ */
+ remaining = transfer_size;
+ if ((max_transfer_size % data->wMaxPacketSize) == 0)
+ max_transfer_size += (data->wMaxPacketSize - 1);
+ } else {
+ /* round down to bufsize to avoid truncated data left */
+ if (max_transfer_size > bufsize) {
+ max_transfer_size =
+ roundup(max_transfer_size + 1 - bufsize,
+ bufsize);
+ }
+ remaining = max_transfer_size;
+ }
+
+ spin_lock_irq(&file_data->err_lock);
+
+ if (file_data->in_status) {
+ /* return the very first error */
+ retval = file_data->in_status;
+ spin_unlock_irq(&file_data->err_lock);
+ goto error;
+ }
+
+ if (flags & USBTMC_FLAG_ASYNC) {
+ if (usb_anchor_empty(&file_data->in_anchor))
+ again = 1;
+
+ if (file_data->in_urbs_used == 0) {
+ file_data->in_transfer_size = 0;
+ file_data->in_status = 0;
+ }
+ } else {
+ file_data->in_transfer_size = 0;
+ file_data->in_status = 0;
+ }
+
+ if (max_transfer_size == 0) {
+ bufcount = 0;
+ } else {
+ bufcount = roundup(max_transfer_size, bufsize) / bufsize;
+ if (bufcount > file_data->in_urbs_used)
+ bufcount -= file_data->in_urbs_used;
+ else
+ bufcount = 0;
+
+ if (bufcount + file_data->in_urbs_used > MAX_URBS_IN_FLIGHT) {
+ bufcount = MAX_URBS_IN_FLIGHT -
+ file_data->in_urbs_used;
+ }
+ }
+ spin_unlock_irq(&file_data->err_lock);
+
+ dev_dbg(dev, "%s: requested=%u flags=0x%X size=%u bufs=%d used=%d\n",
+ __func__, transfer_size, flags,
+ max_transfer_size, bufcount, file_data->in_urbs_used);
+
+ while (bufcount > 0) {
+ u8 *dmabuf = NULL;
+ struct urb *urb = usbtmc_create_urb();
+
+ if (!urb) {
+ retval = -ENOMEM;
+ goto error;
+ }
+
+ dmabuf = urb->transfer_buffer;
+
+ usb_fill_bulk_urb(urb, data->usb_dev,
+ usb_rcvbulkpipe(data->usb_dev, data->bulk_in),
+ dmabuf, bufsize,
+ usbtmc_read_bulk_cb, file_data);
+
+ usb_anchor_urb(urb, &file_data->submitted);
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ /* urb is anchored. We can release our reference. */
+ usb_free_urb(urb);
+ if (unlikely(retval)) {
+ usb_unanchor_urb(urb);
+ goto error;
+ }
+ file_data->in_urbs_used++;
+ bufcount--;
+ }
+
+ if (again) {
+ dev_dbg(dev, "%s: ret=again\n", __func__);
+ return -EAGAIN;
+ }
+
+ if (user_buffer == NULL)
+ return -EINVAL;
+
+ expire = msecs_to_jiffies(file_data->timeout);
+
+ while (max_transfer_size > 0) {
+ u32 this_part;
+ struct urb *urb = NULL;
+
+ if (!(flags & USBTMC_FLAG_ASYNC)) {
+ dev_dbg(dev, "%s: before wait time %lu\n",
+ __func__, expire);
+ retval = wait_event_interruptible_timeout(
+ file_data->wait_bulk_in,
+ usbtmc_do_transfer(file_data),
+ expire);
+
+ dev_dbg(dev, "%s: wait returned %d\n",
+ __func__, retval);
+
+ if (retval <= 0) {
+ if (retval == 0)
+ retval = -ETIMEDOUT;
+ goto error;
+ }
+ }
+
+ urb = usb_get_from_anchor(&file_data->in_anchor);
+ if (!urb) {
+ if (!(flags & USBTMC_FLAG_ASYNC)) {
+ /* synchronous case: must not happen */
+ retval = -EFAULT;
+ goto error;
+ }
+
+ /* asynchronous case: ready, do not block or wait */
+ *transferred = done;
+ dev_dbg(dev, "%s: (async) done=%u ret=0\n",
+ __func__, done);
+ return 0;
+ }
+
+ file_data->in_urbs_used--;
+
+ if (max_transfer_size > urb->actual_length)
+ max_transfer_size -= urb->actual_length;
+ else
+ max_transfer_size = 0;
+
+ if (remaining > urb->actual_length)
+ this_part = urb->actual_length;
+ else
+ this_part = remaining;
+
+ print_hex_dump_debug("usbtmc ", DUMP_PREFIX_NONE, 16, 1,
+ urb->transfer_buffer, urb->actual_length, true);
+
+ if (copy_to_user(user_buffer + done,
+ urb->transfer_buffer, this_part)) {
+ usb_free_urb(urb);
+ retval = -EFAULT;
+ goto error;
+ }
+
+ remaining -= this_part;
+ done += this_part;
+
+ spin_lock_irq(&file_data->err_lock);
+ if (urb->status) {
+ /* return the very first error */
+ retval = file_data->in_status;
+ spin_unlock_irq(&file_data->err_lock);
+ usb_free_urb(urb);
+ goto error;
+ }
+ spin_unlock_irq(&file_data->err_lock);
+
+ if (urb->actual_length < bufsize) {
+ /* short packet or ZLP received => ready */
+ usb_free_urb(urb);
+ retval = 1;
+ break;
+ }
+
+ if (!(flags & USBTMC_FLAG_ASYNC) &&
+ max_transfer_size > (bufsize * file_data->in_urbs_used)) {
+ /* resubmit, since other buffers still not enough */
+ usb_anchor_urb(urb, &file_data->submitted);
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ if (unlikely(retval)) {
+ usb_unanchor_urb(urb);
+ usb_free_urb(urb);
+ goto error;
+ }
+ file_data->in_urbs_used++;
+ }
+ usb_free_urb(urb);
+ retval = 0;
+ }
+
+error:
+ *transferred = done;
+
+ dev_dbg(dev, "%s: before kill\n", __func__);
+ /* Attention: killing urbs can take long time (2 ms) */
+ usb_kill_anchored_urbs(&file_data->submitted);
+ dev_dbg(dev, "%s: after kill\n", __func__);
+ usb_scuttle_anchored_urbs(&file_data->in_anchor);
+ file_data->in_urbs_used = 0;
+ file_data->in_status = 0; /* no spinlock needed here */
+ dev_dbg(dev, "%s: done=%u ret=%d\n", __func__, done, retval);
+
+ return retval;
+}
+
+static ssize_t usbtmc_ioctl_generic_read(struct usbtmc_file_data *file_data,
+ void __user *arg)
+{
+ struct usbtmc_message msg;
+ ssize_t retval = 0;
+
+ /* mutex already locked */
+
+ if (copy_from_user(&msg, arg, sizeof(struct usbtmc_message)))
+ return -EFAULT;
+
+ retval = usbtmc_generic_read(file_data, u64_to_uptr(msg.message),
+ msg.transfer_size, &msg.transferred,
+ msg.flags);
+
+ if (put_user(msg.transferred,
+ &((struct usbtmc_message __user *)arg)->transferred))
+ return -EFAULT;
+
+ return retval;
+}
+
static void usbtmc_write_bulk_cb(struct urb *urb)
{
struct usbtmc_file_data *file_data = urb->context;
@@ -1398,6 +1714,7 @@ static int usbtmc_ioctl_clear_in_halt(struct usbtmc_device_data *data)
static int usbtmc_ioctl_cancel_io(struct usbtmc_file_data *file_data)
{
spin_lock_irq(&file_data->err_lock);
+ file_data->in_status = -ECANCELED;
file_data->out_status = -ECANCELED;
spin_unlock_irq(&file_data->err_lock);
usb_kill_anchored_urbs(&file_data->submitted);
@@ -1783,6 +2100,11 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
(void __user *)arg);
break;
+ case USBTMC_IOCTL_READ:
+ retval = usbtmc_ioctl_generic_read(file_data,
+ (void __user *)arg);
+ break;
+
case USBTMC_IOCTL_WRITE_RESULT:
retval = usbtmc_ioctl_write_result(file_data,
(void __user *)arg);
@@ -1848,15 +2170,24 @@ static __poll_t usbtmc_poll(struct file *file, poll_table *wait)
poll_wait(file, &data->waitq, wait);
+ /* Note that EPOLLPRI is now assigned to SRQ, and
+ * EPOLLIN|EPOLLRDNORM to normal read data.
+ */
mask = 0;
if (atomic_read(&file_data->srq_asserted))
mask |= EPOLLPRI;
+ /* Note that the anchor submitted includes all urbs for BULK IN
+ * and OUT. So EPOLLOUT is signaled when BULK OUT is empty and
+ * all BULK IN urbs are completed and moved to in_anchor.
+ */
if (usb_anchor_empty(&file_data->submitted))
mask |= (EPOLLOUT | EPOLLWRNORM);
+ if (!usb_anchor_empty(&file_data->in_anchor))
+ mask |= (EPOLLIN | EPOLLRDNORM);
spin_lock_irq(&file_data->err_lock);
- if (file_data->out_status)
+ if (file_data->in_status || file_data->out_status)
mask |= EPOLLERR;
spin_unlock_irq(&file_data->err_lock);
@@ -2018,6 +2349,7 @@ static int usbtmc_probe(struct usb_interface *intf,
}
data->bulk_in = bulk_in->bEndpointAddress;
+ data->wMaxPacketSize = usb_endpoint_maxp(bulk_in);
dev_dbg(&intf->dev, "Found bulk in endpoint at %u\n", data->bulk_in);
data->bulk_out = bulk_out->bEndpointAddress;
@@ -2114,6 +2446,7 @@ static void usbtmc_disconnect(struct usb_interface *intf)
struct usbtmc_file_data,
file_elem);
usb_kill_anchored_urbs(&file_data->submitted);
+ usb_scuttle_anchored_urbs(&file_data->in_anchor);
}
mutex_unlock(&data->io_mutex);
usbtmc_free_int(data);
@@ -2127,6 +2460,7 @@ static void usbtmc_draw_down(struct usbtmc_file_data *file_data)
time = usb_wait_anchor_empty_timeout(&file_data->submitted, 1000);
if (!time)
usb_kill_anchored_urbs(&file_data->submitted);
+ usb_scuttle_anchored_urbs(&file_data->in_anchor);
}
static int usbtmc_suspend(struct usb_interface *intf, pm_message_t message)
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index 4a47b11e4a7e..c75354dfd592 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -64,6 +64,7 @@ struct usbtmc_termchar {
*/
#define USBTMC_FLAG_ASYNC 0x0001
#define USBTMC_FLAG_APPEND 0x0002
+#define USBTMC_FLAG_IGNORE_TRAILER 0x0004
struct usbtmc_message {
__u32 transfer_size; /* size of bytes to transfer */
@@ -86,6 +87,7 @@ struct usbtmc_message {
#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar)
#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message)
+#define USBTMC_IOCTL_READ _IOWR(USBTMC_IOC_NR, 14, struct usbtmc_message)
#define USBTMC_IOCTL_WRITE_RESULT _IOWR(USBTMC_IOC_NR, 15, __u32)
#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
^ permalink raw reply related
* [v3,04/23] usb: usbtmc: Add ioctl USBTMC_IOCTL_WRITE_RESULT
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
ioctl USBTMC_IOCTL_WRITE_RESULT copies current out_transfer_size
to given __u32 pointer and returns current out_status of the last
(asnynchronous) USBTMC_IOCTL_WRITE call.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 25 +++++++++++++++++++++++++
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 26 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 0328f1beb32d..ea4e6f033c26 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -908,6 +908,26 @@ static ssize_t usbtmc_ioctl_generic_write(struct usbtmc_file_data *file_data,
return retval;
}
+/*
+ * Get the generic write result
+ */
+static ssize_t usbtmc_ioctl_write_result(struct usbtmc_file_data *file_data,
+ void __user *arg)
+{
+ u32 transferred;
+ int retval;
+
+ spin_lock_irq(&file_data->err_lock);
+ transferred = file_data->out_transfer_size;
+ retval = file_data->out_status;
+ spin_unlock_irq(&file_data->err_lock);
+
+ if (put_user(transferred, (__u32 __user *)arg))
+ return -EFAULT;
+
+ return retval;
+}
+
/*
* Sends a REQUEST_DEV_DEP_MSG_IN message on the Bulk-OUT endpoint.
* @transfer_size: number of bytes to request from the device.
@@ -1763,6 +1783,11 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
(void __user *)arg);
break;
+ case USBTMC_IOCTL_WRITE_RESULT:
+ retval = usbtmc_ioctl_write_result(file_data,
+ (void __user *)arg);
+ break;
+
case USBTMC488_IOCTL_GET_CAPS:
retval = copy_to_user((void __user *)arg,
&data->usb488_caps,
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index 56faeb3b5f0f..4a47b11e4a7e 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -86,6 +86,7 @@ struct usbtmc_message {
#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar)
#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message)
+#define USBTMC_IOCTL_WRITE_RESULT _IOWR(USBTMC_IOC_NR, 15, __u32)
#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)
^ permalink raw reply related
* [v3,03/23] usb: usbtmc: Add ioctl for vendor specific write
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
The new ioctl USBTMC_IOCTL_WRITE sends a generic message to bulk OUT.
This ioctl is used for vendor specific or asynchronous I/O as well.
The message is split into chunks of 4k (page size).
Message size is aligned to 32 bit boundaries.
With flag USBTMC_FLAG_ASYNC the ioctl is non blocking.
With flag USBTMC_FLAG_APPEND additional urbs are queued and
out_status/out_transfer_size is not reset. EPOLLOUT | EPOLLWRNORM
is signaled when all submitted urbs are completed.
Flush flying urbs when file handle is closed or device is
suspended or reset.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 376 ++++++++++++++++++++++++++++++++++-
include/uapi/linux/usb/tmc.h | 14 ++
2 files changed, 388 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 3b3b4284d04e..0328f1beb32d 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -37,6 +37,8 @@
/* Default USB timeout (in milliseconds) */
#define USBTMC_TIMEOUT 5000
+/* Max number of urbs used in write transfers */
+#define MAX_URBS_IN_FLIGHT 16
/* I/O buffer size used in generic read/write functions */
#define USBTMC_BUFSIZE (4096)
@@ -125,13 +127,24 @@ struct usbtmc_file_data {
u32 timeout;
u8 srq_byte;
atomic_t srq_asserted;
+
u8 eom_val;
u8 term_char;
bool term_char_enabled;
+
+ spinlock_t err_lock; /* lock for errors */
+
+ struct usb_anchor submitted;
+
+ /* data for generic_write */
+ struct semaphore limit_write_sem;
+ u32 out_transfer_size;
+ int out_status;
};
/* Forward declarations */
static struct usb_driver usbtmc_driver;
+static void usbtmc_draw_down(struct usbtmc_file_data *file_data);
#ifdef CONFIG_COMPAT
static void __user *u64_to_uptr(u64 value)
@@ -172,6 +185,10 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
if (!file_data)
return -ENOMEM;
+ spin_lock_init(&file_data->err_lock);
+ sema_init(&file_data->limit_write_sem, MAX_URBS_IN_FLIGHT);
+ init_usb_anchor(&file_data->submitted);
+
data = usb_get_intfdata(intf);
/* Protect reference to data from file structure until release */
kref_get(&data->kref);
@@ -197,6 +214,36 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
return 0;
}
+/*
+ * usbtmc_flush - called before file handle is closed
+ */
+static int usbtmc_flush(struct file *file, fl_owner_t id)
+{
+ struct usbtmc_file_data *file_data;
+ struct usbtmc_device_data *data;
+
+ file_data = file->private_data;
+ if (file_data == NULL)
+ return -ENODEV;
+
+ data = file_data->data;
+
+ /* wait for io to stop */
+ mutex_lock(&data->io_mutex);
+
+ usbtmc_draw_down(file_data);
+
+ spin_lock_irq(&file_data->err_lock);
+ file_data->out_status = 0;
+ file_data->out_transfer_size = 0;
+ spin_unlock_irq(&file_data->err_lock);
+
+ wake_up_interruptible_all(&data->waitq);
+ mutex_unlock(&data->io_mutex);
+
+ return 0;
+}
+
static int usbtmc_release(struct inode *inode, struct file *file)
{
struct usbtmc_file_data *file_data = file->private_data;
@@ -629,6 +676,238 @@ static int usbtmc488_ioctl_trigger(struct usbtmc_file_data *file_data)
return 0;
}
+static struct urb *usbtmc_create_urb(void)
+{
+ const size_t bufsize = USBTMC_BUFSIZE;
+ u8 *dmabuf = NULL;
+ struct urb *urb = usb_alloc_urb(0, GFP_KERNEL);
+
+ if (!urb)
+ return NULL;
+
+ dmabuf = kmalloc(bufsize, GFP_KERNEL);
+ if (!dmabuf) {
+ usb_free_urb(urb);
+ return NULL;
+ }
+
+ urb->transfer_buffer = dmabuf;
+ urb->transfer_buffer_length = bufsize;
+ urb->transfer_flags |= URB_FREE_BUFFER;
+ return urb;
+}
+
+static void usbtmc_write_bulk_cb(struct urb *urb)
+{
+ struct usbtmc_file_data *file_data = urb->context;
+ int wakeup = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&file_data->err_lock, flags);
+ file_data->out_transfer_size += urb->actual_length;
+
+ /* sync/async unlink faults aren't errors */
+ if (urb->status) {
+ if (!(urb->status == -ENOENT ||
+ urb->status == -ECONNRESET ||
+ urb->status == -ESHUTDOWN))
+ dev_err(&file_data->data->intf->dev,
+ "%s - nonzero write bulk status received: %d\n",
+ __func__, urb->status);
+
+ if (!file_data->out_status) {
+ file_data->out_status = urb->status;
+ wakeup = 1;
+ }
+ }
+ spin_unlock_irqrestore(&file_data->err_lock, flags);
+
+ dev_dbg(&file_data->data->intf->dev,
+ "%s - write bulk total size: %u\n",
+ __func__, file_data->out_transfer_size);
+
+ up(&file_data->limit_write_sem);
+ if (usb_anchor_empty(&file_data->submitted) || wakeup)
+ wake_up_interruptible(&file_data->data->waitq);
+}
+
+static ssize_t usbtmc_generic_write(struct usbtmc_file_data *file_data,
+ const void __user *user_buffer,
+ u32 transfer_size,
+ u32 *transferred,
+ u32 flags)
+{
+ struct usbtmc_device_data *data = file_data->data;
+ struct device *dev;
+ u32 done = 0;
+ u32 remaining;
+ unsigned long expire;
+ const u32 bufsize = USBTMC_BUFSIZE;
+ struct urb *urb = NULL;
+ int retval = 0;
+ u32 timeout;
+
+ *transferred = 0;
+
+ /* Get pointer to private data structure */
+ dev = &data->intf->dev;
+
+ dev_dbg(dev, "%s: size=%u flags=0x%X sema=%u\n",
+ __func__, transfer_size, flags,
+ file_data->limit_write_sem.count);
+
+ if (flags & USBTMC_FLAG_APPEND) {
+ spin_lock_irq(&file_data->err_lock);
+ retval = file_data->out_status;
+ spin_unlock_irq(&file_data->err_lock);
+ if (retval < 0)
+ return retval;
+ } else {
+ spin_lock_irq(&file_data->err_lock);
+ file_data->out_transfer_size = 0;
+ file_data->out_status = 0;
+ spin_unlock_irq(&file_data->err_lock);
+ }
+
+ remaining = transfer_size;
+ if (remaining > INT_MAX)
+ remaining = INT_MAX;
+
+ timeout = file_data->timeout;
+ expire = msecs_to_jiffies(timeout);
+
+ while (remaining > 0) {
+ u32 this_part, aligned;
+ u8 *buffer = NULL;
+
+ if (flags & USBTMC_FLAG_ASYNC) {
+ if (down_trylock(&file_data->limit_write_sem)) {
+ retval = (done)?(0):(-EAGAIN);
+ goto exit;
+ }
+ } else {
+ retval = down_timeout(&file_data->limit_write_sem,
+ expire);
+ if (retval < 0) {
+ retval = -ETIMEDOUT;
+ goto error;
+ }
+ }
+
+ spin_lock_irq(&file_data->err_lock);
+ retval = file_data->out_status;
+ spin_unlock_irq(&file_data->err_lock);
+ if (retval < 0) {
+ up(&file_data->limit_write_sem);
+ goto error;
+ }
+
+ /* prepare next urb to send */
+ urb = usbtmc_create_urb();
+ if (!urb) {
+ retval = -ENOMEM;
+ up(&file_data->limit_write_sem);
+ goto error;
+ }
+ buffer = urb->transfer_buffer;
+
+ if (remaining > bufsize)
+ this_part = bufsize;
+ else
+ this_part = remaining;
+
+ if (copy_from_user(buffer, user_buffer + done, this_part)) {
+ retval = -EFAULT;
+ up(&file_data->limit_write_sem);
+ goto error;
+ }
+
+ print_hex_dump_debug("usbtmc ", DUMP_PREFIX_NONE,
+ 16, 1, buffer, this_part, true);
+
+ /* fill bulk with 32 bit alignment to meet USBTMC specification
+ * (size + 3 & ~3) rounds up and simplifies user code
+ */
+ aligned = (this_part + 3) & ~3;
+ dev_dbg(dev, "write(size:%u align:%u done:%u)\n",
+ (unsigned int)this_part,
+ (unsigned int)aligned,
+ (unsigned int)done);
+
+ usb_fill_bulk_urb(urb, data->usb_dev,
+ usb_sndbulkpipe(data->usb_dev, data->bulk_out),
+ urb->transfer_buffer, aligned,
+ usbtmc_write_bulk_cb, file_data);
+
+ usb_anchor_urb(urb, &file_data->submitted);
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ if (unlikely(retval)) {
+ usb_unanchor_urb(urb);
+ up(&file_data->limit_write_sem);
+ goto error;
+ }
+
+ usb_free_urb(urb);
+ urb = NULL; /* urb will be finally released by usb driver */
+
+ remaining -= this_part;
+ done += this_part;
+ }
+
+ /* All urbs are on the fly */
+ if (!(flags & USBTMC_FLAG_ASYNC)) {
+ if (!usb_wait_anchor_empty_timeout(&file_data->submitted,
+ timeout)) {
+ retval = -ETIMEDOUT;
+ goto error;
+ }
+ }
+
+ retval = 0;
+ goto exit;
+
+error:
+ usb_kill_anchored_urbs(&file_data->submitted);
+exit:
+ usb_free_urb(urb);
+
+ spin_lock_irq(&file_data->err_lock);
+ if (!(flags & USBTMC_FLAG_ASYNC))
+ done = file_data->out_transfer_size;
+ if (!retval && file_data->out_status)
+ retval = file_data->out_status;
+ spin_unlock_irq(&file_data->err_lock);
+
+ *transferred = done;
+
+ dev_dbg(dev, "%s: done=%u, retval=%d, urbstat=%d\n",
+ __func__, done, retval, file_data->out_status);
+
+ return retval;
+}
+
+static ssize_t usbtmc_ioctl_generic_write(struct usbtmc_file_data *file_data,
+ void __user *arg)
+{
+ struct usbtmc_message msg;
+ ssize_t retval = 0;
+
+ /* mutex already locked */
+
+ if (copy_from_user(&msg, arg, sizeof(struct usbtmc_message)))
+ return -EFAULT;
+
+ retval = usbtmc_generic_write(file_data, u64_to_uptr(msg.message),
+ msg.transfer_size, &msg.transferred,
+ msg.flags);
+
+ if (put_user(msg.transferred,
+ &((struct usbtmc_message __user *)arg)->transferred))
+ return -EFAULT;
+
+ return retval;
+}
+
/*
* Sends a REQUEST_DEV_DEP_MSG_IN message on the Bulk-OUT endpoint.
* @transfer_size: number of bytes to request from the device.
@@ -1096,6 +1375,15 @@ static int usbtmc_ioctl_clear_in_halt(struct usbtmc_device_data *data)
return 0;
}
+static int usbtmc_ioctl_cancel_io(struct usbtmc_file_data *file_data)
+{
+ spin_lock_irq(&file_data->err_lock);
+ file_data->out_status = -ECANCELED;
+ spin_unlock_irq(&file_data->err_lock);
+ usb_kill_anchored_urbs(&file_data->submitted);
+ return 0;
+}
+
static int get_capabilities(struct usbtmc_device_data *data)
{
struct device *dev = &data->usb_dev->dev;
@@ -1470,6 +1758,11 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
(void __user *)arg);
break;
+ case USBTMC_IOCTL_WRITE:
+ retval = usbtmc_ioctl_generic_write(file_data,
+ (void __user *)arg);
+ break;
+
case USBTMC488_IOCTL_GET_CAPS:
retval = copy_to_user((void __user *)arg,
&data->usb488_caps,
@@ -1530,7 +1823,19 @@ static __poll_t usbtmc_poll(struct file *file, poll_table *wait)
poll_wait(file, &data->waitq, wait);
- mask = (atomic_read(&file_data->srq_asserted)) ? EPOLLPRI : 0;
+ mask = 0;
+ if (atomic_read(&file_data->srq_asserted))
+ mask |= EPOLLPRI;
+
+ if (usb_anchor_empty(&file_data->submitted))
+ mask |= (EPOLLOUT | EPOLLWRNORM);
+
+ spin_lock_irq(&file_data->err_lock);
+ if (file_data->out_status)
+ mask |= EPOLLERR;
+ spin_unlock_irq(&file_data->err_lock);
+
+ dev_dbg(&data->intf->dev, "poll mask = %x\n", mask);
no_poll:
mutex_unlock(&data->io_mutex);
@@ -1543,6 +1848,7 @@ static const struct file_operations fops = {
.write = usbtmc_write,
.open = usbtmc_open,
.release = usbtmc_release,
+ .flush = usbtmc_flush,
.unlocked_ioctl = usbtmc_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = usbtmc_ioctl,
@@ -1768,6 +2074,7 @@ static int usbtmc_probe(struct usb_interface *intf,
static void usbtmc_disconnect(struct usb_interface *intf)
{
struct usbtmc_device_data *data = usb_get_intfdata(intf);
+ struct list_head *elem;
usb_deregister_dev(intf, &usbtmc_class);
sysfs_remove_group(&intf->dev.kobj, &capability_attr_grp);
@@ -1775,14 +2082,46 @@ static void usbtmc_disconnect(struct usb_interface *intf)
mutex_lock(&data->io_mutex);
data->zombie = 1;
wake_up_interruptible_all(&data->waitq);
+ list_for_each(elem, &data->file_list) {
+ struct usbtmc_file_data *file_data;
+
+ file_data = list_entry(elem,
+ struct usbtmc_file_data,
+ file_elem);
+ usb_kill_anchored_urbs(&file_data->submitted);
+ }
mutex_unlock(&data->io_mutex);
usbtmc_free_int(data);
kref_put(&data->kref, usbtmc_delete);
}
+static void usbtmc_draw_down(struct usbtmc_file_data *file_data)
+{
+ int time;
+
+ time = usb_wait_anchor_empty_timeout(&file_data->submitted, 1000);
+ if (!time)
+ usb_kill_anchored_urbs(&file_data->submitted);
+}
+
static int usbtmc_suspend(struct usb_interface *intf, pm_message_t message)
{
- /* this driver does not have pending URBs */
+ struct usbtmc_device_data *data = usb_get_intfdata(intf);
+ struct list_head *elem;
+
+ if (!data)
+ return 0;
+
+ mutex_lock(&data->io_mutex);
+ list_for_each(elem, &data->file_list) {
+ struct usbtmc_file_data *file_data;
+
+ file_data = list_entry(elem,
+ struct usbtmc_file_data,
+ file_elem);
+ usbtmc_draw_down(file_data);
+ }
+ mutex_unlock(&data->io_mutex);
return 0;
}
@@ -1791,6 +2130,37 @@ static int usbtmc_resume(struct usb_interface *intf)
return 0;
}
+static int usbtmc_pre_reset(struct usb_interface *intf)
+{
+ struct usbtmc_device_data *data = usb_get_intfdata(intf);
+ struct list_head *elem;
+
+ if (!data)
+ return 0;
+
+ mutex_lock(&data->io_mutex);
+
+ list_for_each(elem, &data->file_list) {
+ struct usbtmc_file_data *file_data;
+
+ file_data = list_entry(elem,
+ struct usbtmc_file_data,
+ file_elem);
+ usbtmc_ioctl_cancel_io(file_data);
+ }
+
+ return 0;
+}
+
+static int usbtmc_post_reset(struct usb_interface *intf)
+{
+ struct usbtmc_device_data *data = usb_get_intfdata(intf);
+
+ mutex_unlock(&data->io_mutex);
+
+ return 0;
+}
+
static struct usb_driver usbtmc_driver = {
.name = "usbtmc",
.id_table = usbtmc_devices,
@@ -1798,6 +2168,8 @@ static struct usb_driver usbtmc_driver = {
.disconnect = usbtmc_disconnect,
.suspend = usbtmc_suspend,
.resume = usbtmc_resume,
+ .pre_reset = usbtmc_pre_reset,
+ .post_reset = usbtmc_post_reset,
};
module_usb_driver(usbtmc_driver);
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index 95533118ac34..56faeb3b5f0f 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -59,6 +59,19 @@ struct usbtmc_termchar {
__u8 term_char_enabled;
} __attribute__ ((packed));
+/*
+ * usbtmc_message->flags:
+ */
+#define USBTMC_FLAG_ASYNC 0x0001
+#define USBTMC_FLAG_APPEND 0x0002
+
+struct usbtmc_message {
+ __u32 transfer_size; /* size of bytes to transfer */
+ __u32 transferred; /* size of received/written bytes */
+ __u32 flags; /* bit 0: 0 = synchronous; 1 = asynchronous */
+ __u64 message; /* pointer to header and data in user space */
+} __attribute__ ((packed));
+
/* Request values for USBTMC driver's ioctl entry point */
#define USBTMC_IOC_NR 91
#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
@@ -72,6 +85,7 @@ struct usbtmc_termchar {
#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)
#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar)
+#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message)
#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)
^ permalink raw reply related
* [v3,02/23] usb: usbtmc: Add ioctl for generic requests on control
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
control pipe. Used by specific applications of IVI Foundation,
Inc. to implement VISA API functions: viUsbControlIn/Out.
The maximum length of control request is set to 4k.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 84 ++++++++++++++++++++++++++++++++++++
include/uapi/linux/usb/tmc.h | 15 +++++++
2 files changed, 99 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 83ffa5a14c3d..3b3b4284d04e 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -5,6 +5,7 @@
* Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
* Copyright (C) 2008 Novell, Inc.
* Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
+ * Copyright (C) 2018 IVI Foundation, Inc.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -36,6 +37,9 @@
/* Default USB timeout (in milliseconds) */
#define USBTMC_TIMEOUT 5000
+/* I/O buffer size used in generic read/write functions */
+#define USBTMC_BUFSIZE (4096)
+
/*
* Maximum number of read cycles to empty bulk in endpoint during CLEAR and
* ABORT_BULK_IN requests. Ends the loop if (for whatever reason) a short
@@ -129,6 +133,21 @@ struct usbtmc_file_data {
/* Forward declarations */
static struct usb_driver usbtmc_driver;
+#ifdef CONFIG_COMPAT
+static void __user *u64_to_uptr(u64 value)
+{
+ if (in_compat_syscall())
+ return compat_ptr(value);
+ else
+ return (void __user *)(unsigned long)value;
+}
+#else
+static inline void __user *u64_to_uptr(u64 value)
+{
+ return (void __user *)(unsigned long)value;
+}
+#endif /* CONFIG_COMPAT */
+
static void usbtmc_delete(struct kref *kref)
{
struct usbtmc_device_data *data = to_usbtmc_data(kref);
@@ -1250,6 +1269,67 @@ static int usbtmc_ioctl_indicator_pulse(struct usbtmc_device_data *data)
return rv;
}
+static int usbtmc_ioctl_request(struct usbtmc_device_data *data,
+ void __user *arg)
+{
+ struct device *dev = &data->intf->dev;
+ struct usbtmc_ctrlrequest request;
+ u8 *buffer = NULL;
+ int rv;
+ unsigned long res;
+
+ res = copy_from_user(&request, arg, sizeof(struct usbtmc_ctrlrequest));
+ if (res)
+ return -EFAULT;
+
+ buffer = kmalloc(request.req.wLength, GFP_KERNEL);
+ if (!buffer)
+ return -ENOMEM;
+
+ if (request.req.wLength > USBTMC_BUFSIZE)
+ return -EMSGSIZE;
+
+ if (request.req.wLength) {
+ buffer = kmalloc(request.req.wLength, GFP_KERNEL);
+ if (!buffer)
+ return -ENOMEM;
+
+ if ((request.req.bRequestType & USB_DIR_IN) == 0) {
+ /* Send control data to device */
+ res = copy_from_user(buffer, u64_to_uptr(request.data),
+ request.req.wLength);
+ if (res) {
+ rv = -EFAULT;
+ goto exit;
+ }
+ }
+ }
+
+ rv = usb_control_msg(data->usb_dev,
+ usb_rcvctrlpipe(data->usb_dev, 0),
+ request.req.bRequest,
+ request.req.bRequestType,
+ request.req.wValue,
+ request.req.wIndex,
+ buffer, request.req.wLength, USB_CTRL_GET_TIMEOUT);
+
+ if (rv < 0) {
+ dev_err(dev, "%s failed %d\n", __func__, rv);
+ goto exit;
+ }
+
+ if (rv && (request.req.bRequestType & USB_DIR_IN)) {
+ /* Read control data from device */
+ res = copy_to_user(u64_to_uptr(request.data), buffer, rv);
+ if (res)
+ rv = -EFAULT;
+ }
+
+ exit:
+ kfree(buffer);
+ return rv;
+}
+
/*
* Get the usb timeout value
*/
@@ -1366,6 +1446,10 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
retval = usbtmc_ioctl_abort_bulk_in(data);
break;
+ case USBTMC_IOCTL_CTRL_REQUEST:
+ retval = usbtmc_ioctl_request(data, (void __user *)arg);
+ break;
+
case USBTMC_IOCTL_GET_TIMEOUT:
retval = usbtmc_ioctl_get_timeout(file_data,
(void __user *)arg);
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index 729af2f861a4..95533118ac34 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -4,6 +4,7 @@
* Copyright (C) 2008 Novell, Inc.
* Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
* Copyright (C) 2015 Dave Penkler <dpenkler@gmail.com>
+ * Copyright (C) 2018 IVI Foundation, Inc.
*
* This file holds USB constants defined by the USB Device Class
* and USB488 Subclass Definitions for Test and Measurement devices
@@ -40,6 +41,19 @@
#define USBTMC488_REQUEST_GOTO_LOCAL 161
#define USBTMC488_REQUEST_LOCAL_LOCKOUT 162
+struct usbtmc_request {
+ __u8 bRequestType;
+ __u8 bRequest;
+ __u16 wValue;
+ __u16 wIndex;
+ __u16 wLength;
+} __attribute__ ((packed));
+
+struct usbtmc_ctrlrequest {
+ struct usbtmc_request req;
+ __u64 data; /* pointer to user space */
+} __attribute__ ((packed));
+
struct usbtmc_termchar {
__u8 term_char;
__u8 term_char_enabled;
@@ -53,6 +67,7 @@ struct usbtmc_termchar {
#define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)
#define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)
#define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7)
+#define USBTMC_IOCTL_CTRL_REQUEST _IOWR(USBTMC_IOC_NR, 8, struct usbtmc_ctrlrequest)
#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32)
#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)
#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
^ permalink raw reply related
* [v3,01/23] usb: usbtmc: Add support for 32 bit compat applications
From: Guido Kiener @ 2018-07-24 9:05 UTC (permalink / raw)
To: gregkh, linux-usb, guido.kiener, steve_bayless, dpenkler; +Cc: Guido Kiener
32 bit applications can only call ioctl functions on 64 bit systems
when the field .compat_ioctl is defined for file operations.
Tested-by: Dave Penkler <dpenkler@gmail.com>
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
---
drivers/usb/class/usbtmc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 1b7b2e402adb..83ffa5a14c3d 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -18,6 +18,7 @@
#include <linux/poll.h>
#include <linux/mutex.h>
#include <linux/usb.h>
+#include <linux/compat.h>
#include <linux/usb/tmc.h>
@@ -1459,6 +1460,9 @@ static const struct file_operations fops = {
.open = usbtmc_open,
.release = usbtmc_release,
.unlocked_ioctl = usbtmc_ioctl,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = usbtmc_ioctl,
+#endif
.fasync = usbtmc_fasync,
.poll = usbtmc_poll,
.llseek = default_llseek,
^ permalink raw reply related
* [Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument
From: bugzilla-daemon @ 2018-07-24 9:04 UTC (permalink / raw)
To: dri-devel
In-Reply-To: <bug-107324-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 1005 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=107324
--- Comment #12 from jamesstewartmiller@gmail.com ---
Is there any way to selectively swap out that portion of the driver for the
inoffensive parts of code for the imac (and perhaps other problematic models)
that I have?
Is there any point in me investing time to learn to bisect and learn the coding
specifics of plls and calculations etc?
At the moment it is either do something like that, or put up with the vesa
driver and cope with the memory loss (I use this machine for audio), or swap
out the graphics card.
In the last instance, do you know Christian, if it is possible to find a list
of affected cards?
I can exchange my radeon 4850 for a 6970M 2GB, increasing the ram, but there is
no point at all, if it doesn't work with the radeon driver, and I will have to
pick up my game, quite substantially as a programmer, if I want to edit that
myself.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Re: [PATCH 1/5] misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection
From: Kai Heng Feng @ 2018-07-24 9:03 UTC (permalink / raw)
To: Alan Stern
Cc: arnd, gregkh, ulf.hansson, bauer.chen, ricky_wu, linux-kernel,
linux-usb
In-Reply-To: <Pine.LNX.4.44L0.1807231018290.1644-100000@iolanthe.rowland.org>
> On Jul 23, 2018, at 10:19 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
>
> On Mon, 23 Jul 2018, Kai-Heng Feng wrote:
>
>> Although rtsx_usb doesn't support card removal detection, card insertion
>> will resume rtsx_usb by USB remote wakeup signaling.
>>
>> When rtsx_usb gets resumed, also resumes its child devices,
>> rtsx_usb_sdmmc and rtsx_usb_ms, to notify them there's a card in its
>> slot.
>>
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> ---
>> drivers/misc/cardreader/rtsx_usb.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/misc/cardreader/rtsx_usb.c
>> b/drivers/misc/cardreader/rtsx_usb.c
>> index b97903ff1a72..fed83453e5c5 100644
>> --- a/drivers/misc/cardreader/rtsx_usb.c
>> +++ b/drivers/misc/cardreader/rtsx_usb.c
>> @@ -723,8 +723,20 @@ static int rtsx_usb_suspend(struct usb_interface
>> *intf, pm_message_t message)
>> return 0;
>> }
>>
>> +static int rtsx_usb_resume_child(struct device *dev, void *data)
>> +{
>> + /* No need to wake up self again */
>> + if (dev == data)
>> + return 0;
>
> Is this test actually needed? device_for_each_child() won't enumerate
> the device it is called for, only that device's children.
Ok, I'll update this part.
>
>> +
>> + dev_dbg(dev, "%s called\n", __func__);
>
> Not necessary. People can use ftrace if they want this information.
Sure I'll remove it.
This is to make the change more aligned with the original code. It uses
similar function on other places too.
Kai-Heng
>
> Alan Stern
>
>> + pm_request_resume(dev);
>> + return 0;
>> +}
>> +
>> static int rtsx_usb_resume(struct usb_interface *intf)
>> {
>> + device_for_each_child(&intf->dev, &intf->dev, rtsx_usb_resume_child);
>> return 0;
>> }
>>
>> @@ -734,6 +746,7 @@ static int rtsx_usb_reset_resume(struct
>> usb_interface *intf)
>> (struct rtsx_ucr *)usb_get_intfdata(intf);
>>
>> rtsx_usb_reset_chip(ucr);
>> + device_for_each_child(&intf->dev, &intf->dev, rtsx_usb_resume_child);
>> return 0;
>> }
^ permalink raw reply
* [1/5] misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection
From: Kai-Heng Feng @ 2018-07-24 9:03 UTC (permalink / raw)
To: Alan Stern
Cc: arnd, gregkh, ulf.hansson, bauer.chen, ricky_wu, linux-kernel,
linux-usb
> On Jul 23, 2018, at 10:19 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
>
> On Mon, 23 Jul 2018, Kai-Heng Feng wrote:
>
>> Although rtsx_usb doesn't support card removal detection, card insertion
>> will resume rtsx_usb by USB remote wakeup signaling.
>>
>> When rtsx_usb gets resumed, also resumes its child devices,
>> rtsx_usb_sdmmc and rtsx_usb_ms, to notify them there's a card in its
>> slot.
>>
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> ---
>> drivers/misc/cardreader/rtsx_usb.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/misc/cardreader/rtsx_usb.c
>> b/drivers/misc/cardreader/rtsx_usb.c
>> index b97903ff1a72..fed83453e5c5 100644
>> --- a/drivers/misc/cardreader/rtsx_usb.c
>> +++ b/drivers/misc/cardreader/rtsx_usb.c
>> @@ -723,8 +723,20 @@ static int rtsx_usb_suspend(struct usb_interface
>> *intf, pm_message_t message)
>> return 0;
>> }
>>
>> +static int rtsx_usb_resume_child(struct device *dev, void *data)
>> +{
>> + /* No need to wake up self again */
>> + if (dev == data)
>> + return 0;
>
> Is this test actually needed? device_for_each_child() won't enumerate
> the device it is called for, only that device's children.
Ok, I'll update this part.
>
>> +
>> + dev_dbg(dev, "%s called\n", __func__);
>
> Not necessary. People can use ftrace if they want this information.
Sure I'll remove it.
This is to make the change more aligned with the original code. It uses
similar function on other places too.
Kai-Heng
>
> Alan Stern
>
>> + pm_request_resume(dev);
>> + return 0;
>> +}
>> +
>> static int rtsx_usb_resume(struct usb_interface *intf)
>> {
>> + device_for_each_child(&intf->dev, &intf->dev, rtsx_usb_resume_child);
>> return 0;
>> }
>>
>> @@ -734,6 +746,7 @@ static int rtsx_usb_reset_resume(struct
>> usb_interface *intf)
>> (struct rtsx_ucr *)usb_get_intfdata(intf);
>>
>> rtsx_usb_reset_chip(ucr);
>> + device_for_each_child(&intf->dev, &intf->dev, rtsx_usb_resume_child);
>> return 0;
>> }
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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
* Re: [PATCH] drm/i915: Pull unpin map into vma release
From: Chris Wilson @ 2018-07-24 9:03 UTC (permalink / raw)
To: Michał Winiarski; +Cc: intel-gfx
In-Reply-To: <20180724084859.fml3lfuczxj2r6im@mwiniars-main.ger.corp.intel.com>
Quoting Michał Winiarski (2018-07-24 09:48:59)
> On Sat, Jul 21, 2018 at 01:50:37PM +0100, Chris Wilson wrote:
> > A reasonably common operation is to pin the map of the vma alongside the
> > vma itself for the lifetime of the vma, and so release both pin at the
> > same time as destroying the vma. It is common enough to pull into the
> > release function, making that central function more attractive to a
> > couple of other callsites.
> >
> > The continual ulterior motive is to sweep over errors on module load
> > aborting...
> >
> > Testcase: igt/drv_module_reload/basic-reload-inject
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>
> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Hopefully this was the last oops for drv_module_reload...
Now just need a random patch for igt, take your pick of
https://patchwork.freedesktop.org/series/47084/
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* soft lockup on 4.17.y in migration on Dell PowerEdge
From: David Flatz @ 2018-07-24 9:01 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel
Hello
We experience soft lockups with our workload on every tested 4.17.y
kernel. I unfortunately don't know wether there are 4.17 kernels without
the bug but 4.16 kernels are fine and don't show this behaviour.
Known versions with lockup:
4.17.4, 4.17.8, 4.17.9
Latest known versions without lockup: 4.16.12
I managed to compile vanilla 4.17.9 with the default config from
opensuse and get a kernel dump from the lockup. It looks like I might
be able to trigger the crash more or less consistently in about 24 hours
when I produce load on this machine.
Workload is elasticsearch + php + apache.
Here's dmesg output from the lockup:
#v+
[ 9984.422467] watchdog: BUG: soft lockup - CPU#11 stuck for 22s! [migration/11:79]
[ 9984.422477] Modules linked in: nfsv3(E) nfs_acl(E) rpcsec_gss_krb5(E) auth_rpcgss(E) nfsv4(E) dns_resolver(E) nfs(E) lockd(E) grace(E) sunrpc(E) fscache(E) af_packet(E) iscsi_ibft(E) iscsi_boot_sysfs(E) msr(E) nls_iso8859_1(E) nls_cp437(E) vfat(E) fat(E) intel_rapl(E) sb_edac(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) mgag200(E) coretemp(E) ttm(E) kvm_intel(E) kvm(E) drm_kms_helper(E) irqbypass(E) ipmi_ssif(E) tg3(E) crct10dif_pclmul(E) drm(E) crc32_pclmul(E) ipmi_si(E) libphy(E) ghash_clmulni_intel(E) pcbc(E) mei_me(E) ptp(E) fb_sys_fops(E) aesni_intel(E) syscopyarea(E) ipmi_devintf(E) sysfillrect(E) iTCO_wdt(E) iTCO_vendor_support(E) ipmi_msghandler(E) sysimgblt(E) i2c_algo_bit(E) pps_core(E) aes_x86_64(E) dcdbas(E) lpc_ich(E) crypto_simd(E) mei(E) joydev(E) shpchp(E) pcspkr(E) cryptd(E) wmi(E)
[ 9984.422515] glue_helper(E) button(E) raid456(E) libcrc32c(E) async_raid6_recov(E) async_memcpy(E) async_pq(E) async_xor(E) xor(E) async_tx(E) hid_generic(E) usbhid(E) raid6_pq(E) raid1(E) md_mod(E) crc32c_intel(E) ehci_pci(E) ehci_hcd(E) usbcore(E) megaraid_sas(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) efivarfs(E)
[ 9984.422543] CPU: 11 PID: 79 Comm: migration/11 Kdump: loaded Tainted: G E 4.17.9-1-default #1
[ 9984.422544] Hardware name: Dell Inc. PowerEdge R420/0CN7CM, BIOS 2.4.2 01/29/2015
[ 9984.422549] RIP: 0010:multi_cpu_stop+0x49/0x110
[ 9984.422550] RSP: 0000:ffffa8bd06653e78 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
[ 9984.422552] RAX: ffffffffa8c141c0 RBX: 0000000000000001 RCX: ffff94bc4ab5d850
[ 9984.422553] RDX: ffff94bc4ab5d850 RSI: 0000000000000286 RDI: ffffa8bd08fcbbb8
[ 9984.422554] RBP: ffffa8bd08fcbbb8 R08: 0000000000000001 R09: 0000000000022780
[ 9984.422554] R10: 0000000000000001 R11: 0000000000000399 R12: ffffa8bd08fcbbdc
[ 9984.422555] R13: 0000000000000001 R14: 0000000000000000 R15: ffffa8bd08fcbb00
[ 9984.422557] FS: 0000000000000000(0000) GS:ffff94bc4ab40000(0000) knlGS:0000000000000000
[ 9984.422558] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 9984.422559] CR2: 00007f4f501ce2d0 CR3: 0000000b5c00a002 CR4: 00000000000606e0
[ 9984.422560] Call Trace:
[ 9984.422565] ? cpu_stop_park+0x30/0x30
[ 9984.422567] cpu_stopper_thread+0x6f/0xf0
[ 9984.422571] ? sort_range+0x20/0x20
[ 9984.422572] smpboot_thread_fn+0xf1/0x1e0
[ 9984.422574] kthread+0x112/0x130
[ 9984.422576] ? kthread_create_worker_on_cpu+0x40/0x40
[ 9984.422579] ret_from_fork+0x3a/0x50
[ 9984.422581] Code: 58 66 66 90 66 90 48 89 04 24 48 8b 47 18 48 85 c0 0f 84 b9 00 00 00 89 db 48 0f a3 18 41 0f 92 c7 4c 8d 65 24 45 31 f6 45 31 ed <f3> 90 8b 5d 20 44 39 eb 74 3f 83 fb 02 74 4c 83 fb 03 75 15 45
[ 9984.422608] Kernel panic - not syncing: softlockup: hung tasks
[ 9984.422612] CPU: 11 PID: 79 Comm: migration/11 Kdump: loaded Tainted: G EL 4.17.9-1-default #1
[ 9984.422615] Hardware name: Dell Inc. PowerEdge R420/0CN7CM, BIOS 2.4.2 01/29/2015
[ 9984.422617] Call Trace:
[ 9984.422620] <IRQ>
[ 9984.422625] dump_stack+0x85/0xc0
[ 9984.422630] panic+0xdc/0x241
[ 9984.422635] watchdog_timer_fn.cold.4+0x8d/0xae
[ 9984.422638] ? watchdog+0x30/0x30
[ 9984.422642] __hrtimer_run_queues+0xf0/0x2a0
[ 9984.422646] hrtimer_interrupt+0x100/0x220
[ 9984.422651] smp_apic_timer_interrupt+0x62/0x150
[ 9984.422656] apic_timer_interrupt+0xf/0x20
[ 9984.422659] </IRQ>
[ 9984.422662] RIP: 0010:multi_cpu_stop+0x49/0x110
[ 9984.422664] RSP: 0000:ffffa8bd06653e78 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
[ 9984.422668] RAX: ffffffffa8c141c0 RBX: 0000000000000001 RCX: ffff94bc4ab5d850
[ 9984.422670] RDX: ffff94bc4ab5d850 RSI: 0000000000000286 RDI: ffffa8bd08fcbbb8
[ 9984.422673] RBP: ffffa8bd08fcbbb8 R08: 0000000000000001 R09: 0000000000022780
[ 9984.422676] R10: 0000000000000001 R11: 0000000000000399 R12: ffffa8bd08fcbbdc
[ 9984.422679] R13: 0000000000000001 R14: 0000000000000000 R15: ffffa8bd08fcbb00
[ 9984.422684] ? cpu_stop_park+0x30/0x30
[ 9984.422687] cpu_stopper_thread+0x6f/0xf0
[ 9984.422690] ? sort_range+0x20/0x20
[ 9984.422694] smpboot_thread_fn+0xf1/0x1e0
[ 9984.422696] kthread+0x112/0x130
[ 9984.422699] ? kthread_create_worker_on_cpu+0x40/0x40
[ 9984.422703] ret_from_fork+0x3a/0x50
#v-
Software:
Linux inlopp 4.17.9-1-default #1 SMP PREEMPT Mon Jul 23 15:50:05 CEST 2018 x86_64 x86_64 x86_64 GNU/Linux
GNU Make 4.2.1
Binutils 2.30.0.20180320
Util-linux 2.31.1
Mount 2.31.1
Module-init-tools 25
E2fsprogs 1.44.2
Xfsprogs 4.15.1
PPP 2.4.7
Nfs-utils 2.1.1
Linux C Library 2.27
Dynamic linker (ldd) 2.27
Linux C++ Library 6.0.25
Procps 3.3.15
Net-tools 2.10
Kbd 2.0.4
Console-tools 2.0.4
Sh-utils 8.30
Udev 237
Wireless-tools 30
/proc/cpuinfo:
#v+
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1199.728
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 0
cpu cores : 8
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1738.137
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 0
cpu cores : 8
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1199.663
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 1
cpu cores : 8
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3098.979
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 1
cpu cores : 8
apicid : 34
initial apicid : 34
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1964.906
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 2
cpu cores : 8
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 2868.466
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 2
cpu cores : 8
apicid : 36
initial apicid : 36
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1962.682
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 3
cpu cores : 8
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3012.649
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 3
cpu cores : 8
apicid : 38
initial apicid : 38
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1200.154
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 4
cpu cores : 8
apicid : 8
initial apicid : 8
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 9
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3058.737
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 4
cpu cores : 8
apicid : 40
initial apicid : 40
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 10
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1962.831
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 5
cpu cores : 8
apicid : 10
initial apicid : 10
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 11
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 2122.119
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 5
cpu cores : 8
apicid : 42
initial apicid : 42
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 12
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1199.905
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 6
cpu cores : 8
apicid : 12
initial apicid : 12
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 13
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 2997.811
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 6
cpu cores : 8
apicid : 44
initial apicid : 44
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 14
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1952.093
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 7
cpu cores : 8
apicid : 14
initial apicid : 14
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 15
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3065.470
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 7
cpu cores : 8
apicid : 46
initial apicid : 46
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 16
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1200.157
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 0
cpu cores : 8
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 17
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 2991.382
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 0
cpu cores : 8
apicid : 33
initial apicid : 33
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 18
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1963.981
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 1
cpu cores : 8
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 19
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3100.262
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 1
cpu cores : 8
apicid : 35
initial apicid : 35
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 20
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1200.200
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 2
cpu cores : 8
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 21
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3095.427
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 2
cpu cores : 8
apicid : 37
initial apicid : 37
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 22
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1200.044
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 3
cpu cores : 8
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 23
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3066.873
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 3
cpu cores : 8
apicid : 39
initial apicid : 39
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 24
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1937.001
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 4
cpu cores : 8
apicid : 9
initial apicid : 9
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 25
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 3063.036
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 4
cpu cores : 8
apicid : 41
initial apicid : 41
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 26
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1200.175
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 5
cpu cores : 8
apicid : 11
initial apicid : 11
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 27
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 2008.811
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 5
cpu cores : 8
apicid : 43
initial apicid : 43
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 28
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1949.888
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 6
cpu cores : 8
apicid : 13
initial apicid : 13
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 29
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 2055.774
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 6
cpu cores : 8
apicid : 45
initial apicid : 45
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 30
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1200.040
cache size : 20480 KB
physical id : 0
siblings : 16
core id : 7
cpu cores : 8
apicid : 15
initial apicid : 15
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4600.07
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 31
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2470 0 @ 2.30GHz
stepping : 7
microcode : 0x714
cpu MHz : 1832.669
cache size : 20480 KB
physical id : 1
siblings : 16
core id : 7
cpu cores : 8
apicid : 47
initial apicid : 47
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4609.35
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
#v-
Please tell me if we can provide more info or try something or if we
could help by providing you with the mcore file.
Best wishes,
David Flatz
--
Software Engineer, search.ch
^ permalink raw reply
* Re: DPDK 18.05 only works with up to 4 NUMAs systems
From: Burakov, Anatoly @ 2018-07-24 9:03 UTC (permalink / raw)
To: Kumar, Ravi1, dev@dpdk.org
In-Reply-To: <CY4PR12MB150998FE41BB0C517194A37AAE550@CY4PR12MB1509.namprd12.prod.outlook.com>
On 24-Jul-18 9:09 AM, Kumar, Ravi1 wrote:
>>
>>
>> -----Original Message-----
>> From: Burakov, Anatoly <anatoly.burakov@intel.com>
>> Sent: Monday, July 16, 2018 4:05 PM
>> To: Kumar, Ravi1 <Ravi1.Kumar@amd.com>; dev@dpdk.org
>> Subject: Re: [dpdk-dev] DPDK 18.05 only works with up to 4 NUMAs systems
>>
>> On 14-Jul-18 10:44 AM, Kumar, Ravi1 wrote:
>>>
>>> Memory setup with 2M pages works with the default configuration. With
>>> the default configuration and 2M hugepages
>>>
>>> 1. Total amount of memory for each NUMA zone does not
>>> exceed 128G (CONFIG_RTE_MAX_MEM_MB_PER_TYPE).
>>>
>>> 2. Total number of segment lists per NUMA is limited to
>>> 32768 (CONFIG_RTE_MAX_MEMSEG_PER_TYPE). This constraint is met for
>>> each numa zone. This is the limiting factor for memory per numa with
>>> 2M hugepages and the default configuration.
>>>
>>> 3. The data structures are capable of supporting 64G of
>>> memory for each numa zone (32768 segments * 2M hugepagesize).
>>>
>>> 4. 8 NUMA zones * 64G = 512G. Therefore the total for all
>>> numa zones does not exceed 512G (CONFIG_RTE_MAX_MEM_MB).
>>>
>>> 5. Resources are capable of allocating up to 64G per NUMA
>>> zone. Things will work as long as there are enough 2M hugepages to
>>> cover the memory needs of the DPDK applications AND no memory zone
>>> needs more than 64G.
>>>
>>> With the default configuration and 1G hugepages
>>>
>>> 1. Total amount of memory for each NUMA zone is limited to
>>> 128G (CONFIG_RTE_MAX_MEM_MB_PER_TYPE). This constraint is hit for
>>> each numa zone. This is the limiting factor for memory per numa.
>>>
>>> 2. Total number of segment lists (128) does not exceed
>>> 32768 (CONFIG_RTE_MAX_MEMSEG_PER_TYPE). There are 128 segments per NUMA.
>>>
>>> 3. The data structures are capable of supporting 128G of
>>> memory for each numa zone (128 segments * 1G hugepagesize).
>>> However, only the first four NUMA zones get initialized before we hit
>>> CONFIG_RTE_MAX_MEM_MB (512G).
>>>
>>> 4. The total for all numa zones is limited to 512G
>>> (CONFIG_RTE_MAX_MEM_MB). This limit is hit after configuring the
>>> first four NUMA zones (4 x 128G = 512G). The rest of the NUMA zones
>>> cannot allocate memory.
>>>
>>> Apparently, it is intended to support max 8 NUMAs by default
>>> (CONFIG_RTE_MAX_NUMA_NODES=8), but when 1G hugepages are use, it can
>>> only support up to 4 NUMAs.
>>>
>>> Possible workarounds when using 1G hugepages:
>>>
>>> 1. Decrease CONFIG_RTE_MAX_MEM_MB_PER_TYPE to 65536 (limit
>>> of 64G per NUMA zone). This is probably the best option unless you
>>> need a lot of memory in any given NUMA.
>>>
>>> 2. Or, increase CONFIG_RTE_MAX_MEM_MB to 1048576.
>>
>> Hi Ravi,
>>
>> OK this makes it much clearer, thanks!
>>
>> I think the first one should be done. I think 64G per NUMA node is still a reasonable amount of memory and it makes the default work (i think we can go as far as reducing this limit to 32G per type!), and whoever has issues with it can change CONFIG_RTE_MAX_MEM_MB_PER_TYPE or CONFIG_RTE_MAX_MEM_MB for their use case. That's what these options are there for :)
>>
>> --
>> Thanks,
>> Anatoly
>>
>
> Hi Anatoly,
>
> Thanks a lot. Will the next release include this change?
>
> Regards,
> Ravi
>
No one has submitted a patch for this, so not at this moment. I will do
so now, but i cannot guarantee it getting merged in 18.08 since it's
almost RC2 time, and introducing such a change may be too big a risk.
--
Thanks,
Anatoly
^ permalink raw reply
* Re: [PATCH 4/4] arm64: dts: allwinner: h5: Add SID for H5
From: Maxime Ripard @ 2018-07-24 9:02 UTC (permalink / raw)
To: Emmanuel Vadot
Cc: wens, robh+dt, mark.rutland, catalin.marinas, will.deacon,
srinivas.kandagatla, linux-arm-kernel, devicetree, linux-kernel
In-Reply-To: <20180723104255.94244-4-manu@freebsd.org>
[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]
On Mon, Jul 23, 2018 at 12:42:55PM +0200, Emmanuel Vadot wrote:
> The SID controller on H5 look the same as the one present in the A64.
> But in case we find some difference one day at a compatible string
> of it's own and a fallback to the A64 one.
>
> Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> ---
> .../devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 +
> arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 5 +++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
> index e319fe5e205a..99c4ba6a3f61 100644
> --- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
> +++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
> @@ -7,6 +7,7 @@ Required properties:
> "allwinner,sun8i-a83t-sid"
> "allwinner,sun8i-h3-sid"
> "allwinner,sun50i-a64-sid"
> + "allwinner,sun50i-h5-sid"
>
> - reg: Should contain registers location and length
Bindings patches should be separate.
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> index 62d646baac3c..28183bf77164 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> @@ -129,3 +129,8 @@
> <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
> compatible = "allwinner,sun50i-h5-pinctrl";
> };
> +
> +&sid {
> + compatible = "allwinner,sun50i-h5-sid",
> + "allwinner,sun50i-a64-sid";
> +};
I'm not sure doing a split similar to what you're doing here just to
save the reg line is worth it.
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* [PATCH 4/4] arm64: dts: allwinner: h5: Add SID for H5
From: Maxime Ripard @ 2018-07-24 9:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20180723104255.94244-4-manu@freebsd.org>
On Mon, Jul 23, 2018 at 12:42:55PM +0200, Emmanuel Vadot wrote:
> The SID controller on H5 look the same as the one present in the A64.
> But in case we find some difference one day at a compatible string
> of it's own and a fallback to the A64 one.
>
> Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
> ---
> .../devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 +
> arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 5 +++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
> index e319fe5e205a..99c4ba6a3f61 100644
> --- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
> +++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
> @@ -7,6 +7,7 @@ Required properties:
> "allwinner,sun8i-a83t-sid"
> "allwinner,sun8i-h3-sid"
> "allwinner,sun50i-a64-sid"
> + "allwinner,sun50i-h5-sid"
>
> - reg: Should contain registers location and length
Bindings patches should be separate.
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> index 62d646baac3c..28183bf77164 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> @@ -129,3 +129,8 @@
> <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
> compatible = "allwinner,sun50i-h5-pinctrl";
> };
> +
> +&sid {
> + compatible = "allwinner,sun50i-h5-sid",
> + "allwinner,sun50i-a64-sid";
> +};
I'm not sure doing a split similar to what you're doing here just to
save the reg line is worth it.
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180724/368c7667/attachment.sig>
^ permalink raw reply
* [LTP] [PATCH] add testcases/lib/tst_supported_fs to .gititnore
From: Cyril Hrubis @ 2018-07-24 9:02 UTC (permalink / raw)
To: ltp
In-Reply-To: <20180724082530.18646-1-mmoese@suse.de>
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply
* Re: [PATCH 2/6] module: add support for symbol namespaces.
From: Martijn Coenen @ 2018-07-24 7:56 UTC (permalink / raw)
To: LKML
Cc: Martijn Coenen, Masahiro Yamada, Michal Marek, Geert Uytterhoeven,
Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
the arch/x86 maintainers, Alan Stern, Greg Kroah-Hartman,
Oliver Neukum, Arnd Bergmann, Jessica Yu, Stephen Boyd,
Philippe Ombredanne, Kate Stewart, Sam Ravnborg, linux-kbuild,
linux-m68k, USB list, USB Storage list, linux-scsi, Linux-Arch,
Martijn Coenen, Sandeep Patil, Iliyan Malchev, Joel Fernandes
In-Reply-To: <20180716122125.175792-3-maco@android.com>
I did find an issue with my approach:
On Mon, Jul 16, 2018 at 2:21 PM, Martijn Coenen <maco@android.com> wrote:
> The ELF symbols are renamed to include the namespace with an asm label;
> for example, symbol 'usb_stor_suspend' in namespace USB_STORAGE becomes
> 'usb_stor_suspend.USB_STORAGE'. This allows modpost to do namespace
> checking, without having to go through all the effort of parsing ELF and
> reloction records just to get to the struct kernel_symbols.
depmod doesn't like this: if namespaced symbols are built-in to the
kernel, they will appear as 'symbol.NS' in the symbol table, whereas
modules using those symbols just depend on 'symbol'. This will cause
depmod to warn about unknown symbols. I didn't find this previously
because all the exports/imports I tested were done from modules
themselves.
One way to deal with it is to change depmod, but it looks like it
hasn't been changed in ages, and it would also introduce a dependency
on userspaces to update it to avoid these warnings. So, we'd have to
encode the symbol namespace information in another way for modpost to
use. I could just write a separate post-processing tool (much like
genksyms), or perhaps encode the information in a discardable section.
Any other suggestions welcome.
Thanks,
Martijn
>
> On x86_64 I saw no difference in binary size (compression), but at
> runtime this will require a word of memory per export to hold the
> namespace. An alternative could be to store namespaced symbols in their
> own section and use a separate 'struct namespaced_kernel_symbol' for
> that section, at the cost of making the module loader more complex.
>
> Signed-off-by: Martijn Coenen <maco@android.com>
> ---
> include/asm-generic/export.h | 2 +-
> include/linux/export.h | 83 +++++++++++++++++++++++++++---------
> include/linux/module.h | 13 ++++++
> kernel/module.c | 79 ++++++++++++++++++++++++++++++++++
> 4 files changed, 156 insertions(+), 21 deletions(-)
>
> diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h
> index 68efb950a918..4c3d1afb702f 100644
> --- a/include/asm-generic/export.h
> +++ b/include/asm-generic/export.h
> @@ -29,7 +29,7 @@
> .section ___ksymtab\sec+\name,"a"
> .balign KSYM_ALIGN
> __ksymtab_\name:
> - __put \val, __kstrtab_\name
> + __put \val, __kstrtab_\name, 0
> .previous
> .section __ksymtab_strings,"a"
> __kstrtab_\name:
> diff --git a/include/linux/export.h b/include/linux/export.h
> index ad6b8e697b27..9f6e70eeb85f 100644
> --- a/include/linux/export.h
> +++ b/include/linux/export.h
> @@ -22,6 +22,11 @@ struct kernel_symbol
> {
> unsigned long value;
> const char *name;
> + const char *namespace;
> +};
> +
> +struct namespace_import {
> + const char *namespace;
> };
>
> #ifdef MODULE
> @@ -54,18 +59,28 @@ extern struct module __this_module;
> #define __CRC_SYMBOL(sym, sec)
> #endif
>
> +#define NS_SEPARATOR "."
> +
> +#define MODULE_IMPORT_NS(ns) \
> + static const struct namespace_import __knsimport_##ns \
> + asm("__knsimport_" #ns) \
> + __attribute__((section("__knsimport"), used)) \
> + = { #ns }
> +
> /* For every exported symbol, place a struct in the __ksymtab section */
> -#define ___EXPORT_SYMBOL(sym, sec) \
> +#define ___EXPORT_SYMBOL(sym, sec, ns, nspost, nspost2) \
> extern typeof(sym) sym; \
> __CRC_SYMBOL(sym, sec) \
> - static const char __kstrtab_##sym[] \
> + static const char __kstrtab_##sym##nspost[] \
> __attribute__((section("__ksymtab_strings"), aligned(1))) \
> = #sym; \
> - static const struct kernel_symbol __ksymtab_##sym \
> + static const struct kernel_symbol __ksymtab_##sym##nspost \
> + asm("__ksymtab_" #sym nspost2) \
> __used \
> - __attribute__((section("___ksymtab" sec "+" #sym), used)) \
> + __attribute__((section("___ksymtab" sec "+" #sym #nspost))) \
> + __attribute__((used)) \
> __attribute__((aligned(sizeof(void *)))) \
> - = { (unsigned long)&sym, __kstrtab_##sym }
> + = { (unsigned long)&sym, __kstrtab_##sym##nspost, ns }
>
> #if defined(__KSYM_DEPS__)
>
> @@ -76,52 +91,80 @@ extern struct module __this_module;
> * system filters out from the preprocessor output (see ksym_dep_filter
> * in scripts/Kbuild.include).
> */
> -#define __EXPORT_SYMBOL(sym, sec) === __KSYM_##sym ===
> +#define __EXPORT_SYMBOL(sym, sec, ns, nspost, nspost2) === __KSYM_##sym ===
>
> #elif defined(CONFIG_TRIM_UNUSED_KSYMS)
>
> #include <generated/autoksyms.h>
>
> -#define __EXPORT_SYMBOL(sym, sec) \
> - __cond_export_sym(sym, sec, __is_defined(__KSYM_##sym))
> -#define __cond_export_sym(sym, sec, conf) \
> - ___cond_export_sym(sym, sec, conf)
> -#define ___cond_export_sym(sym, sec, enabled) \
> - __cond_export_sym_##enabled(sym, sec)
> -#define __cond_export_sym_1(sym, sec) ___EXPORT_SYMBOL(sym, sec)
> -#define __cond_export_sym_0(sym, sec) /* nothing */
> +#define __EXPORT_SYMBOL(sym, sec, ns, nspost, nspost2) \
> + __cond_export_sym(sym, sec, ns, nspost, nspost2, \
> + __is_defined(__KSYM_##sym))
> +#define __cond_export_sym(sym, sec, ns, nspost, nspost2, conf) \
> + ___cond_export_sym(sym, sec, ns, nspost, nspost2, conf)
> +#define ___cond_export_sym(sym, sec, ns, nspost, nspost2, enabled) \
> + __cond_export_sym_##enabled(sym, sec, ns, nspost, nspost2)
> +#define __cond_export_sym_1(sym, sec, ns, nspost, nspost2) \
> + ___EXPORT_SYMBOL(sym, sec, ns, nspost, nspost2)
> +#define __cond_export_sym_0(sym, sec, ns, nspost, nspost2) /* nothing */
>
> #else
> #define __EXPORT_SYMBOL ___EXPORT_SYMBOL
> #endif
>
> #define EXPORT_SYMBOL(sym) \
> - __EXPORT_SYMBOL(sym, "")
> + __EXPORT_SYMBOL(sym, "", NULL, ,)
>
> #define EXPORT_SYMBOL_GPL(sym) \
> - __EXPORT_SYMBOL(sym, "_gpl")
> + __EXPORT_SYMBOL(sym, "_gpl", NULL, ,)
>
> #define EXPORT_SYMBOL_GPL_FUTURE(sym) \
> - __EXPORT_SYMBOL(sym, "_gpl_future")
> + __EXPORT_SYMBOL(sym, "_gpl_future", NULL, ,)
> +
> +#define EXPORT_SYMBOL_NS(sym, ns) \
> + __EXPORT_SYMBOL(sym, "", #ns, __##ns, NS_SEPARATOR #ns)
> +
> +#define EXPORT_SYMBOL_NS_GPL(sym, ns) \
> + __EXPORT_SYMBOL(sym, "_gpl", #ns, __##ns, NS_SEPARATOR #ns)
>
> #ifdef CONFIG_UNUSED_SYMBOLS
> -#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
> -#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
> +#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused", , ,)
> +#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl", , ,)
> #else
> #define EXPORT_UNUSED_SYMBOL(sym)
> #define EXPORT_UNUSED_SYMBOL_GPL(sym)
> #endif
>
> -#endif /* __GENKSYMS__ */
> +#endif /* __KERNEL__ && !__GENKSYMS__ */
> +
> +#if defined(__GENKSYMS__)
> +/*
> + * When we're running genksyms, ignore the namespace and make the _NS
> + * variants look like the normal ones. There are two reasons for this:
> + * 1) In the normal definition of EXPORT_SYMBOL_NS, the 'ns' macro
> + * argument is itself not expanded because it's always tokenized or
> + * concatenated; but when running genksyms, a blank definition of the
> + * macro does allow the argument to be expanded; if a namespace
> + * happens to collide with a #define, this can cause issues.
> + * 2) There's no need to modify genksyms to deal with the _NS variants
> + */
> +#define EXPORT_SYMBOL_NS(sym, ns) \
> + EXPORT_SYMBOL(sym)
> +#define EXPORT_SYMBOL_NS_GPL(sym, ns) \
> + EXPORT_SYMBOL_GPL(sym)
> +#endif
>
> #else /* !CONFIG_MODULES... */
>
> #define EXPORT_SYMBOL(sym)
> +#define EXPORT_SYMBOL_NS(sym, ns)
> +#define EXPORT_SYMBOL_NS_GPL(sym, ns)
> #define EXPORT_SYMBOL_GPL(sym)
> #define EXPORT_SYMBOL_GPL_FUTURE(sym)
> #define EXPORT_UNUSED_SYMBOL(sym)
> #define EXPORT_UNUSED_SYMBOL_GPL(sym)
>
> +#define MODULE_IMPORT_NS(ns)
> #endif /* CONFIG_MODULES */
> #endif /* !__ASSEMBLY__ */
>
> diff --git a/include/linux/module.h b/include/linux/module.h
> index d44df9b2c131..afab4e8fa188 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -268,6 +268,12 @@ void *__symbol_get(const char *symbol);
> void *__symbol_get_gpl(const char *symbol);
> #define symbol_get(x) ((typeof(&x))(__symbol_get(VMLINUX_SYMBOL_STR(x))))
>
> +/* namespace dependencies of the module */
> +struct module_ns_dep {
> + struct list_head ns_dep;
> + const char *namespace;
> +};
> +
> /* modules using other modules: kdb wants to see this. */
> struct module_use {
> struct list_head source_list;
> @@ -359,6 +365,13 @@ struct module {
> const struct kernel_symbol *gpl_syms;
> const s32 *gpl_crcs;
>
> + /* Namespace imports */
> + unsigned int num_ns_imports;
> + const struct namespace_import *ns_imports;
> +
> + /* Namespace dependencies */
> + struct list_head ns_dependencies;
> +
> #ifdef CONFIG_UNUSED_SYMBOLS
> /* unused exported symbols. */
> const struct kernel_symbol *unused_syms;
> diff --git a/kernel/module.c b/kernel/module.c
> index f475f30eed8c..63de0fe849f9 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -1166,6 +1166,51 @@ static inline int module_unload_init(struct module *mod)
> }
> #endif /* CONFIG_MODULE_UNLOAD */
>
> +static bool module_has_ns_dependency(struct module *mod, const char *ns)
> +{
> + struct module_ns_dep *ns_dep;
> +
> + list_for_each_entry(ns_dep, &mod->ns_dependencies, ns_dep) {
> + if (strcmp(ns_dep->namespace, ns) == 0)
> + return true;
> + }
> +
> + return false;
> +}
> +
> +static int add_module_ns_dependency(struct module *mod, const char *ns)
> +{
> + struct module_ns_dep *ns_dep;
> +
> + if (module_has_ns_dependency(mod, ns))
> + return 0;
> +
> + ns_dep = kmalloc(sizeof(*ns_dep), GFP_ATOMIC);
> + if (!ns_dep)
> + return -ENOMEM;
> +
> + ns_dep->namespace = ns;
> +
> + list_add(&ns_dep->ns_dep, &mod->ns_dependencies);
> +
> + return 0;
> +}
> +
> +static bool module_imports_ns(struct module *mod, const char *ns)
> +{
> + size_t i;
> +
> + if (!ns)
> + return true;
> +
> + for (i = 0; i < mod->num_ns_imports; ++i) {
> + if (!strcmp(mod->ns_imports[i].namespace, ns))
> + return true;
> + }
> +
> + return false;
> +}
> +
> static size_t module_flags_taint(struct module *mod, char *buf)
> {
> size_t l = 0;
> @@ -1415,6 +1460,18 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod,
> goto getname;
> }
>
> + /*
> + * We can't yet verify that the module actually imports this
> + * namespace, because the imports themselves are only available
> + * after processing the symbol table and doing relocation; so
> + * instead just record the dependency and check later.
> + */
> + if (sym->namespace) {
> + err = add_module_ns_dependency(mod, sym->namespace);
> + if (err)
> + sym = ERR_PTR(err);
> + }
> +
> getname:
> /* We must make copy under the lock if we failed to get ref. */
> strncpy(ownername, module_name(owner), MODULE_NAME_LEN);
> @@ -3061,6 +3118,11 @@ static int find_module_sections(struct module *mod, struct load_info *info)
> sizeof(*mod->gpl_syms),
> &mod->num_gpl_syms);
> mod->gpl_crcs = section_addr(info, "__kcrctab_gpl");
> +
> + mod->ns_imports = section_objs(info, "__knsimport",
> + sizeof(*mod->ns_imports),
> + &mod->num_ns_imports);
> +
> mod->gpl_future_syms = section_objs(info,
> "__ksymtab_gpl_future",
> sizeof(*mod->gpl_future_syms),
> @@ -3381,6 +3443,19 @@ static int post_relocation(struct module *mod, const struct load_info *info)
> return module_finalize(info->hdr, info->sechdrs, mod);
> }
>
> +static void verify_namespace_dependencies(struct module *mod)
> +{
> + struct module_ns_dep *ns_dep;
> +
> + list_for_each_entry(ns_dep, &mod->ns_dependencies, ns_dep) {
> + if (!module_imports_ns(mod, ns_dep->namespace)) {
> + pr_warn("%s: module uses symbols from namespace %s,"
> + " but does not import it.\n",
> + mod->name, ns_dep->namespace);
> + }
> + }
> +}
> +
> /* Is this module of this name done loading? No locks held. */
> static bool finished_loading(const char *name)
> {
> @@ -3682,6 +3757,8 @@ static int load_module(struct load_info *info, const char __user *uargs,
> if (err)
> goto free_module;
>
> + INIT_LIST_HEAD(&mod->ns_dependencies);
> +
> #ifdef CONFIG_MODULE_SIG
> mod->sig_ok = info->sig_ok;
> if (!mod->sig_ok) {
> @@ -3730,6 +3807,8 @@ static int load_module(struct load_info *info, const char __user *uargs,
> if (err < 0)
> goto free_modinfo;
>
> + verify_namespace_dependencies(mod);
> +
> flush_module_icache(mod);
>
> /* Now copy in args */
> --
> 2.18.0.203.gfac676dfb9-goog
>
^ permalink raw reply
* Re: [PATCH 0/1] t7406: avoid failures solely due to timing issues
From: Torsten Bögershausen @ 2018-07-24 9:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Johannes Schindelin via GitGitGadget
In-Reply-To: <xmqqr2jt6a5b.fsf@gitster-ct.c.googlers.com>
On Mon, Jul 23, 2018 at 12:10:24PM -0700, Junio C Hamano wrote:
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > This fixes a regression test that produces false positives occasionally: https://git-for-windows.visualstudio.com/git/_build/results?buildId=14035&view=logs
> >
>
> [jc: forwrding to Torsten for <208b2ede-4833-f062-16f2-f35b8a8ce099@web.de>]
Yes,
thanks for a "fantastic fast fix" and the integration.
I downloaded and tested it OK (under MacOS) this morning.
^ permalink raw reply
* Re: [PATCH] lightnvm: pblk: recover chunk state on 1.2 devices
From: Javier Gonzalez @ 2018-07-24 7:54 UTC (permalink / raw)
To: Matias Bjørling
Cc: Hans Holmberg, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <19b2f125-d373-cf2b-43c7-140b3872cd64@lightnvm.io>
PiBPbiAyOSBKdW4gMjAxOCwgYXQgMTMuMjgsIE1hdGlhcyBCasO4cmxpbmcgPG1iQGxpZ2h0bnZt
LmlvPiB3cm90ZToNCj4gDQo+IE9uIDA2LzI5LzIwMTggMDE6MjIgUE0sIEphdmllciBHb256YWxl
eiB3cm90ZToNCj4+PiBPbiAyOSBKdW4gMjAxOCwgYXQgMTMuMTQsIE1hdGlhcyBCasO4cmxpbmcg
PG1iQGxpZ2h0bnZtLmlvPiB3cm90ZToNCj4+PiANCj4+PiBPbiAwNi8yOC8yMDE4IDExOjEyIEFN
LCBKYXZpZXIgR29uesOhbGV6IHdyb3RlOg0KPj4+PiBUaGUgT3Blbi1DaGFubmVsIDEuMiBzcGVj
IGRvZXMgbm90IGRlZmluZSBhIG1lY2hhbmlzbSBmb3IgdGhlIGhvc3QgdG8NCj4+Pj4gcmVjb3Zl
ciB0aGUgYmxvY2sgKGNodW5rKSBzdGF0ZS4gQXMgYSBjb25zZXF1ZW5jZSwgYSBuZXdseSBmb3Jt
YXQgZGV2aWNlDQo+Pj4+IHdpbGwgbmVlZCB0byByZWNvbnN0cnVjdCB0aGUgc3RhdGUuIEN1cnJl
bnRseSwgcGJsayBhc3N1bWVzIHRoYXQgYmxvY2tzDQo+Pj4+IGFyZSBub3QgZXJhc2VkLCB3aGlj
aCBtaWdodCBjYXVzZSBkb3VibGUtZXJhc2VzIGluIGNhc2UgdGhhdCB0aGUgZGV2aWNlDQo+Pj4+
IGRvZXMgbm90IHByb3RlY3QgaXRzZWxmIGFnYWluc3QgdGhlbSAod2hpY2ggaXMgbm90IHNwZWNp
ZmllZCBpbiB0aGUgc3BlYw0KPj4+PiBlaXRoZXIpLg0KPj4+IA0KPj4+IEl0IHNob3VsZCBub3Qg
YmUgc3BlY2lmaWVkIGluIHRoZSBzcGVjLiBJdCBpcyB1cCB0byB0aGUgZGV2aWNlIHRvIGhhbmRs
ZQ0KPj4+IGRvdWJsZSBlcmFzZXMgYW5kIG5vdCBkbyBpdC4NCj4+PiANCj4+Pj4gVGhpcyBwYXRj
aCwgcmVjb25zdHJ1Y3RzIHRoZSBzdGF0ZSBiYXNlZCBvbiByZWFkIGVycm9ycy4gSWYgdGhlIGZp
cnN0DQo+Pj4+IHNlY3RvciBvZiBhIGJsb2NrIHJldHVybnMgYW5kIGVtcHR5IHBhZ2UgKE5WTV9S
U1BfRVJSX0VNUFRZUEFHRSksIHRoZW4NCj4+Pj4gdGhlIGJsb2NrIHMgbWFya2VkIGZyZWUsIGku
ZS4sIGVyYXNlZCBhbmQgcmVhZHkgdG8gYmUgdXNlZA0KPj4+PiAoTlZNX0NIS19TVF9GUkVFKS4g
T3RoZXJ3aXNlLCB0aGUgYmxvY2sgaXMgbWFya2VkIGFzIGNsb3NlZA0KPj4+PiAoTlZNX0NIS19T
VF9DTE9TRUQpLiBOb3RlIHRoYXQgZXZlbiBpZiBhIGJsb2NrIGlzIG9wZW4gYW5kIG5vdCBmdWxs
eQ0KPj4+PiB3cml0dGVuLCBpdCBoYXMgdG8gYmUgZXJhc2VkIGluIG9yZGVyIHRvIGJlIHVzZWQg
YWdhaW4uDQo+Pj4gDQo+Pj4gU2hvdWxkIHdlIGV4dGVuZCBpdCB0byBkbyB0aGUgc2NhbiwgYW5k
IHVwZGF0ZSB0aGUgd3JpdGUgcG9pbnRlciBhcw0KPj4+IHdlbGw/IEkgdGhpbmsgdGhpcyBraW5k
IG9mIGZlYXR1cmUgYWxyZWFkeSBpcyBiYWtlZCBpbnRvIHBibGs/DQo+PiBUaGlzIGlzIGFscmVh
ZHkgaW4gcGxhY2U6IHdlIHNjYW4gdW50aWwgZW1wdHkgcGFnZSBhbmQgdGFrZSBpdCBmcm9tDQo+
PiB0aGVyZS4gVGhpcyBwYXRjaCBpcyBvbmx5IGZvciB0aGUgY2FzZSBpbiB3aGljaCB3ZSBzdGFy
dCBhIHBibGsgaW5zdGFuY2UNCj4+IGZvcm0gc2NyYXRjaC4gT24gYSBkZXZpY2UgYWxyZWFkeSBv
d25lZCBieSBwYmxrLCB3ZSB3b3VsZCBub3QgaGF2ZSB0aGUNCj4+IHByb2JsZW0gd2UgYXJlIHRy
eWluZyB0byBzb2x2ZSBoZXJlIGJlY2F1c2Ugd2Uga25vdyB0aGUgc3RhdGUuDQo+IA0KPiBBZ3Jl
ZS4gV2hhdCBJIG1lYW50IHdhcyB0aGF0IHdoZW4gd2UgYW55d2F5IGFyZSByZWNvdmVyaW5nIHRo
ZSBzdGF0ZSwNCj4gd2UgY291bGQganVzdCBhcyB3ZWxsIHVwZGF0ZSAtPndwIGFuZCBzZXQgdG8g
TlZNX0NIS19TVF9PUEVOIGFuZCBzbw0KPiBmb3J0aCBmb3IgdGhlIGluaXRpYWxpemF0aW9uIHBo
YXNlLg0KPiANCg0KSW4gMS4yIHRoZSB1c2Ugb2YgY2h1bmsgbWV0YWRhdGEgaXMgcHVyZWx5IGZp
Y3Rpb25hbC4gV2UgcmVzcGVjdCB0aGUNCmNodW5rIHN0YXRlIG1hY2hpbmUgYXMgd2UgdHJhbnNp
dGlvbiBsaW5lcywgYnV0IGFsbCB0aGUgd3JpdGUgcG9pbnRlcnMNCmFyZSBpZ25vcmVkLiBJbnN0
ZWFkLCB3ZSB1c2UgdGhlIGxpbmUgYml0bWFwIHRvIHBvaW50IHRvIHRoZSBuZXh0DQp3cml0YWJs
ZSBlbnRyeS4gVGhpcyBpcyBCVFcgdGhlIHNhbWUgd2F5IHdlIGl0IGluIG9wZW4gbGluZXMgb24g
Mi4wIHRvby4NCg0KQ2h1bmsgbWV0YWRhdGEgaXMgb25seSB1c2VkIHRvIHNldHVwIHRoZSBiaXRt
YXBzIG9uIGluaXQvcmVjb3ZlcnkuIEZyb20NCmhlcmUgb24sIHdlIHVzZSB0aGUgYml0bWFwIHRv
IGZpbmQgdGhlIG5leHQgd3JpdGFibGUgc2VjdG9yLCB3aXRob3V0DQp3b3JyeWluZyBhYm91dCB0
aGUgc3BlY2lmaWMgcGVyLWNodW5rIHdyaXRlIHBvaW50ZXIuIFRodXMsIHVwZGF0aW5nDQpjaHVu
ayBtZXRhZGF0YSBoZXJlIGhhcyBubyBlZmZlY3QuDQoNCkRvZXMgdGhpcyBtYWtlIHNlbnNlIHRv
IHlvdT8NCg0KSmF2aWVy
^ permalink raw reply
* [U-Boot] [PATCH V3 1/2] mmc: add HS400 support
From: Peng Fan @ 2018-07-24 8:59 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1aa691fb-29c5-5fbd-d106-343fda7985ac@ti.com>
>
> On Tuesday 24 July 2018 02:14 PM, Peng Fan wrote:
> > Hi Faiz,
> >
> > It's 2 months since this patchset out (:
>
> Has it already been accepted?
No. I did not receive response from Jaehoon.
>
> > drivers/mmc/Kconfig
> >>
> >> On Saturday 19 May 2018 06:24 PM, Peng Fan wrote:
> >>> Add HS400 support.
> >>> Selecting HS400 needs first select HS199 according to spec, so use a
> >>> dedicated function for HS400.
> >>> Add HS400 related macros.
> >>> Remove the restriction of only using the low 6 bits of
> >>> EXT_CSD_CARD_TYPE, using all the 8 bits.
> >>>
> >>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> >>> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
> >>> Cc: Stefano Babic <sbabic@denx.de>
> >>> Cc: Simon Glass <sjg@chromium.org>
> >>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> >>> Cc: Bin Meng <bmeng.cn@gmail.com>
> >>> ---
> >>>
> >>> V3:
> >>> Simplify code
> >>> add error msg
> >>>
> >>> V2:
> >>> remove 4bits support from HS400, as HS400 does not support 4bits per
> spec.
> >>>
> >>> drivers/mmc/Kconfig | 7 +++
> >>> drivers/mmc/mmc.c | 137
> >> +++++++++++++++++++++++++++++++++++++++++-----------
> >>> include/mmc.h | 11 +++++
> >>> 3 files changed, 128 insertions(+), 27 deletions(-)
> >>>
> >>> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index
> >>> 3f15f85efd..a535a87a8e 100644
> >>> --- a/drivers/mmc/Kconfig
> >>> +++ b/drivers/mmc/Kconfig
> >>> @@ -104,6 +104,13 @@ config SPL_MMC_UHS_SUPPORT
> >>> cards. The IO voltage must be switchable from 3.3v to 1.8v. The bus
> >>> frequency can go up to 208MHz (SDR104)
> >>>
> >>> +config MMC_HS400_SUPPORT
> >>> + bool "enable HS400 support"
> >>> + select MMC_HS200_SUPPORT
> >>> + help
> >>> + The HS400 mode is support by some eMMC. The bus frequency is up
> to
> >>> + 200MHz. This mode requires tuning the IO.
> >>> +
> >>
> >> Please add SPL_MMC_HS400_SUPPORT also.
> >
> > What issue do you see? I did not test SPL MMC with HS400 support. You
> > mean only add a Kconfig entry SPL_MMC_HS400_SUPPORT?
>
> Yes only a Kconfig. It helps people who want to include/exclude it from SPL. You
> are implicitly checking for the config in
> CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) below.
>
> I was just using your patch for some out of tree development and figured it
> would be useful to have the CONFIG.
Ok. I'll add it and post out V4 patchset.
Thanks,
Peng
>
> Thanks,
> Faiz
^ permalink raw reply
* Re: [PATCH 1/4] sched/topology: SD_ASYM_CPUCAPACITY flag detection
From: Qais Yousef @ 2018-07-24 8:59 UTC (permalink / raw)
To: Morten Rasmussen
Cc: vincent.guittot, peterz, linux-kernel, dietmar.eggemann, mingo,
valentin.schneider, linux-arm-kernel
In-Reply-To: <20180724083710.GB29978@e105550-lin.cambridge.arm.com>
On 24/07/18 09:37, Morten Rasmussen wrote:
> On Mon, Jul 23, 2018 at 05:07:50PM +0100, Qais Yousef wrote:
>> On 23/07/18 16:27, Morten Rasmussen wrote:
>>> It does increase the cost of things like hotplug slightly and
>>> repartitioning of root_domains a slightly but I don't see how we can
>>> avoid it if we want generic code to set this flag. If the costs are not
>>> acceptable I think the only option is to make the detection architecture
>>> specific.
>> I think hotplug is already expensive and this overhead would be small in
>> comparison. But this could be called when frequency changes if I understood
>> correctly - this is the one I wasn't sure how 'hot' it could be. I wouldn't
>> expect frequency changes at a very high rate because it's relatively
>> expensive too..
> A frequency change shouldn't lead to a flag change or a rebuild of the
> sched_domain hierarhcy. The situations where the hierarchy should be
> rebuild to update the flag is during boot as we only know the amount of
> asymmetry once cpufreq has been initialized, when cpus are hotplugged
> in/out, and when root_domains change due to cpuset reconfiguration. So
> it should be a relatively rare event.
Ah OK I misunderstood that part then.
The series LGTM then.
--
Qais Yousef
^ permalink raw reply
* [PATCH 1/4] sched/topology: SD_ASYM_CPUCAPACITY flag detection
From: Qais Yousef @ 2018-07-24 8:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20180724083710.GB29978@e105550-lin.cambridge.arm.com>
On 24/07/18 09:37, Morten Rasmussen wrote:
> On Mon, Jul 23, 2018 at 05:07:50PM +0100, Qais Yousef wrote:
>> On 23/07/18 16:27, Morten Rasmussen wrote:
>>> It does increase the cost of things like hotplug slightly and
>>> repartitioning of root_domains a slightly but I don't see how we can
>>> avoid it if we want generic code to set this flag. If the costs are not
>>> acceptable I think the only option is to make the detection architecture
>>> specific.
>> I think hotplug is already expensive and this overhead would be small in
>> comparison. But this could be called when frequency changes if I understood
>> correctly - this is the one I wasn't sure how 'hot' it could be. I wouldn't
>> expect frequency changes at a very high rate because it's relatively
>> expensive too..
> A frequency change shouldn't lead to a flag change or a rebuild of the
> sched_domain hierarhcy. The situations where the hierarchy should be
> rebuild to update the flag is during boot as we only know the amount of
> asymmetry once cpufreq has been initialized, when cpus are hotplugged
> in/out, and when root_domains change due to cpuset reconfiguration. So
> it should be a relatively rare event.
Ah OK I misunderstood that part then.
The series LGTM then.
--
Qais Yousef
^ permalink raw reply
* [U-Boot] [UBOOT PATCH v2] net: zynq_gem: convert to use livetree
From: Michal Simek @ 2018-07-24 8:58 UTC (permalink / raw)
To: u-boot
In-Reply-To: <BN1PR02MB101A8BE4AAE6B40F4106905D9560@BN1PR02MB101.namprd02.prod.outlook.com>
Hi,
On 23.7.2018 07:48, Siva Durga Prasad Paladugu wrote:
> Hi Joe/Michal,
>
> Can you please take it up if it is fine.
joe: Can you please take it via your tree?
There are some patches before this.
Thanks,
Michal
^ 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.