rpms/kernel/devel kernel.spec, 1.1294.2.26, 1.1294.2.27 xen.pvops.patch, 1.1.2.20, 1.1.2.21

Michael Young myoung at fedoraproject.org
Fri May 22 18:10:31 UTC 2009


Author: myoung

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6230

Modified Files:
      Tag: private-myoung-dom0-branch
	kernel.spec xen.pvops.patch 
Log Message:
Update pvops patch and fix !PERF_COUNTERS build failure



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1294.2.26
retrieving revision 1.1294.2.27
diff -u -p -r1.1294.2.26 -r1.1294.2.27
--- kernel.spec	21 May 2009 22:11:56 -0000	1.1294.2.26
+++ kernel.spec	22 May 2009 18:09:38 -0000	1.1294.2.27
@@ -1826,8 +1826,12 @@ fi
 #	                ||----w |
 #	                ||     ||
 %changelog
+* Fri May 22 2009 Michael Young <m.a.young at durham.ac.uk>
+- update pvops patch to latest xen-tip/next version
+- pull in patch for !PERF_COUNTERS build failure
+
 * Thu May 21 2009 Michael Young <m.a.young at durham.ac.uk>
-- upadte pvops patch to latest xen-tip/next version
+- update pvops patch to latest xen-tip/next version
 
 * Thu May 21 2009 Dave Jones <davej at redhat.com>
 - 2.6.30-rc6-git6

xen.pvops.patch:

Index: xen.pvops.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.patch,v
retrieving revision 1.1.2.20
retrieving revision 1.1.2.21
diff -u -p -r1.1.2.20 -r1.1.2.21
--- xen.pvops.patch	21 May 2009 22:11:57 -0000	1.1.2.20
+++ xen.pvops.patch	22 May 2009 18:09:38 -0000	1.1.2.21
@@ -24996,7 +24996,7 @@ index 8820a73..b078352 100644
  
  #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
 diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
-index 16a5c84..a5ecc9c 100644
+index 16a5c84..dcb2963 100644
 --- a/arch/x86/include/asm/tlbflush.h
 +++ b/arch/x86/include/asm/tlbflush.h
 @@ -17,7 +17,7 @@
@@ -25023,6 +25023,26 @@ index 16a5c84..a5ecc9c 100644
  
  	raw_local_irq_restore(flags);
  }
+@@ -89,6 +89,10 @@ static inline void __flush_tlb_one(unsigned long addr)
+ 
+ #ifndef CONFIG_SMP
+ 
++static inline void __init init_smp_flush(void)
++{
++}
++
+ #define flush_tlb() __flush_tlb()
+ #define flush_tlb_all() __flush_tlb_all()
+ #define local_flush_tlb() __flush_tlb()
+@@ -129,6 +133,8 @@ static inline void reset_lazy_tlbstate(void)
+ 
+ #define local_flush_tlb() __flush_tlb()
+ 
++extern void init_smp_flush(void);
++
+ extern void flush_tlb_all(void);
+ extern void flush_tlb_current_task(void);
+ extern void flush_tlb_mm(struct mm_struct *);
 diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
 index f44b49a..066ef59 100644
 --- a/arch/x86/include/asm/topology.h
@@ -28786,10 +28806,10 @@ index 0000000..50a45db
 +}
 diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
 new file mode 100644
-index 0000000..c109819
+index 0000000..6cc1660
 --- /dev/null
 +++ b/arch/x86/kernel/cpu/perf_counter.c
-@@ -0,0 +1,1241 @@
+@@ -0,0 +1,1242 @@
 +/*
 + * Performance counter x86 architecture code
 + *
@@ -29532,6 +29552,7 @@ index 0000000..c109819
 +again:
 +	if (++loops > 100) {
 +		WARN_ONCE(1, "perfcounters: irq loop stuck!\n");
++		perf_counter_print_debug();
 +		return 1;
 +	}
 +
@@ -33882,10 +33903,10 @@ index 149b9ec..0d334dd 100644
  
 diff --git a/arch/x86/kernel/microcode_xen.c b/arch/x86/kernel/microcode_xen.c
 new file mode 100644
-index 0000000..b96356c
+index 0000000..660fea0
 --- /dev/null
 +++ b/arch/x86/kernel/microcode_xen.c
-@@ -0,0 +1,192 @@
+@@ -0,0 +1,191 @@
 +/*
 + * Xen microcode update driver
 + *
@@ -33953,7 +33974,6 @@ index 0000000..b96356c
 +	int ret;
 +
 +	if (c->x86_vendor == X86_VENDOR_INTEL) {
-+		BUG_ON(cpu != raw_smp_processor_id());
 +		snprintf(name, sizeof(name), "intel-ucode/%02x-%02x-%02x",
 +			 c->x86, c->x86_model, c->x86_mask);
 +	} else if (c->x86_vendor == X86_VENDOR_AMD) {
@@ -35366,10 +35386,18 @@ index 7e004ac..1b6e3d1 100644
  			} else {
  				printk(KERN_WARNING NAME ": Configuration Block not found\n");
 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index b415843..757377e 100644
+index b415843..ee49616 100644
 --- a/arch/x86/kernel/setup.c
 +++ b/arch/x86/kernel/setup.c
-@@ -112,6 +112,14 @@
+@@ -87,6 +87,7 @@
+ #include <asm/cacheflush.h>
+ #include <asm/processor.h>
+ #include <asm/bugs.h>
++#include <asm/tlbflush.h>
+ 
+ #include <asm/system.h>
+ #include <asm/vsyscall.h>
+@@ -112,6 +113,14 @@
  #define ARCH_SETUP
  #endif
  
@@ -35384,7 +35412,7 @@ index b415843..757377e 100644
  RESERVE_BRK(dmi_alloc, 65536);
  
  unsigned int boot_cpu_id __read_mostly;
-@@ -214,8 +222,8 @@ unsigned long mmu_cr4_features;
+@@ -214,8 +223,8 @@ unsigned long mmu_cr4_features;
  unsigned long mmu_cr4_features = X86_CR4_PAE;
  #endif
  
@@ -35395,7 +35423,7 @@ index b415843..757377e 100644
  
  /*
   * Setup options
-@@ -706,6 +714,12 @@ void __init setup_arch(char **cmdline_p)
+@@ -706,6 +715,12 @@ void __init setup_arch(char **cmdline_p)
  #endif
  	saved_video_mode = boot_params.hdr.vid_mode;
  	bootloader_type = boot_params.hdr.type_of_loader;
@@ -35408,7 +35436,7 @@ index b415843..757377e 100644
  
  #ifdef CONFIG_BLK_DEV_RAM
  	rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK;
-@@ -854,12 +868,16 @@ void __init setup_arch(char **cmdline_p)
+@@ -854,12 +869,16 @@ void __init setup_arch(char **cmdline_p)
  		max_low_pfn = max_pfn;
  
  	high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
@@ -35425,15 +35453,18 @@ index b415843..757377e 100644
  	reserve_brk();
  
  	/* max_pfn_mapped is updated here */
-@@ -905,6 +923,7 @@ void __init setup_arch(char **cmdline_p)
+@@ -905,6 +924,10 @@ void __init setup_arch(char **cmdline_p)
  #endif
  
  	initmem_init(0, max_pfn);
 +	bootmem_state = DURING_BOOTMEM;
++
++	/* Initialize cross-cpu tlb flushes */
++	init_smp_flush();
  
  #ifdef CONFIG_ACPI_SLEEP
  	/*
-@@ -997,24 +1016,6 @@ void __init setup_arch(char **cmdline_p)
+@@ -997,24 +1020,6 @@ void __init setup_arch(char **cmdline_p)
  #ifdef CONFIG_X86_32
  
  /**
@@ -39648,7 +39679,7 @@ index 0176595..2dfcbf9 100644
  {
  	int index;
 diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
-index 821e970..e69bdad 100644
+index 821e970..bb6454a 100644
 --- a/arch/x86/mm/tlb.c
 +++ b/arch/x86/mm/tlb.c
 @@ -147,13 +147,25 @@ void smp_invalidate_interrupt(struct pt_regs *regs)
@@ -39680,7 +39711,25 @@ index 821e970..e69bdad 100644
  			leave_mm(cpu);
  	}
  out:
-@@ -275,16 +287,11 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
+@@ -217,16 +229,13 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
+ 	flush_tlb_others_ipi(cpumask, mm, va);
+ }
+ 
+-static int __cpuinit init_smp_flush(void)
++void __init init_smp_flush(void)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < ARRAY_SIZE(flush_state); i++)
+ 		spin_lock_init(&flush_state[i].tlbstate_lock);
+-
+-	return 0;
+ }
+-core_initcall(init_smp_flush);
+ 
+ void flush_tlb_current_task(void)
+ {
+@@ -275,16 +284,16 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
  	preempt_enable();
  }
  
@@ -39688,17 +39737,20 @@ index 821e970..e69bdad 100644
 +void flush_tlb_all(void)
  {
 -	unsigned long cpu = smp_processor_id();
++	/* flush_tlb_others expects preempt to be disabled */
++	int cpu = get_cpu();
++
 +	flush_tlb_others(cpu_online_mask, NULL, TLB_FLUSH_ALL);
  
  	__flush_tlb_all();
  	if (percpu_read(cpu_tlbstate.state) == TLBSTATE_LAZY)
--		leave_mm(cpu);
+ 		leave_mm(cpu);
 -}
--
+ 
 -void flush_tlb_all(void)
 -{
 -	on_each_cpu(do_flush_tlb_all, NULL, 1);
-+		leave_mm(smp_processor_id());
++	put_cpu();
  }
 diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
 index 202864a..cf1a957 100644
@@ -41746,7 +41798,7 @@ index f09e8c3..2cf8543 100644
  
  	/* Start the world */
 diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
-index fba55b1..a4dd260 100644
+index fba55b1..1729178 100644
 --- a/arch/x86/xen/mmu.c
 +++ b/arch/x86/xen/mmu.c
 @@ -50,7 +50,9 @@
@@ -42108,7 +42160,7 @@ index fba55b1..a4dd260 100644
  const struct pv_mmu_ops xen_mmu_ops __initdata = {
  	.pagetable_setup_start = xen_pagetable_setup_start,
  	.pagetable_setup_done = xen_pagetable_setup_done,
-@@ -1949,13 +2118,212 @@ const struct pv_mmu_ops xen_mmu_ops __initdata = {
+@@ -1949,13 +2118,278 @@ const struct pv_mmu_ops xen_mmu_ops __initdata = {
  
  	.lazy_mode = {
  		.enter = paravirt_enter_lazy_mmu,
@@ -42319,6 +42371,72 @@ index fba55b1..a4dd260 100644
 +}
 +EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region);
 +
++#define REMAP_BATCH_SIZE 16
++
++struct remap_data {
++	unsigned long mfn;
++	pgprot_t prot;
++	struct mmu_update *mmu_update;
++};
++
++static int remap_area_mfn_pte_fn(pte_t *ptep, pgtable_t token,
++				 unsigned long addr, void *data)
++{
++	struct remap_data *rmd = data;
++	pte_t pte = pte_mkspecial(pfn_pte(rmd->mfn++, rmd->prot));
++
++	rmd->mmu_update->ptr = arbitrary_virt_to_machine(ptep).maddr;
++	rmd->mmu_update->val = pte_val_ma(pte);
++	rmd->mmu_update++;
++
++	return 0;
++}
++
++int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
++			       unsigned long addr,
++			       unsigned long mfn, int nr,
++			       pgprot_t prot, unsigned domid)
++{
++	struct remap_data rmd;
++	struct mmu_update mmu_update[REMAP_BATCH_SIZE];
++	int batch;
++	unsigned long range;
++	int err = 0;
++
++	prot = __pgprot(pgprot_val(prot) | _PAGE_IOMAP);
++
++	vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
++
++	rmd.mfn = mfn;
++	rmd.prot = prot;
++
++	while (nr) {
++		batch = min(REMAP_BATCH_SIZE, nr);
++		range = (unsigned long)batch << PAGE_SHIFT;
++
++		rmd.mmu_update = mmu_update;
++		err = apply_to_page_range(vma->vm_mm, addr, range,
++					  remap_area_mfn_pte_fn, &rmd);
++		if (err)
++			goto out;
++
++		err = -EFAULT;
++		if (HYPERVISOR_mmu_update(mmu_update, batch, NULL, domid) < 0)
++			goto out;
++
++		nr -= batch;
++		addr += range;
++	}
++
++	err = 0;
++out:
++
++	flush_tlb_all();
++
++	return err;
++}
++EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range);
++
  #ifdef CONFIG_XEN_DEBUG_FS
  
  static struct dentry *d_mmu_debug;
