Skip to content

Instantly share code, notes, and snippets.

@vault
Created August 24, 2013 19:27
Show Gist options
  • Save vault/6329965 to your computer and use it in GitHub Desktop.
Save vault/6329965 to your computer and use it in GitHub Desktop.
diff -aur a/linux.c b/linux.c
--- a/linux.c 2013-07-11 15:58:49.000000000 -0400
+++ b/linux.c 2013-08-24 15:16:13.542185455 -0400
@@ -519,7 +519,7 @@
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)
static char *
-mic_devnode(struct device *dev, mode_t *mode)
+mic_devnode(struct device *dev, umode_t *mode)
{
return kasprintf(GFP_KERNEL, "mic/%s", dev_name(dev));
}
Only in a: linux.o
Only in a: .linux.o.cmd
diff -aur a/linvcons.c b/linvcons.c
--- a/linvcons.c 2013-07-11 15:58:49.000000000 -0400
+++ b/linvcons.c 2013-08-24 13:40:50.212889434 -0400
@@ -96,7 +96,7 @@
micvcons_tty->driver_name = MICVCONS_DEVICE_NAME;
micvcons_tty->name = MICVCONS_DEVICE_NAME;
micvcons_tty->major = 0;
- micvcons_tty->minor_num = num_bds;
+ micvcons_tty->num = num_bds;
micvcons_tty->minor_start = 0;
micvcons_tty->type = TTY_DRIVER_TYPE_SERIAL;
micvcons_tty->subtype = SERIAL_TYPE_NORMAL;
@@ -202,7 +202,7 @@
port->dp_canread = 1;
}
- tty->low_latency = 0;
+ tty->port->low_latency = 0;
if (!port->dp_tty)
port->dp_tty = tty;
@@ -334,9 +334,9 @@
ret = micscif_rb_get_next(port->dp_in, buf, get_count);
micscif_rb_update_read_ptr(port->dp_in);
if (port->dp_reader && port->dp_canread) {
- bytes_read = tty_insert_flip_string(port->dp_tty,
+ bytes_read = tty_insert_flip_string(port->dp_tty->port,
buf, get_count);
- tty_flip_buffer_push(port->dp_tty);
+ tty_flip_buffer_push(port->dp_tty->port);
bytes_total += bytes_read;
if (bytes_read != get_count) {
printk(KERN_WARNING "dropping characters: \
Only in a: .linvcons.o.d
diff -aur a/linvnet.c b/linvnet.c
--- a/linvnet.c 2013-07-11 15:58:49.000000000 -0400
+++ b/linvnet.c 2013-08-24 13:43:37.745669087 -0400
@@ -204,7 +204,7 @@
.ndo_stop = micveth_stop_dev,
.ndo_start_xmit = micveth_xmit,
.ndo_validate_addr = eth_validate_addr,
- .ndo_set_multicast_list = micveth_multicast_list,
+ .ndo_set_rx_mode = micveth_multicast_list,
.ndo_set_mac_address = micveth_set_address,
.ndo_change_mtu = micveth_change_mtu,
};
diff -aur a/micscif_api.c b/micscif_api.c
--- a/micscif_api.c 2013-07-11 15:58:49.000000000 -0400
+++ b/micscif_api.c 2013-08-24 13:42:30.636364963 -0400
@@ -2599,7 +2599,7 @@
/* Is it OK to use wait->key?? */
if (ep->state == SCIFEP_LISTENING) {
- if (!wait || wait->key & SCIF_POLLIN) {
+ if (!wait || wait->_key & SCIF_POLLIN) {
poll_wait(f, &ep->conwq, wait);
if (ep->conreqcnt)
mask |= SCIF_POLLIN;
@@ -2609,7 +2609,7 @@
goto return_scif_poll;
}
- if (!wait || wait->key & SCIF_POLLIN) {
+ if (!wait || wait->_key & SCIF_POLLIN) {
if (ep->state != SCIFEP_CONNECTED &&
ep->state != SCIFEP_LISTENING &&
ep->state != SCIFEP_DISCONNECTED) {
@@ -2622,7 +2622,7 @@
mask |= SCIF_POLLIN;
}
- if (!wait || wait->key & SCIF_POLLOUT) {
+ if (!wait || wait->_key & SCIF_POLLOUT) {
if (ep->state != SCIFEP_CONNECTED &&
ep->state != SCIFEP_LISTENING) {
mask |= SCIF_POLLERR;
@@ -2838,7 +2838,7 @@
* the VMA is actually backed by physical pages in the remote
* node's physical memory and not via a struct page.
*/
- vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP;
+ vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP | VM_PFNMAP;
if (!is_self_scifdev(ep->remote_dev))
((vma)->vm_flags) |= VM_IO;
diff -aur a/micscif_nm.c b/micscif_nm.c
--- a/micscif_nm.c 2013-07-11 15:58:49.000000000 -0400
+++ b/micscif_nm.c 2013-08-24 13:46:01.746445089 -0400
@@ -1500,7 +1500,7 @@
}
case SYSTEM_BOOTING:
case SYSTEM_RUNNING:
- case SYSTEM_SUSPEND_DISK:
+ //case SYSTEM_SUSPEND_DISK:
break;
case 0xdead:
if (mic_crash_dump_enabled)
diff -aur a/micscif_rb.c b/micscif_rb.c
--- a/micscif_rb.c 2013-07-11 15:58:49.000000000 -0400
+++ b/micscif_rb.c 2013-08-24 13:42:56.807923297 -0400
@@ -44,6 +44,7 @@
#include "mic/micscif_rb.h"
#include <linux/circ_buf.h>
+#include <linux/module.h>
#define count_in_ring(head, tail, size) CIRC_CNT(head, tail, size)
#define space_in_ring(head, tail, size) CIRC_SPACE(head, tail, size)
diff -aur a/micscif_select.c b/micscif_select.c
--- a/micscif_select.c 2013-07-11 15:58:49.000000000 -0400
+++ b/micscif_select.c 2013-08-24 13:45:36.626760010 -0400
@@ -40,6 +40,7 @@
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <linux/sched/rt.h>
#include <linux/file.h>
#include <linux/hrtimer.h>
@@ -232,7 +233,7 @@
return;
entry->filp = NULL;
entry->wait_address = wait_address;
- entry->key = p->key;
+ entry->key = p->_key;
init_waitqueue_func_entry(&entry->wait, pollwake);
entry->wait.private = pwq;
add_wait_queue(wait_address, &entry->wait);
@@ -287,7 +288,7 @@
mask = POLLNVAL;
mask = DEFAULT_POLLMASK;
if (pwait)
- pwait->key = pollfd->events |
+ pwait->_key = pollfd->events |
POLLERR | POLLHUP;
mask = scif_poll_kernel(pwait, epd);
/* Mask out unneeded events. */
diff -aur a/micveth_dma.c b/micveth_dma.c
--- a/micveth_dma.c 2013-07-11 15:58:49.000000000 -0400
+++ b/micveth_dma.c 2013-08-24 13:44:01.784349815 -0400
@@ -901,7 +901,7 @@
.ndo_stop = micvnet_stop_dev,
.ndo_start_xmit = micvnet_xmit,
.ndo_validate_addr = eth_validate_addr,
- .ndo_set_multicast_list = micvnet_multicast_list,
+ .ndo_set_rx_mode = micvnet_multicast_list,
.ndo_set_mac_address = micvnet_set_address,
.ndo_change_mtu = micvnet_change_mtu,
};
Only in a: .tmp_versions
diff -aur a/vhost/mic_blk.c b/vhost/mic_blk.c
--- a/vhost/mic_blk.c 2013-07-11 15:58:49.000000000 -0400
+++ b/vhost/mic_blk.c 2013-08-24 13:50:01.501191004 -0400
@@ -140,11 +140,11 @@
if (atomic64_read(&vbio->file->f_count) == 0) { /* file is closed */
ret = -1;
} else if (vbio->type & VIRTIO_BLK_T_FLUSH) {
-#ifdef __GNUC_RH_RELEASE__
- ret = vfs_fsync(vbio->file, vbio->file->f_path.dentry, 1);
-#else
+//#ifdef __GNUC_RH_RELEASE__
+ //ret = vfs_fsync(vbio->file, vbio->file->f_path.dentry, 1);
+//#else
ret = vfs_fsync(vbio->file, 1);
-#endif
+//#endif
} else if (vbio->type & VIRTIO_BLK_T_OUT) {
for (iov = vbio->iov; iov < &vbio->iov[vbio->nvecs]; iov++) {
iov->iov_base = mic_addr_in_host(aper_va, iov->iov_base);
@@ -465,13 +465,12 @@
writel(
(1U << VIRTIO_BLK_F_SEG_MAX) |
(1U << VIRTIO_BLK_F_BLK_SIZE) |
- (1U << VIRTIO_BLK_F_FLUSH),
+ (1U << VIRTIO_BLK_F_WCE),
&vb_shared->host_features);
writel(DISK_SEG_MAX, &vb_shared->blk_config.seg_max);
writel(SECTOR_SIZE, &vb_shared->blk_config.blk_size);
- ret = vfs_getattr(vblk->virtblk_file->f_path.mnt,
- vblk->virtblk_file->f_path.dentry, &stat);
+ ret = vfs_getattr(&vblk->virtblk_file->f_path, &stat);
if (ret < 0)
goto _exit_;
diff -aur a/vhost/vhost.h b/vhost/vhost.h
--- a/vhost/vhost.h 2013-07-11 15:58:49.000000000 -0400
+++ b/vhost/vhost.h 2013-08-24 13:46:49.852829410 -0400
@@ -216,11 +216,11 @@
static inline int vhost_has_feature(struct vhost_dev *dev, int bit)
{
-#ifdef __GNUC_RH_RELEASE__
- unsigned acked_features = rcu_dereference(dev->acked_features);
-#else
+//#ifdef __GNUC_RH_RELEASE__
+ //unsigned acked_features = rcu_dereference(dev->acked_features);
+//#else
unsigned acked_features = rcu_dereference_index_check(dev->acked_features, rcu_read_lock_held());
-#endif
+//#endif
return acked_features & (1 << bit);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment