Michael S. Tsirkin | 1 Jul 12:14 2015
Picon

[PATCH] pci_regs: reintroduce PCI_MSIX_FLAGS_BIRMASK

This partially reverts commit 09a2c73ddfc7f173237fc7209a65b34dd5bcb5ed.
    PCI: Remove unused PCI_MSIX_FLAGS_BIRMASK definition

That commit dropped a symbol from an exported header claiming "no one
uses it". This isn't how Linux normally approaches userspace API though,
and in fact QEMU build fails if trying to use updated headers from linux
3.12 and up.

Sure, userspace can be fixed to use the new symbol, but the cost
of keeping the old one around is fairly low, too.

Signed-off-by: Michael S. Tsirkin <mst@...>
---
 include/uapi/linux/pci_regs.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index efe3443..66644ac 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
 <at>  <at>  -319,6 +319,7  <at>  <at> 
 #define PCI_MSIX_PBA		8	/* Pending Bit Array offset */
 #define  PCI_MSIX_PBA_BIR	0x00000007 /* BAR index */
 #define  PCI_MSIX_PBA_OFFSET	0xfffffff8 /* Offset into specified BAR */
+#define  PCI_MSIX_FLAGS_BIRMASK	PCI_MSIX_PBA_BIR /* deprecated */
 #define PCI_CAP_MSIX_SIZEOF	12	/* size of MSIX registers */

 /* MSI-X Table entry format */
--

-- 
MST
(Continue reading)

Seymour, Shane M | 1 Jul 05:47 2015
Picon

[PATCH 3/3] hpsa: Convert DEVICE_ATTR macro usage to DEVICE_ATTR_RO|WR|WO


Convert DEVICE_ATTR macro usage to DEVICE_ATTR_RO|WR|WO
Changes forced some function names to change.

Signed-off-by: Shane Seymour <shane.seymour@...>
---
--- a/drivers/scsi/hpsa.c	2015-06-30 16:34:01.403904650 -0500
+++ b/drivers/scsi/hpsa.c	2015-06-30 16:21:54.214954176 -0500
 <at>  <at>  -376,7 +376,7  <at>  <at>  static int check_for_busy(struct ctlr_in
 }

 static u32 lockup_detected(struct ctlr_info *h);
-static ssize_t host_show_lockup_detected(struct device *dev,
+static ssize_t lockup_detected_show(struct device *dev,
 		struct device_attribute *attr, char *buf)
 {
 	int ld;
 <at>  <at>  -389,7 +389,7  <at>  <at>  static ssize_t host_show_lockup_detected
 	return sprintf(buf, "ld=%d\n", ld);
 }

-static ssize_t host_store_hp_ssd_smart_path_status(struct device *dev,
+static ssize_t hp_ssd_smart_path_status_store(struct device *dev,
 					 struct device_attribute *attr,
 					 const char *buf, size_t count)
 {
 <at>  <at>  -413,7 +413,7  <at>  <at>  static ssize_t host_store_hp_ssd_smart_p
 	return count;
 }

(Continue reading)

Seymour, Shane M | 1 Jul 05:45 2015
Picon

[PATCH 1/3] hpsa: convert show method snprintf usage to scnprintf


Changed all show method snprintf usage to scnprintf per
Documentation/filesystems/sysfs.txt.

Signed-off-by: Shane Seymour <shane.seymour@...>
---
Please let me know if this is not the correct way to submit
patches by separating them but keeping them logically
together.
--- a/drivers/scsi/hpsa.c	2015-06-25 15:52:15.633031319 -0500
+++ b/drivers/scsi/hpsa.c	2015-06-30 16:12:58.125990687 -0500
 <at>  <at>  -460,7 +460,7  <at>  <at>  static ssize_t host_show_firmware_revisi
 	if (!h->hba_inquiry_data)
 		return 0;
 	fwrev = &h->hba_inquiry_data[32];
-	return snprintf(buf, 20, "%c%c%c%c\n",
+	return scnprintf(buf, 20, "%c%c%c%c\n",
 		fwrev[0], fwrev[1], fwrev[2], fwrev[3]);
 }

 <at>  <at>  -470,7 +470,7  <at>  <at>  static ssize_t host_show_commands_outsta
 	struct Scsi_Host *shost = class_to_shost(dev);
 	struct ctlr_info *h = shost_to_hba(shost);

-	return snprintf(buf, 20, "%d\n",
+	return scnprintf(buf, 20, "%d\n",
 			atomic_read(&h->commands_outstanding));
 }

 <at>  <at>  -481,7 +481,7  <at>  <at>  static ssize_t host_show_transport_mode(
(Continue reading)

Seymour, Shane M | 1 Jul 03:56 2015
Picon

[PATCH v2] hpsa: convert DEVICE_ATTR to RO|WO|RW and show methods must not use snprintf


Changed DEVICE_ATTR macro usage to DEVICE_ATTR_RO|WO|RW.
This also forced some show/store function names to change.

Changed all show method snprintf() usage to scnprintf() per
Documentation/filesystems/sysfs.txt.

Signed-off-by: Shane Seymour <shane.seymour@...>
---
Changes from v1:
Dropped one sprintf() to scnprintf() change in show method.
--- a/drivers/scsi/hpsa.c	2015-06-25 15:52:15.633031319 -0500
+++ b/drivers/scsi/hpsa.c	2015-06-30 15:06:14.664263348 -0500
 <at>  <at>  -376,7 +376,7  <at>  <at>  static int check_for_busy(struct ctlr_in
 }

 static u32 lockup_detected(struct ctlr_info *h);
-static ssize_t host_show_lockup_detected(struct device *dev,
+static ssize_t lockup_detected_show(struct device *dev,
 		struct device_attribute *attr, char *buf)
 {
 	int ld;
 <at>  <at>  -389,7 +389,7  <at>  <at>  static ssize_t host_show_lockup_detected
 	return sprintf(buf, "ld=%d\n", ld);
 }

-static ssize_t host_store_hp_ssd_smart_path_status(struct device *dev,
+static ssize_t hp_ssd_smart_path_status_store(struct device *dev,
 					 struct device_attribute *attr,
 					 const char *buf, size_t count)
(Continue reading)

Omar Sandoval | 30 Jun 18:32 2015

[PATCH RESEND] Btrfs: add autodefrag inode flag

In some cases, we may not want to enable automatic defragmentation for
the whole filesystem with the "autodefrag" mount option but we still
want to defragment specific files or directories. Add an inode flag
which allows us to do specify that.

Signed-off-by: Omar Sandoval <osandov@...>
---
Resending this because I didn't send it to fsdevel or linux-api last
time and I'm adding a new user-facing inode flag.

 fs/btrfs/ctree.h        |  1 +
 fs/btrfs/file.c         | 18 ++++++++++--------
 fs/btrfs/ioctl.c        | 13 +++++++++++--
 include/uapi/linux/fs.h |  1 +
 4 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 6f364e1d8d3d..e898bb2822ef 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
 <at>  <at>  -2234,6 +2234,7  <at>  <at>  do {                                                                   \
 #define BTRFS_INODE_NOATIME		(1 << 9)
 #define BTRFS_INODE_DIRSYNC		(1 << 10)
 #define BTRFS_INODE_COMPRESS		(1 << 11)
+#define BTRFS_INODE_AUTODEFRAG		(1 << 12)

 #define BTRFS_INODE_ROOT_ITEM_INIT	(1 << 31)

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index b072e17479aa..33bead79da7a 100644
(Continue reading)

Seymour, Shane M | 30 Jun 07:22 2015
Picon

[PATCH] hpsa: convert DEVICE_ATTR to RO|WO|RW and show methods must use scnprintf


Changed DEVICE_ATTR macro usage to DEVICE_ATTR_RO|WO|RW.
This also forced some show/store function names to change.

Changed all show method sprint/snprintf usage to scnprintf per
Documentation/filesystems/sysfs.txt.

Signed-off-by: Shane Seymour <shane.seymour@...>
---
--- a/drivers/scsi/hpsa.c	2015-06-25 15:52:15.633031319 -0500
+++ b/drivers/scsi/hpsa.c	2015-06-29 17:28:24.628475369 -0500
 <at>  <at>  -376,7 +376,7  <at>  <at>  static int check_for_busy(struct ctlr_in
 }

 static u32 lockup_detected(struct ctlr_info *h);
-static ssize_t host_show_lockup_detected(struct device *dev,
+static ssize_t lockup_detected_show(struct device *dev,
 		struct device_attribute *attr, char *buf)
 {
 	int ld;
 <at>  <at>  -386,10 +386,10  <at>  <at>  static ssize_t host_show_lockup_detected
 	h = shost_to_hba(shost);
 	ld = lockup_detected(h);

-	return sprintf(buf, "ld=%d\n", ld);
+	return scnprintf(buf, PAGE_SIZE, "ld=%d\n", ld);
 }

-static ssize_t host_store_hp_ssd_smart_path_status(struct device *dev,
+static ssize_t hp_ssd_smart_path_status_store(struct device *dev,
(Continue reading)

Gwenn Bourrée | 29 Jun 17:53 2015
Picon

[PATCH]: Mux n_gsm: Add a DLCI hangup state and callback


Dear kernel tty maintainers,

Please review the following patch:

From 6e006bd522124d0e8a2f6075099a21f7051a426f Mon Sep 17 00:00:00 2001
From: Gwenn Bourree <gwenn.bourree <at> intel.com>
Date: Mon, 29 Jun 2015 17:26:01 +0200
Subject: [PATCH] Mux n_gsm: Add a DLCI hangup state and callback

Use of asynchronous hangup instead of vhangup.

Signed-off-by: Gwenn Bourree <gwenn.bourree <at> intel.com>
Signed-off-by: Gwenn Bourree <gwenn.bourree <at> intel.com>
Signed-off-by: Mustapha Ben Zoubeir <mustaphax.ben.zoubeir <at> intel.com>
Signed-off-by: Nicolas LOUIS <nicolasx.louis <at> intel.com>
Reviewed-by: Ravindran, Arun <arun.ravindran <at> intel.com

---
 drivers/tty/n_gsm.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index d6e0ea0..762f555 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
 <at>  <at>  -135,6 +135,7  <at>  <at>  struct gsm_dlci {
 #define DLCI_OPENING		1	/* Sending SABM not seen UA */
 #define DLCI_OPEN		2	/* SABM/UA complete */
 #define DLCI_CLOSING		3	/* Sending DISC not seen UA/DM */
(Continue reading)

Michael S. Tsirkin | 29 Jun 11:19 2015
Picon

[PATCH] virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS

Document VIRTIO_NET_CTRL_GUEST_OFFLOADS and the
relevant feature bits.

Will allow ethtool control of the offloads down the road.

Reported-by: Yan Vugenfirer <yan@...>
Signed-off-by: Michael S. Tsirkin <mst@...>
---
 include/uapi/linux/virtio_net.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index 7bbee79..ec32293 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/include/uapi/linux/virtio_net.h
 <at>  <at>  -34,6 +34,7  <at>  <at> 
 /* The feature bitmap for virtio net */
 #define VIRTIO_NET_F_CSUM	0	/* Host handles pkts w/ partial csum */
 #define VIRTIO_NET_F_GUEST_CSUM	1	/* Guest handles pkts w/ partial csum */
+#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Dynamic offload configuration. */
 #define VIRTIO_NET_F_MAC	5	/* Host has given MAC address. */
 #define VIRTIO_NET_F_GUEST_TSO4	7	/* Guest can handle TSOv4 in. */
 #define VIRTIO_NET_F_GUEST_TSO6	8	/* Guest can handle TSOv6 in. */
 <at>  <at>  -226,4 +227,19  <at>  <at>  struct virtio_net_ctrl_mq {
  #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN        1
  #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX        0x8000

+/*
+ * Control network offloads
+ *
(Continue reading)

Shuah Khan | 26 Jun 22:02 2015

[GIT PULL] Kselftest updates for 4.2-rc1

Hi Linus,

Please pull the following Kselftest updates for 4.2-rc1

thanks,
-- Shuah

 The following changes since commit
ba155e2d21f6bf05de86a78dbe5bfd8757604a65:

  Linux 4.1-rc5 (2015-05-24 18:22:35 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-4.2-rc1

for you to fetch changes up to 2278e5ed9f36baca7c972ed17aae7467ca91b2b9:

  selftests: add quicktest support (2015-06-23 07:20:16 -0600)

----------------------------------------------------------------
linux-kselftest-4.2-rc1

This update adds two new test suites: futex and seccomp.
In addition, it includes fixes for bugs in timers, other
tests, and compile framework. It introduces new quicktest
feature to enable users to choose to run tests that complete
in a short time..

(Continue reading)

Gioh Kim | 26 Jun 11:58 2015

[RFCv2 0/5] enable migration of driver pages

Hello,

This series try to enable migration of non-LRU pages, such as driver's page.

My ARM-based platform occured severe fragmentation problem after long-term
(several days) test. Sometimes even order-3 page allocation failed. It has
memory size 512MB ~ 1024MB. 30% ~ 40% memory is consumed for graphic processing
and 20~30 memory is reserved for zram.

I found that many pages of GPU driver and zram are non-movable pages. So I
reported Minchan Kim, the maintainer of zram, and he made the internal 
compaction logic of zram. And I made the internal compaction of GPU driver.

They reduced some fragmentation but they are not enough effective.
They are activated by its own interface, /sys, so they are not cooperative
with kernel compaction. If there is too much fragmentation and kernel starts
to compaction, zram and GPU driver cannot work with the kernel compaction.

The first this patch adds a generic isolate/migrate/putback callbacks for page
address-space. The zram and GPU, and any other modules can register
its own migration method. The kernel compaction can call the registered
migration when it works. Therefore all page in the system can be migrated
at once.

The 2nd the generic migration callbacks are applied into balloon driver.
My gpu driver code is not open so I apply generic migration into balloon
to show how it works. I've tested it with qemu enabled by kvm like followings:
- turn on Ubuntu 14.04 with 1G memory on qemu.
- do kernel building
- after several seconds check more than 512MB is used with free command
(Continue reading)

Vinson Lee | 26 Jun 01:29 2015

[PATCH] selftests/exec: Fix build on older distros.

From: Vinson Lee <vlee@...>

This patch fixes this build error on CentOS 5.

execveat.c: In function ‘check_execveat_pathmax’:
execveat.c:185: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
execveat.c:185: error: (Each undeclared identifier is reported only once
execveat.c:185: error: for each function it appears in.)
execveat.c: In function ‘run_tests’:
execveat.c:221: error: ‘O_PATH’ undeclared (first use in this function)
execveat.c:222: error: ‘O_CLOEXEC’ undeclared (first use in this function)
execveat.c:258: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)

Cc: stable@... # 3.19+
Signed-off-by: Vinson Lee <vlee@...>
---
 tools/testing/selftests/exec/execveat.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testing/selftests/exec/execveat.c
index 8d5d1d2..170148d 100644
--- a/tools/testing/selftests/exec/execveat.c
+++ b/tools/testing/selftests/exec/execveat.c
 <at>  <at>  -20,6 +20,16  <at>  <at> 
 #include <string.h>
 #include <unistd.h>

+#ifndef AT_EMPTY_PATH
+# define AT_EMPTY_PATH 0x1000
+#endif
(Continue reading)


Gmane