@@ -54359,10 +54477,10 @@ index 25275c3..4a0be9a 100644
 +xenfs-$(CONFIG_XEN_DOM0) += xenstored.o privcmd.o
 diff --git a/drivers/xen/xenfs/privcmd.c b/drivers/xen/xenfs/privcmd.c
 new file mode 100644
-index 0000000..110b062
+index 0000000..a3fee58
 --- /dev/null
 +++ b/drivers/xen/xenfs/privcmd.c
-@@ -0,0 +1,468 @@
+@@ -0,0 +1,403 @@
 +/******************************************************************************
 + * privcmd.c
 + *
@@ -54395,76 +54513,12 @@ index 0000000..110b062
 +#include <xen/interface/xen.h>
 +#include <xen/features.h>
 +#include <xen/page.h>
-+
-+#define REMAP_BATCH_SIZE 16
++#include <xen/xen-ops.h>
 +
 +#ifndef HAVE_ARCH_PRIVCMD_MMAP
 +static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma);
 +#endif
 +
-+struct remap_data {
-+	unsigned long mfn;
-+	pgprot_t prot;
-+	struct mmu_update *mmu_update;
-+};
-+
-+static int remap_area_mfn_pte_fn(pte_t *ptep, pgtable_t token,
-+				 unsigned long addr, void *data)
-+{
-+	struct remap_data *rmd = data;
-+	pte_t pte = pte_mkspecial(pfn_pte(rmd->mfn++, rmd->prot));
-+
-+	rmd->mmu_update->ptr = arbitrary_virt_to_machine(ptep).maddr;
-+	rmd->mmu_update->val = pte_val_ma(pte);
-+	rmd->mmu_update++;
-+
-+	return 0;
-+}
-+
-+static int remap_domain_mfn_range(struct vm_area_struct *vma,
-+				  unsigned long addr,
-+				  unsigned long mfn, int nr,
-+				  pgprot_t prot, unsigned domid)
-+{
-+	struct remap_data rmd;
-+	struct mmu_update mmu_update[REMAP_BATCH_SIZE];
-+	int batch;
-+	unsigned long range;
-+	int err = 0;
-+
-+	prot = __pgprot(pgprot_val(prot) | _PAGE_IOMAP);
-+
-+	vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
-+
-+	rmd.mfn = mfn;
-+	rmd.prot = prot;
-+
-+	while (nr) {
-+		batch = min(REMAP_BATCH_SIZE, nr);
-+		range = (unsigned long)batch << PAGE_SHIFT;
-+
-+		rmd.mmu_update = mmu_update;
-+		err = apply_to_page_range(vma->vm_mm, addr, range,
-+					  remap_area_mfn_pte_fn, &rmd);
-+		if (err)
-+			goto out;
-+
-+		err = -EFAULT;
-+		if (HYPERVISOR_mmu_update(mmu_update, batch, NULL, domid) < 0)
-+			goto out;
-+
-+		nr -= batch;
-+		addr += range;
-+	}
-+
-+	err = 0;
-+out:
-+
-+	flush_tlb_all();
-+
-+	return err;
-+}
-+
 +static long privcmd_ioctl_hypercall(void __user *udata)
 +{
 +	privcmd_hypercall_t hypercall;
@@ -54597,11 +54651,11 @@ index 0000000..110b062
 +	    ((msg->va+(msg->npages<<PAGE_SHIFT)) > vma->vm_end))
 +		return -EINVAL;
 +
-+	rc = remap_domain_mfn_range(vma,
-+				    msg->va & PAGE_MASK,
-+				    msg->mfn, msg->npages,
-+				    vma->vm_page_prot,
-+				    st->domain);
++	rc = xen_remap_domain_mfn_range(vma,
++					msg->va & PAGE_MASK,
++					msg->mfn, msg->npages,
++					vma->vm_page_prot,
++					st->domain);
 +	if (rc < 0)
 +		return rc;
 +
@@ -54679,9 +54733,8 @@ index 0000000..110b062
 +	xen_pfn_t *mfnp = data;
 +	struct mmap_batch_state *st = state;
 +
-+	if (remap_domain_mfn_range(st->vma, st->va & PAGE_MASK,
-+				   *mfnp, 1,
-+				   st->vma->vm_page_prot, st->domain) < 0) {
++	if (xen_remap_domain_mfn_range(st->vma, st->va & PAGE_MASK, *mfnp, 1,
++				       st->vma->vm_page_prot, st->domain) < 0) {
 +		*mfnp |= 0xf0000000U;
 +		st->err++;
 +	}
@@ -56896,10 +56949,10 @@ index 72698d8..75b0645 100644
  #endif /* LINUX_PCI_H */
 diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
 new file mode 100644
-index 0000000..c8c1dfc
+index 0000000..9ab322b
 --- /dev/null
 +++ b/include/linux/perf_counter.h
