Commit 1c89ac55 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  fix spinlock recursion in hvc_console
  stop_machine: remove unused variable
  modules: extend initcall_debug functionality to the module loader
  export virtio_rng.h
  lguest: use get_user_pages_fast() instead of get_user_pages()
  mm: Make generic weak get_user_pages_fast and EXPORT_GPL it
  lguest: don't set MAC address for guest unless specified
parents 88fa08f6 b1b135c8
Loading
Loading
Loading
Loading
+1 −22
Original line number Diff line number Diff line
@@ -1447,21 +1447,6 @@ static void configure_device(int fd, const char *tapif, u32 ipaddr)
		err(1, "Bringing interface %s up", tapif);
}

static void get_mac(int fd, const char *tapif, unsigned char hwaddr[6])
{
	struct ifreq ifr;

	memset(&ifr, 0, sizeof(ifr));
	strcpy(ifr.ifr_name, tapif);

	/* SIOC stands for Socket I/O Control.  G means Get (vs S for Set
	 * above).  IF means Interface, and HWADDR is hardware address.
	 * Simple! */
	if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0)
		err(1, "getting hw address for %s", tapif);
	memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, 6);
}

static int get_tun_device(char tapif[IFNAMSIZ])
{
	struct ifreq ifr;
@@ -1531,11 +1516,8 @@ static void setup_tun_net(char *arg)
	p = strchr(arg, ':');
	if (p) {
		str2mac(p+1, conf.mac);
		add_feature(dev, VIRTIO_NET_F_MAC);
		*p = '\0';
	} else {
		p = arg + strlen(arg);
		/* None supplied; query the randomly assigned mac. */
		get_mac(ipfd, tapif, conf.mac);
	}

	/* arg is now either an IP address or a bridge name */
@@ -1547,13 +1529,10 @@ static void setup_tun_net(char *arg)
	/* Set up the tun device. */
	configure_device(ipfd, tapif, ip);

	/* Tell Guest what MAC address to use. */
	add_feature(dev, VIRTIO_NET_F_MAC);
	add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
	/* Expect Guest to handle everything except UFO */
	add_feature(dev, VIRTIO_NET_F_CSUM);
	add_feature(dev, VIRTIO_NET_F_GUEST_CSUM);
	add_feature(dev, VIRTIO_NET_F_MAC);
	add_feature(dev, VIRTIO_NET_F_GUEST_TSO4);
	add_feature(dev, VIRTIO_NET_F_GUEST_TSO6);
	add_feature(dev, VIRTIO_NET_F_GUEST_ECN);
+0 −3
Original line number Diff line number Diff line
@@ -42,9 +42,6 @@ config GENERIC_HARDIRQS
	bool
	default y

config HAVE_GET_USER_PAGES_FAST
	def_bool PPC64

config HAVE_SETUP_PER_CPU_AREA
	def_bool PPC64

+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ config X86
	select HAVE_IDE
	select HAVE_OPROFILE
	select HAVE_IOREMAP_PROT
	select HAVE_GET_USER_PAGES_FAST
	select HAVE_KPROBES
	select ARCH_WANT_OPTIONAL_GPIOLIB
	select HAVE_KRETPROBES
+1 −2
Original line number Diff line number Diff line
obj-y	:=  init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
	    pat.o pgtable.o
	    pat.o pgtable.o gup.o

obj-$(CONFIG_HAVE_GET_USER_PAGES_FAST) += gup.o
obj-$(CONFIG_X86_32)		+= pgtable_32.o

obj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o
+2 −3
Original line number Diff line number Diff line
@@ -322,11 +322,10 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)

	hp->tty = tty;

	if (hp->ops->notifier_add)
		rc = hp->ops->notifier_add(hp, hp->data);

	spin_unlock_irqrestore(&hp->lock, flags);

	if (hp->ops->notifier_add)
		rc = hp->ops->notifier_add(hp, hp->data);

	/*
	 * If the notifier fails we return an error.  The tty layer
Loading