-@@ -0,0 +1,642 @@
+@@ -0,0 +1,651 @@
 +/*
 + *  Performance counters:
 + *
@@ -57160,6 +57213,14 @@ index 0000000..c8c1dfc
 +	PERF_EVENT_COMM			= 3,
 +
 +	/*
++	 * struct {
++	 * 	struct perf_event_header	header;
++	 * 	u64				irq_period;
++	 * };
++	 */
++	PERF_EVENT_PERIOD		= 4,
++
++	/*
 +	 * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field
 +	 * will be PERF_RECORD_*
 +	 *
@@ -57511,7 +57572,8 @@ index 0000000..c8c1dfc
 +static inline void
 +perf_counter_task_sched_in(struct task_struct *task, int cpu)		{ }
 +static inline void
-+perf_counter_task_sched_out(struct task_struct *task, int cpu)		{ }
++perf_counter_task_sched_out(struct task_struct *task,
++                          struct task_struct *next, int cpu)		{ }
 +static inline void
 +perf_counter_task_tick(struct task_struct *task, int cpu)		{ }
 +static inline void perf_counter_init_task(struct task_struct *child)	{ }
@@ -62328,10 +62390,10 @@ index 0000000..75d1da1
 +
 +#endif /* _XEN_SWIOTLB_H */
 diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
-index 883a21b..d789c93 100644
+index 883a21b..9769738 100644
 --- a/include/xen/xen-ops.h
 +++ b/include/xen/xen-ops.h
-@@ -14,4 +14,10 @@ void xen_mm_unpin_all(void);
+@@ -14,4 +14,15 @@ void xen_mm_unpin_all(void);
  void xen_timer_resume(void);
  void xen_arch_resume(void);
  
@@ -62340,6 +62402,11 @@ index 883a21b..d789c93 100644
 +				unsigned int address_bits);
 +
 +void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order);
++int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
++			       unsigned long addr,
++			       unsigned long mfn, int nr,
++			       pgprot_t prot, unsigned domid);
++
 +
  #endif /* INCLUDE_XEN_OPS_H */
 diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
@@ -62574,7 +62641,7 @@ index 42d5654..f6c204f 100644
  
  /* compat_time_t is a 32 bit "long" and needs to get converted. */
 diff --git a/kernel/exit.c b/kernel/exit.c
-index abf9cf3..700d110 100644
+index abf9cf3..c1cd352 100644
 --- a/kernel/exit.c
 +++ b/kernel/exit.c
 @@ -48,7 +48,7 @@
@@ -62607,21 +62674,28 @@ index abf9cf3..700d110 100644
  	trace_sched_process_free(tsk);
  	put_task_struct(tsk);
  }
-@@ -174,6 +173,13 @@ repeat:
+@@ -174,6 +173,7 @@ repeat:
  	atomic_dec(&__task_cred(p)->user->processes);
  
  	proc_flush_task(p);
 +
+ 	write_lock_irq(&tasklist_lock);
+ 	tracehook_finish_release_task(p);
+ 	__exit_signal(p);
+@@ -975,16 +975,19 @@ NORET_TYPE void do_exit(long code)
+ 		module_put(tsk->binfmt->module);
+ 
+ 	proc_exit_connector(tsk);
++
 +	/*
 +	 * Flush inherited counters to the parent - before the parent
 +	 * gets woken up by child-exit notifications.
 +	 */
-+	perf_counter_exit_task(p);
++	perf_counter_exit_task(tsk);
 +
- 	write_lock_irq(&tasklist_lock);
- 	tracehook_finish_release_task(p);
- 	__exit_signal(p);
-@@ -981,10 +987,6 @@ NORET_TYPE void do_exit(long code)
+ 	exit_notify(tsk, group_dead);
+ #ifdef CONFIG_NUMA
+ 	mpol_put(tsk->mempolicy);
  	tsk->mempolicy = NULL;
  #endif
  #ifdef CONFIG_FUTEX
@@ -62632,19 +62706,6 @@ index abf9cf3..700d110 100644
  	if (unlikely(!list_empty(&tsk->pi_state_list)))
  		exit_pi_state_list(tsk);
  	if (unlikely(current->pi_state_cache))
-@@ -1251,6 +1253,12 @@ static int wait_task_zombie(struct task_struct *p, int options,
- 	 */
- 	read_unlock(&tasklist_lock);
- 
-+	/*
-+	 * Flush inherited counters to the parent - before the parent
-+	 * gets woken up by child-exit notifications.
-+	 */
-+	perf_counter_exit_task(p);
-+
- 	retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0;
- 	status = (p->signal->flags & SIGNAL_GROUP_EXIT)
- 		? p->signal->group_exit_code : p->exit_code;
 diff --git a/kernel/fork.c b/kernel/fork.c
 index b9e2edd..60a473e 100644
 --- a/kernel/fork.c
@@ -62731,7 +62792,7 @@ index b9e2edd..60a473e 100644
  	mmap_init();
  }
 diff --git a/kernel/futex.c b/kernel/futex.c
-index d546b2d..9231ad7 100644
+index d546b2d..80b5ce7 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
 @@ -19,6 +19,10 @@
@@ -62973,7 +63034,7 @@ index d546b2d..9231ad7 100644
  				ret = -EINVAL;
  				break;
  			}
-@@ -802,21 +959,185 @@ out:
+@@ -802,24 +959,185 @@ out:
  	return ret;
  }
  
@@ -63147,7 +63208,6 @@ index d546b2d..9231ad7 100644
 +	}
  
  retry:
-+<<<<<<< HEAD:kernel/futex.c
 +	if (pi_state != NULL) {
 +		/*
 +		 * We will have to lookup the pi_state again, so free this one
@@ -63157,14 +63217,16 @@ index d546b2d..9231ad7 100644
 +		pi_state = NULL;
 +	}
 +
-+	ret = get_futex_key(uaddr1, fshared, &key1);
-+=======
  	ret = get_futex_key(uaddr1, fshared, &key1, VERIFY_READ);
-+>>>>>>> linux/master:kernel/futex.c
  	if (unlikely(ret != 0))
  		goto out;
- 	ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_READ);
-@@ -854,32 +1175,99 @@ retry_private:
+-	ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_READ);
++	ret = get_futex_key(uaddr2, fshared, &key2,
++			    requeue_pi ? VERIFY_WRITE : VERIFY_READ);
+ 	if (unlikely(ret != 0))
+ 		goto out_put_key1;
+ 
+@@ -854,32 +1172,99 @@ retry_private:
  		}
  	}
  
@@ -63284,7 +63346,7 @@ index d546b2d..9231ad7 100644
  	}
  
  out_unlock:
-@@ -899,7 +1287,9 @@ out_put_keys:
+@@ -899,7 +1284,9 @@ out_put_keys:
  out_put_key1:
  	put_futex_key(fshared, &key1);
  out:
@@ -63295,7 +63357,7 @@ index d546b2d..9231ad7 100644
  }
  
  /* The key must be already stored in q->key. */
-@@ -907,8 +1297,6 @@ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q)
+@@ -907,8 +1294,6 @@ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q)
  {
  	struct futex_hash_bucket *hb;
  
@@ -63304,14 +63366,13 @@ index d546b2d..9231ad7 100644
  	get_futex_key_refs(&q->key);
  	hb = hash_futex(&q->key);
  	q->lock_ptr = &hb->lock;
-@@ -1119,35 +1507,159 @@ handle_fault:
+@@ -1119,35 +1504,149 @@ handle_fault:
   */
  #define FLAGS_SHARED		0x01
  #define FLAGS_CLOCKRT		0x02
 +#define FLAGS_HAS_TIMEOUT	0x04
  
  static long futex_wait_restart(struct restart_block *restart);
-+static long futex_lock_pi_restart(struct restart_block *restart);
  
 -static int futex_wait(u32 __user *uaddr, int fshared,
 -		      u32 val, ktime_t *abs_time, u32 bitset, int clockrt)
@@ -63343,13 +63404,11 @@ index d546b2d..9231ad7 100644
 -	int ret;
 -	struct hrtimer_sleeper t;
 -	int rem = 0;
--
--	if (!bitset)
--		return -EINVAL;
 +	struct task_struct *owner;
 +	int ret = 0;
  
-+<<<<<<< HEAD:kernel/futex.c
+-	if (!bitset)
+-		return -EINVAL;
 +	if (locked) {
 +		/*
 +		 * Got the lock. We might not be the anticipated owner if we
@@ -63357,19 +63416,15 @@ index d546b2d..9231ad7 100644
 +		 */
 +		if (q->pi_state->owner != current)
 +			ret = fixup_pi_state_owner(uaddr, q, current, fshared);
-+=======
- 	q.pi_state = NULL;
- 	q.bitset = bitset;
- retry:
- 	q.key = FUTEX_KEY_INIT;
- 	ret = get_futex_key(uaddr, fshared, &q.key, VERIFY_READ);
- 	if (unlikely(ret != 0))
-+>>>>>>> linux/master:kernel/futex.c
- 		goto out;
++		goto out;
 +	}
  
--retry_private:
--	hb = queue_lock(&q);
+-	q.pi_state = NULL;
+-	q.bitset = bitset;
+-retry:
+-	q.key = FUTEX_KEY_INIT;
+-	ret = get_futex_key(uaddr, fshared, &q.key, VERIFY_READ);
+-	if (unlikely(ret != 0))
 +	/*
 +	 * Catch the rare case, where the lock was released when we were on the
 +	 * way back before we locked the hash bucket.
@@ -63394,9 +63449,11 @@ index d546b2d..9231ad7 100644
 +		 */
 +		owner = rt_mutex_owner(&q->pi_state->pi_mutex);
 +		ret = fixup_pi_state_owner(uaddr, q, owner, fshared);
-+		goto out;
+ 		goto out;
 +	}
-+
+ 
+-retry_private:
+-	hb = queue_lock(&q);
 +	/*
 +	 * Paranoia check. If we did not take the lock, then we should not be
 +	 * the owner, nor the pending owner, of the rt_mutex.
@@ -63480,7 +63537,7 @@ index d546b2d..9231ad7 100644
  
  	/*
  	 * Access the page AFTER the hash-bucket is locked.
-@@ -1165,95 +1677,83 @@ retry_private:
+@@ -1165,95 +1664,83 @@ retry_private:
  	 * A consequence is that futex_wait() can return zero and absorb
  	 * a wakeup when *uaddr != val on entry to the syscall.  This is
  	 * rare, but normal.
@@ -63490,7 +63547,7 @@ index d546b2d..9231ad7 100644
  	 */
 +retry:
 +	q->key = FUTEX_KEY_INIT;
-+	ret = get_futex_key(uaddr, fshared, &q->key);
++	ret = get_futex_key(uaddr, fshared, &q->key, VERIFY_READ);
 +	if (unlikely(ret != 0))
 +		return ret;
 +
@@ -63626,7 +63683,7 @@ index d546b2d..9231ad7 100644
  		goto out_put_key;
  
  	/*
-@@ -1270,7 +1770,7 @@ retry_private:
+@@ -1270,7 +1757,7 @@ retry_private:
  	restart->futex.val = val;
  	restart->futex.time = abs_time->tv64;
  	restart->futex.bitset = bitset;
@@ -63635,7 +63692,7 @@ index d546b2d..9231ad7 100644
  
  	if (fshared)
  		restart->futex.flags |= FLAGS_SHARED;
-@@ -1282,6 +1782,10 @@ retry_private:
+@@ -1282,6 +1769,10 @@ retry_private:
  out_put_key:
  	put_futex_key(fshared, &q.key);
  out:
@@ -63646,7 +63703,7 @@ index d546b2d..9231ad7 100644
  	return ret;
  }
  
-@@ -1290,13 +1794,16 @@ static long futex_wait_restart(struct restart_block *restart)
+@@ -1290,13 +1781,16 @@ static long futex_wait_restart(struct restart_block *restart)
  {
  	u32 __user *uaddr = (u32 __user *)restart->futex.uaddr;
  	int fshared = 0;
@@ -63666,7 +63723,7 @@ index d546b2d..9231ad7 100644
  				restart->futex.bitset,
  				restart->futex.flags & FLAGS_CLOCKRT);
  }
-@@ -1312,11 +1819,10 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
+@@ -1312,11 +1806,10 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
  			 int detect, ktime_t *time, int trylock)
  {
  	struct hrtimer_sleeper timeout, *to = NULL;
@@ -63680,7 +63737,7 @@ index d546b2d..9231ad7 100644
  
  	if (refill_pi_state_cache())
  		return -ENOMEM;
-@@ -1330,6 +1836,7 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
+@@ -1330,6 +1823,7 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
  	}
  
  	q.pi_state = NULL;
@@ -63688,7 +63745,7 @@ index d546b2d..9231ad7 100644
  retry:
  	q.key = FUTEX_KEY_INIT;
  	ret = get_futex_key(uaddr, fshared, &q.key, VERIFY_WRITE);
-@@ -1339,81 +1846,15 @@ retry:
+@@ -1339,81 +1833,15 @@ retry:
  retry_private:
  	hb = queue_lock(&q);
  
@@ -63777,7 +63834,7 @@ index d546b2d..9231ad7 100644
  		case -EAGAIN:
  			/*
  			 * Task is exiting and we just wait for the
-@@ -1423,25 +1864,6 @@ retry_locked:
+@@ -1423,25 +1851,6 @@ retry_locked:
  			put_futex_key(fshared, &q.key);
  			cond_resched();
  			goto retry;
@@ -63803,7 +63860,7 @@ index d546b2d..9231ad7 100644
  		default:
  			goto out_unlock_put_key;
  		}
-@@ -1465,71 +1887,21 @@ retry_locked:
+@@ -1465,71 +1874,21 @@ retry_locked:
  	}
  
  	spin_lock(q.lock_ptr);
@@ -63888,7 +63945,7 @@ index d546b2d..9231ad7 100644
  	 */
  	if (ret && (rt_mutex_owner(&q.pi_state->pi_mutex) == current))
  		rt_mutex_unlock(&q.pi_state->pi_mutex);
-@@ -1537,9 +1909,7 @@ retry_locked:
+@@ -1537,9 +1896,7 @@ retry_locked:
  	/* Unqueue and drop the lock */
  	unqueue_me_pi(&q);
  
@@ -63899,7 +63956,7 @@ index d546b2d..9231ad7 100644
  
  out_unlock_put_key:
  	queue_unlock(&q, hb);
-@@ -1549,7 +1919,7 @@ out_put_key:
+@@ -1549,7 +1906,7 @@ out_put_key:
  out:
  	if (to)
  		destroy_hrtimer_on_stack(&to->timer);
@@ -63908,28 +63965,15 @@ index d546b2d..9231ad7 100644
  
  uaddr_faulted:
  	/*
-@@ -1572,6 +1942,20 @@ uaddr_faulted:
+@@ -1572,7 +1929,6 @@ uaddr_faulted:
  	goto retry;
  }
  
-+static long futex_lock_pi_restart(struct restart_block *restart)
-+{
-+	u32 __user *uaddr = (u32 __user *)restart->futex.uaddr;
-+	ktime_t t, *tp = NULL;
-+	int fshared = restart->futex.flags & FLAGS_SHARED;
-+
-+	if (restart->futex.flags & FLAGS_HAS_TIMEOUT) {
-+		t.tv64 = restart->futex.time;
-+		tp = &t;
-+	}
-+	restart->fn = do_no_restart_syscall;
-+
-+	return (long)futex_lock_pi(uaddr, fshared, restart->futex.val, tp, 0);
-+}
- 
+-
  /*
   * Userspace attempted a TID -> 0 atomic transition, and failed.
-@@ -1674,6 +2058,252 @@ pi_faulted:
+  * This is the in-kernel slowpath: we look up the PI state (if any),
+@@ -1674,6 +2030,229 @@ pi_faulted:
  	return ret;
  }
  
@@ -63947,7 +63991,7 @@ index d546b2d..9231ad7 100644
 + *
 + * Returns
 + *  0 - no early wakeup detected
-+ * <0 - -ETIMEDOUT or -ERESTARTSYS (FIXME: or ERESTARTNOINTR?)
++ * <0 - -ETIMEDOUT or -ERESTARTNOINTR
 + */
 +static inline
 +int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
@@ -63974,15 +64018,8 @@ index d546b2d..9231ad7 100644
 +
 +		if (timeout && !timeout->task)
 +			ret = -ETIMEDOUT;
-+		else {
-+			/*
-+			 * We expect signal_pending(current), but another
-+			 * thread may have handled it for us already.
-+			 */
-+			/* FIXME: ERESTARTSYS or ERESTARTNOINTR?  Do we care if
-+			 * the user specified SA_RESTART or not? */
-+			ret = -ERESTARTSYS;
-+		}
++		else
++			ret = -ERESTARTNOINTR;
 +	}
 +	return ret;
 +}
@@ -64035,12 +64072,10 @@ index d546b2d..9231ad7 100644
 +	struct hrtimer_sleeper timeout, *to = NULL;
 +	struct rt_mutex_waiter rt_waiter;
 +	struct rt_mutex *pi_mutex = NULL;
-+	struct restart_block *restart;
 +	struct futex_hash_bucket *hb;
 +	union futex_key key2;
 +	struct futex_q q;
 +	int res, ret;
-+	u32 uval;
 +
 +	if (!bitset)
 +		return -EINVAL;
@@ -64066,16 +64101,14 @@ index d546b2d..9231ad7 100644
 +	q.rt_waiter = &rt_waiter;
 +
 +	key2 = FUTEX_KEY_INIT;
-+	ret = get_futex_key(uaddr2, fshared, &key2);
++	ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE);
 +	if (unlikely(ret != 0))
 +		goto out;
 +
 +	/* Prepare to wait on uaddr. */
 +	ret = futex_wait_setup(uaddr, val, fshared, &q, &hb);
-+	if (ret) {
-+		put_futex_key(fshared, &key2);
-+		goto out;
-+	}
++	if (ret)
++		goto out_key2;
 +
 +	/* Queue the futex_q, drop the hb lock, wait for wakeup. */
 +	futex_wait_queue_me(hb, &q, to);
@@ -64141,34 +64174,22 @@ index d546b2d..9231ad7 100644
 +		if (rt_mutex_owner(pi_mutex) == current)
 +			rt_mutex_unlock(pi_mutex);
 +	} else if (ret == -EINTR) {
-+		ret = -EFAULT;
-+		if (get_user(uval, uaddr2))
-+			goto out_put_keys;
-+
 +		/*
-+		 * We've already been requeued, so restart by calling
-+		 * futex_lock_pi() directly, rather then returning to this
-+		 * function.
++		 * We've already been requeued, but we have no way to
++		 * restart by calling futex_lock_pi() directly. We
++		 * could restart the syscall, but that will look at
++		 * the user space value and return right away. So we
++		 * drop back with EWOULDBLOCK to tell user space that
++		 * "val" has been changed. That's the same what the
++		 * restart of the syscall would do in
++		 * futex_wait_setup().
 +		 */
-+		ret = -ERESTART_RESTARTBLOCK;
-+		restart = &current_thread_info()->restart_block;
-+		restart->fn = futex_lock_pi_restart;
-+		restart->futex.uaddr = (u32 *)uaddr2;
-+		restart->futex.val = uval;
-+		restart->futex.flags = 0;
-+		if (abs_time) {
-+			restart->futex.flags |= FLAGS_HAS_TIMEOUT;
-+			restart->futex.time = abs_time->tv64;
-+		}
-+
-+		if (fshared)
-+			restart->futex.flags |= FLAGS_SHARED;
-+		if (clockrt)
-+			restart->futex.flags |= FLAGS_CLOCKRT;
++		ret = -EWOULDBLOCK;
 +	}
 +
 +out_put_keys:
 +	put_futex_key(fshared, &q.key);
++out_key2:
 +	put_futex_key(fshared, &key2);
 +
 +out:
@@ -64182,7 +64203,7 @@ index d546b2d..9231ad7 100644
  /*
   * Support for robust futexes: the kernel cleans up held futexes at
   * thread exit time.
-@@ -1896,7 +2526,7 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
+@@ -1896,7 +2475,7 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
  		fshared = 1;
  
  	clockrt = op & FUTEX_CLOCK_REALTIME;
@@ -64191,7 +64212,7 @@ index d546b2d..9231ad7 100644
  		return -ENOSYS;
  
  	switch (cmd) {
-@@ -1911,10 +2541,11 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
+@@ -1911,10 +2490,11 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
  		ret = futex_wake(uaddr, fshared, val, val3);
  		break;
  	case FUTEX_REQUEUE:
@@ -64205,7 +64226,7 @@ index d546b2d..9231ad7 100644
  		break;
  	case FUTEX_WAKE_OP:
  		ret = futex_wake_op(uaddr, fshared, uaddr2, val, val2, val3);
-@@ -1931,6 +2562,15 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
+@@ -1931,6 +2511,15 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
  		if (futex_cmpxchg_enabled)
  			ret = futex_lock_pi(uaddr, fshared, 0, timeout, 1);
  		break;
@@ -64221,7 +64242,7 @@ index d546b2d..9231ad7 100644
  	default:
  		ret = -ENOSYS;
  	}
-@@ -1948,7 +2588,8 @@ SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
+@@ -1948,7 +2537,8 @@ SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
  	int cmd = op & FUTEX_CMD_MASK;
  
  	if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI ||
@@ -64231,7 +64252,7 @@ index d546b2d..9231ad7 100644
  		if (copy_from_user(&ts, utime, sizeof(ts)) != 0)
  			return -EFAULT;
  		if (!timespec_valid(&ts))
-@@ -1960,11 +2601,11 @@ SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
+@@ -1960,11 +2550,11 @@ SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
  		tp = &t;
  	}
  	/*
@@ -64941,10 +64962,10 @@ index 507cf2b..947b3ad 100644
 +EXPORT_SYMBOL(atomic_dec_and_mutex_lock);
 diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
 new file mode 100644
-index 0000000..59a926d
+index 0000000..08584c1
 --- /dev/null
 +++ b/kernel/perf_counter.c
-@@ -0,0 +1,3526 @@
+@@ -0,0 +1,3584 @@
 +/*
 + * Performance counter core code
 + *
@@ -65155,18 +65176,17 @@ index 0000000..59a926d
 +		return;
 +
 +	spin_lock_irqsave(&ctx->lock, flags);
++	/*
++	 * Protect the list operation against NMI by disabling the
++	 * counters on a global level.
++	 */
++	perf_disable();
 +
 +	counter_sched_out(counter, cpuctx, ctx);
 +
 +	counter->task = NULL;
 +
-+	/*
-+	 * Protect the list operation against NMI by disabling the
-+	 * counters on a global level. NOP for non NMI based counters.
-+	 */
-+	perf_disable();
 +	list_del_counter(counter, ctx);
-+	perf_enable();
 +
 +	if (!ctx->task) {
 +		/*
@@ -65178,6 +65198,7 @@ index 0000000..59a926d
 +			    perf_max_counters - perf_reserved_percpu);
 +	}
 +
++	perf_enable();
 +	spin_unlock_irqrestore(&ctx->lock, flags);
 +}
 +
@@ -65773,8 +65794,12 @@ index 0000000..59a926d
 +
 +	perf_disable();
 +	if (ctx->nr_active) {
-+		list_for_each_entry(counter, &ctx->counter_list, list_entry)
-+			group_sched_out(counter, cpuctx, ctx);
++		list_for_each_entry(counter, &ctx->counter_list, list_entry) {
++			if (counter != counter->group_leader)
++				counter_sched_out(counter, cpuctx, ctx);
++			else
++				group_sched_out(counter, cpuctx, ctx);
++		}
 +	}
 +	perf_enable();
 + out:
@@ -65850,8 +65875,12 @@ index 0000000..59a926d
 +		if (counter->cpu != -1 && counter->cpu != cpu)
 +			continue;
 +
-+		if (group_can_go_on(counter, cpuctx, 1))
-+			group_sched_in(counter, cpuctx, ctx, cpu);
++		if (counter != counter->group_leader)
++			counter_sched_in(counter, cpuctx, ctx, cpu);
++		else {
++			if (group_can_go_on(counter, cpuctx, 1))
++				group_sched_in(counter, cpuctx, ctx, cpu);
++		}
 +
 +		/*
 +		 * If this pinned group hasn't been scheduled,
@@ -65879,9 +65908,14 @@ index 0000000..59a926d
 +		if (counter->cpu != -1 && counter->cpu != cpu)
 +			continue;
 +
-+		if (group_can_go_on(counter, cpuctx, can_add_hw)) {
-+			if (group_sched_in(counter, cpuctx, ctx, cpu))
++		if (counter != counter->group_leader) {
++			if (counter_sched_in(counter, cpuctx, ctx, cpu))
 +				can_add_hw = 0;
++		} else {
++			if (group_can_go_on(counter, cpuctx, can_add_hw)) {
++				if (group_sched_in(counter, cpuctx, ctx, cpu))
++					can_add_hw = 0;
++			}
 +		}
 +	}
 +	perf_enable();
@@ -65993,7 +66027,9 @@ index 0000000..59a926d
 +	return 0;
 +}
 +
-+void perf_adjust_freq(struct perf_counter_context *ctx)
++static void perf_log_period(struct perf_counter *counter, u64 period);
++
++static void perf_adjust_freq(struct perf_counter_context *ctx)
 +{
 +	struct perf_counter *counter;
 +	u64 irq_period;
@@ -66019,6 +66055,8 @@ index 0000000..59a926d
 +		if (!irq_period)
 +			irq_period = 1;
 +
++		perf_log_period(counter, irq_period);
++
 +		counter->hw.irq_period = irq_period;
 +		counter->hw.interrupts = 0;
 +	}
@@ -67354,6 +67392,40 @@ index 0000000..59a926d
 +}
 +
 +/*
++ *
++ */
++
++static void perf_log_period(struct perf_counter *counter, u64 period)
++{
++	struct perf_output_handle handle;
++	int ret;
++
++	struct {
++		struct perf_event_header	header;
++		u64				time;
++		u64				period;
++	} freq_event = {
++		.header = {
++			.type = PERF_EVENT_PERIOD,
++			.misc = 0,
++			.size = sizeof(freq_event),
++		},
++		.time = sched_clock(),
++		.period = period,
++	};
++
++	if (counter->hw.irq_period == period)
++		return;
++
++	ret = perf_output_begin(&handle, counter, sizeof(freq_event), 0, 0);
++	if (ret)
++		return;
++
++	perf_output_put(&handle, freq_event);
++	perf_output_end(&handle);
++}
++
++/*
 + * Generic counter overflow handling.
 + */
 +
@@ -67625,7 +67697,8 @@ index 0000000..59a926d
 +
 +static void cpu_clock_perf_counter_disable(struct perf_counter *counter)
 +{
-+	hrtimer_cancel(&counter->hw.hrtimer);
++	if (counter->hw.irq_period)
++		hrtimer_cancel(&counter->hw.hrtimer);
 +	cpu_clock_perf_counter_update(counter);
 +}
 +
@@ -67676,7 +67749,8 @@ index 0000000..59a926d
 +
 +static void task_clock_perf_counter_disable(struct perf_counter *counter)
 +{
-+	hrtimer_cancel(&counter->hw.hrtimer);
++	if (counter->hw.irq_period)
++		hrtimer_cancel(&counter->hw.hrtimer);
 +	task_clock_perf_counter_update(counter, counter->ctx->time);
 +
 +}
@@ -68246,6 +68320,8 @@ index 0000000..59a926d
 +	struct perf_counter *child_counter, *tmp;
 +	struct perf_counter_context *child_ctx;
 +
++	WARN_ON_ONCE(child != current);
++
 +	child_ctx = &child->perf_counter_ctx;
 +
 +	if (likely(!child_ctx->nr_counters))
@@ -68297,7 +68373,10 @@ index 0000000..59a926d
 +	 * We dont have to disable NMIs - we are only looking at
 +	 * the list, not manipulating it:
 +	 */
-+	list_for_each_entry(counter, &parent_ctx->counter_list, list_entry) {
++	list_for_each_entry_rcu(counter, &parent_ctx->event_list, event_entry) {
++		if (counter != counter->group_leader)
++			continue;
++
 +		if (!counter->hw_event.inherit)
 +			continue;
 +
@@ -74959,7 +75038,7 @@ index fd78bee..5e32e37 100644
  		TRACE_FIELD(int, state_data.state, state)
  	),
 diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
-index 576f4fa..07ed45e 100644
+index 576f4fa..9d27f81 100644
 --- a/kernel/trace/trace_events.c
 +++ b/kernel/trace/trace_events.c
 @@ -8,19 +8,25 @@
@@ -75635,10 +75714,10 @@ index 576f4fa..07ed45e 100644
 -			   "'%s/format' entry\n", call->name);
 +	entry = trace_create_file("format", 0444, call->dir, call,
 +				  format);
-+
-+	return 0;
-+}
-+
+ 
+ 	return 0;
+ }
+ 
 +#define for_each_event(event, start, end)			\
 +	for (event = start;					\
 +	     (unsigned long)event < (unsigned long)end;		\
@@ -75789,9 +75868,9 @@ index 576f4fa..07ed45e 100644
 +		break;
 +	}
 +	mutex_unlock(&event_mutex);
- 
- 	return 0;
- }
++
++	return 0;
++}
 +#else
 +static int trace_module_notify(struct notifier_block *self,
 +			       unsigned long val, void *data)
@@ -75807,7 +75886,7 @@ index 576f4fa..07ed45e 100644
 +
 +extern struct ftrace_event_call __start_ftrace_events[];
 +extern struct ftrace_event_call __stop_ftrace_events[];
- 
++
  static __init int event_trace_init(void)
  {
 -	struct ftrace_event_call *call = __start_ftrace_events;
@@ -75848,7 +75927,7 @@ index 576f4fa..07ed45e 100644
  	}
  
 +	ret = register_module_notifier(&trace_module_nb);
-+	if (!ret)
++	if (ret)
 +		pr_warning("Failed to register trace events module notifier\n");
 +
  	return 0;




More information about the fedora-extras-commits mailing list