Skip to contentSkip to conversation

Linux 2.6.32.34

DISCUSSION Greg KH 6 participants 10 messages Mar 23, 2011 – Mar 24, 2011

Subsystems (25)
Networking x86 USB Sound +21 more subsystems
lore
Share & tools
lore

Greg KH

author
#0 lore raw

I'm announcing the release of the 2.6.32.34 kernel.

All users of the 2.6.32 kernel series must upgrade.

The updated 2.6.32.y git tree can be found at:

        git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.32.y.git
and can be browsed at the normal kernel.org git web browser:
        http://git.kernel.org/?p=linux/kernel/git/longterm/linux-2.6.32.y.git;a=summary

thanks,

greg k-h

------------

 Documentation/i2c/instantiating-devices |    2 
 Makefile                                |    2 
 arch/mips/alchemy/mtx-1/platform.c      |    9 ++
 arch/parisc/kernel/irq.c                |    2 
 arch/powerpc/include/asm/kexec.h        |    4 +
 arch/powerpc/include/asm/paca.h         |    3 
 arch/powerpc/include/asm/reg.h          |    1 
 arch/powerpc/kernel/asm-offsets.c       |    1 
 arch/powerpc/kernel/crash.c             |   27 +++++++
 arch/powerpc/kernel/machine_kexec_64.c  |   48 +++++++++----
 arch/powerpc/kernel/misc_64.S           |    8 +-
 arch/powerpc/kernel/paca.c              |    2 
 arch/powerpc/kernel/perf_event.c        |   24 ++++++
 arch/powerpc/kernel/rtas_flash.c        |   39 +++++------
 arch/x86/include/asm/pgtable-3level.h   |   11 ---
 arch/x86/kernel/e820.c                  |   10 ++
 arch/x86/kernel/early-quirks.c          |    7 +
 arch/x86/kernel/entry_64.S              |    2 
 arch/x86/mm/fault.c                     |    7 +
 arch/x86/mm/pgtable.c                   |    3 
 drivers/ata/ahci.c                      |    5 +
 drivers/ata/libata-core.c               |   24 ++++--
 drivers/hwmon/f71882fg.c                |    2 
 drivers/hwmon/sht15.c                   |    4 -
 drivers/infiniband/core/cm.c            |    1 
 drivers/infiniband/core/cma.c           |   15 ++++
 drivers/isdn/i4l/isdn_tty.c             |    6 -
 drivers/mmc/core/sdio.c                 |    8 ++
 drivers/mtd/nand/omap2.c                |    2 
 drivers/mtd/onenand/generic.c           |    2 
 drivers/mtd/onenand/omap2.c             |    2 
 drivers/net/wireless/ath/ath9k/hw.c     |    4 -
 drivers/pci/pci-sysfs.c                 |    2 
 drivers/pci/quirks.c                    |  113 +++++++++++++++-----------------
 drivers/usb/host/xhci-ring.c            |   14 +++
 drivers/usb/serial/ch341.c              |    1 
 drivers/usb/serial/kobil_sct.c          |    2 
 fs/ext3/namei.c                         |    2 
 include/linux/ftrace.h                  |    2 
 kernel/perf_event.c                     |    2 
 kernel/sched.c                          |    2 
 kernel/smp.c                            |   55 ++++++++++++---
 kernel/trace/ftrace.c                   |   52 ++++++++++++--
 net/sunrpc/sched.c                      |   14 +--
 sound/pci/ctxfi/ctatc.c                 |    2 
 sound/pci/ctxfi/ctdaio.c                |    2 
 sound/pci/ctxfi/ctmixer.c               |   19 +----
 sound/pci/hda/patch_sigmatel.c          |   11 ++-
 48 files changed, 397 insertions(+), 185 deletions(-)

Alexander van Heukelum (1):
x86, binutils, xen: Fix another wrong size directive

Andreas Herrmann (1):
x86, quirk: Fix SB600 revision check

Andrey Vagin (1):
x86/mm: Handle mm_fault_error() in kernel space

Anton Blanchard (1):
perf, powerpc: Handle events that raise an exception without overflowing

Axel Lin (1):
mtd: add "platform:" prefix for platform modalias

Ben Hutchings (1):
PCI: sysfs: Fix failure path for addition of "vpd" attribute

Brandeburg, Jesse (1):
PCI: remove quirk for pre-production systems

Eric Sandeen (1):
ext3: Always set dx_node's fake_dirent explicitly.

Florian Fainelli (1):
MIPS: MTX-1: Make au1000_eth probe all PHY addresses

Frederic Weisbecker (1):
perf: Handle stopped state with tracepoints

Greg Kroah-Hartman (1):

      Linux 2.6.32.34

Hans de Goede (1):
hwmon/f71882fg: Set platform drvdata to NULL later

Jiri Slaby (3):
USB: serial/kobil_sct, fix potential tty NULL dereference
PCI: add more checking to ICH region quirks
PCI: do not create quirk I/O regions below PCIBIOS_MIN_IO for ICH

Kamal Mostafa (2):
x86: Fix panic when handling "mem={invalid}" param
x86: Emit "mem=nopentium ignored" warning when not supported

Michael Neuling (2):
powerpc/kexec: Fix race in kexec shutdown
powerpc/kdump: Fix race in kdump shutdown

Milton Miller (4):
call_function_many: fix list delete vs add race
call_function_many: add missing ordering
smp_call_function_many: handle concurrent clearing of mask
powerpc: rtas_flash needs to use rtas_data_buf

Przemyslaw Bruski (3):
ALSA: ctxfi - Fix incorrect SPDIF status bit mask
ALSA: ctxfi - Fix SPDIF status retrieval
ALSA: ctxfi - Clear input settings before initialization

Roman Fietze (1):
i2c: Fix typo in instantiating-devices document

Sarah Sharp (1):
xhci: Fix cycle bit calculation during stall handling.

Sean Hefty (2):
RDMA/cma: Fix crash in request handlers
IB/cm: Bump reference count on cm_id before invoking callback

Senthil Balasubramanian (1):
ath9k_hw: Fix incorrect macversion and macrev checks

Seth Heasley (3):
ahci: AHCI and RAID mode SATA patch for Intel Patsburg DeviceIDs
ahci: AHCI mode SATA patch for Intel DH89xxCC DeviceIDs
ahci: AHCI mode SATA patch for Intel Patsburg SATA RAID controller

Shaohua Li (1):
x86: Flush TLB if PGD entry is changed in i386 PAE mode

Stefan Nilsson XK (1):
mmc: sdio: remember new card RCA when redetecting card

Steven Rostedt (1):
ftrace: Fix memory leak with function graph and cpu hotplug

Tejun Heo (1):
libata: no special completion processing for EH commands

Thomas Gleixner (1):
fix per-cpu flag problem in the cpu affinity checkers

Tilman Schmidt (1):
isdn: avoid calling tty_ldisc_flush() in atomic context

Trond Myklebust (1):
SUNRPC: Ensure we always run the tk_callback before tk_action

Vitaliy Kulikov (1):
ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs

Vivien Didelot (1):
hwmon: (sht15) Fix integer overflow in humidity calculation

wangyanqing (1):
USB: serial: ch341: add new id

author
#1 lore raw
Documentation/i2c/instantiating-devices +1 -1
index e894902..ed1779c 100644
@@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
 	(...)
 	i2c_adap = i2c_get_adapter(2);
 	memset(&i2c_info, 0, sizeof(struct i2c_board_info));
-	strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE);
+	strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
 	isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
 						   normal_i2c);
 	i2c_put_adapter(i2c_adap);
Makefile +1 -1
index 8b04094..ca59a37 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 32
-EXTRAVERSION = .33
+EXTRAVERSION = .34
 NAME = Man-Eating Seals of Antiquity
 
 # *DOCUMENTATION*
arch/mips/alchemy/mtx-1/platform.c +9 -0
index e30e42a..956f946 100644
@@ -28,6 +28,8 @@
 #include <linux/mtd/physmap.h>
 #include <mtd/mtd-abi.h>
 
+#include <asm/mach-au1x00/au1xxx_eth.h>
+
 static struct gpio_keys_button mtx1_gpio_button[] = {
 	{
 		.gpio = 207,
@@ -140,10 +142,17 @@ static struct __initdata platform_device * mtx1_devs[] = {
 	&mtx1_mtd,
 };
 
+static struct au1000_eth_platform_data mtx1_au1000_eth0_pdata = {
+	.phy_search_highest_addr	= 1,
+	.phy1_search_mac0 		= 1,
+};
+
 static int __init mtx1_register_devices(void)
 {
 	int rc;
 
+	au1xxx_override_eth_cfg(0, &mtx1_au1000_eth0_pdata);
+
 	rc = gpio_request(mtx1_gpio_button[0].gpio,
 					mtx1_gpio_button[0].desc);
 	if (rc < 0) {
arch/parisc/kernel/irq.c +1 -1
index 2e7610c..035f568 100644
@@ -117,7 +117,7 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest)
 	int cpu_dest;
 
 	/* timer and ipi have to always be received on all CPUs */
-	if (CHECK_IRQ_PER_CPU(irq)) {
+	if (CHECK_IRQ_PER_CPU(irq_to_desc(irq)->status)) {
 		/* Bad linux design decision.  The mask has already
 		 * been set; we must reset it */
 		cpumask_setall(irq_desc[irq].affinity);
arch/powerpc/include/asm/kexec.h +4 -0
index 7e06b43..a6ca6da 100644
@@ -31,6 +31,10 @@
 #define KEXEC_ARCH KEXEC_ARCH_PPC
 #endif
 
+#define KEXEC_STATE_NONE 0
+#define KEXEC_STATE_IRQS_OFF 1
+#define KEXEC_STATE_REAL_MODE 2
+
 #ifndef __ASSEMBLY__
 #include <linux/cpumask.h>
 #include <asm/reg.h>
arch/powerpc/include/asm/paca.h +2 -1
index 7d8514c..8108f1e 100644
@@ -56,7 +56,7 @@ struct paca_struct {
 	struct lppaca *lppaca_ptr;	/* Pointer to LpPaca for PLIC */
 #endif /* CONFIG_PPC_BOOK3S */
 	/*
-	 * MAGIC: the spinlock functions in arch/powerpc/lib/locks.c 
+	 * MAGIC: the spinlock functions in arch/powerpc/lib/locks.c
 	 * load lock_token and paca_index with a single lwz
 	 * instruction.  They must travel together and be properly
 	 * aligned.
@@ -76,6 +76,7 @@ struct paca_struct {
 	s16 hw_cpu_id;			/* Physical processor number */
 	u8 cpu_start;			/* At startup, processor spins until */
 					/* this becomes non-zero. */
+	u8 kexec_state;         /* set when kexec down has irqs off */
 #ifdef CONFIG_PPC_STD_MMU_64
 	struct slb_shadow *slb_shadow_ptr;
 
arch/powerpc/include/asm/reg.h +1 -0
index 6315edc..32a7c30 100644
@@ -858,6 +858,7 @@
 #define PV_970		0x0039
 #define PV_POWER5	0x003A
 #define PV_POWER5p	0x003B
+#define PV_POWER7	0x003F
 #define PV_970FX	0x003C
 #define PV_630		0x0040
 #define PV_630p	0x0041
arch/powerpc/kernel/asm-offsets.c +1 -0
index 692c056..7d65650 100644
@@ -183,6 +183,7 @@ int main(void)
 #endif /* CONFIG_PPC_STD_MMU_64 */
 	DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp));
 	DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id));
+	DEFINE(PACAKEXECSTATE, offsetof(struct paca_struct, kexec_state));
 	DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr));
 	DEFINE(PACA_STARTSPURR, offsetof(struct paca_struct, startspurr));
 	DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
arch/powerpc/kernel/crash.c +27 -0
index b779818..fe02e71 100644
@@ -162,6 +162,32 @@ static void crash_kexec_prepare_cpus(int cpu)
 	/* Leave the IPI callback set */
 }
 
+/* wait for all the CPUs to hit real mode but timeout if they don't come in */
+static void crash_kexec_wait_realmode(int cpu)
+{
+	unsigned int msecs;
+	int i;
+
+	msecs = 10000;
+	for (i=0; i < NR_CPUS && msecs > 0; i++) {
+		if (i == cpu)
+			continue;
+
+		while (paca[i].kexec_state < KEXEC_STATE_REAL_MODE) {
+			barrier();
+			if (!cpu_possible(i)) {
+				break;
+			}
+			if (!cpu_online(i)) {
+				break;
+			}
+			msecs--;
+			mdelay(1);
+		}
+	}
+	mb();
+}
+
 /*
  * This function will be called by secondary cpus or by kexec cpu
  * if soft-reset is activated to stop some CPUs.
@@ -419,6 +445,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
 	crash_kexec_prepare_cpus(crashing_cpu);
 	cpu_set(crashing_cpu, cpus_in_crash);
 	crash_kexec_stop_spus();
+	crash_kexec_wait_realmode(crashing_cpu);
 	if (ppc_md.kexec_cpu_down)
 		ppc_md.kexec_cpu_down(1, 0);
 }
arch/powerpc/kernel/machine_kexec_64.c +34 -14

90 lines not on this page · raw message

arch/powerpc/kernel/misc_64.S +5 -3
index a5cf9c1..499a133 100644
@@ -24,6 +24,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
+#include <asm/kexec.h>
 
 	.text
 
@@ -471,6 +472,10 @@ _GLOBAL(kexec_wait)
 1:	mflr	r5
 	addi	r5,r5,kexec_flag-1b
 
+	li      r4,KEXEC_STATE_REAL_MODE
+	stb     r4,PACAKEXECSTATE(r13)
+	SYNC
+
 99:	HMT_LOW
 #ifdef CONFIG_KEXEC		/* use no memory without kexec */
 	lwz	r4,0(r5)
@@ -494,14 +499,11 @@ kexec_flag:
  * note: this is a terminal routine, it does not save lr
  *
  * get phys id from paca
- * set paca id to -1 to say we got here
  * switch to real mode
  * join other cpus in kexec_wait(phys_id)
  */
 _GLOBAL(kexec_smp_wait)
 	lhz	r3,PACAHWCPUID(r13)
-	li	r4,-1
-	sth	r4,PACAHWCPUID(r13)	/* let others know we left */
 	bl	real_mode
 	b	.kexec_wait
 
arch/powerpc/kernel/paca.c +2 -0
index d16b1ea..bf6598d 100644
@@ -14,6 +14,7 @@
 #include <asm/paca.h>
 #include <asm/sections.h>
 #include <asm/pgtable.h>
+#include <asm/kexec.h>
 
 /* This symbol is provided by the linker - let it fill in the paca
  * field correctly */
@@ -97,6 +98,7 @@ void __init initialise_pacas(void)
 		new_paca->kernelbase = (unsigned long) _stext;
 		new_paca->kernel_msr = MSR_KERNEL;
 		new_paca->hw_cpu_id = 0xffff;
+		new_paca->kexec_state = KEXEC_STATE_NONE;
 		new_paca->__current = &init_task;
 #ifdef CONFIG_PPC_STD_MMU_64
 		new_paca->slb_shadow_ptr = &slb_shadow[cpu];
arch/powerpc/kernel/perf_event.c +23 -1
index 87f1663..c3f7ac7 100644
@@ -1220,6 +1220,28 @@ unsigned long perf_instruction_pointer(struct pt_regs *regs)
 	return ip;
 }
 
+static bool pmc_overflow(unsigned long val)
+{
+	if ((int)val < 0)
+		return true;
+
+	/*
+	 * Events on POWER7 can roll back if a speculative event doesn't
+	 * eventually complete. Unfortunately in some rare cases they will
+	 * raise a performance monitor exception. We need to catch this to
+	 * ensure we reset the PMC. In all cases the PMC will be 256 or less
+	 * cycles from overflow.
+	 *
+	 * We only do this if the first pass fails to find any overflowing
+	 * PMCs because a user might set a period of less than 256 and we
+	 * don't want to mistakenly reset them.
+	 */
+	if (__is_processor(PV_POWER7) && ((0x80000000 - val) <= 256))
+		return true;
+
+	return false;
+}
+
 /*
  * Performance monitor interrupt stuff
  */
@@ -1267,7 +1289,7 @@ static void perf_event_interrupt(struct pt_regs *regs)
 			if (is_limited_pmc(i + 1))
 				continue;
 			val = read_pmc(i + 1);
-			if ((int)val < 0)
+			if (pmc_overflow(val))
 				write_pmc(i + 1, 0);
 		}
 	}
arch/powerpc/kernel/rtas_flash.c +21 -18
index 13011a9..266c908 100644
@@ -93,12 +93,8 @@ struct flash_block_list {
 	struct flash_block_list *next;
 	struct flash_block blocks[FLASH_BLOCKS_PER_NODE];
 };
-struct flash_block_list_header { /* just the header of flash_block_list */
-	unsigned long num_blocks;
-	struct flash_block_list *next;
-};
 
-static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};
+static struct flash_block_list *rtas_firmware_flash_list;
 
 /* Use slab cache to guarantee 4k alignment */
 static struct kmem_cache *flash_block_cache = NULL;
@@ -107,13 +103,14 @@ static struct kmem_cache *flash_block_cache = NULL;
 
 /* Local copy of the flash block list.
  * We only allow one open of the flash proc file and create this
- * list as we go.  This list will be put in the
- * rtas_firmware_flash_list var once it is fully read.
+ * list as we go.  The rtas_firmware_flash_list varable will be
+ * set once the data is fully read.
  *
  * For convenience as we build the list we use virtual addrs,
  * we do not fill in the version number, and the length field
  * is treated as the number of entries currently in the block
- * (i.e. not a byte count).  This is all fixed on release.
+ * (i.e. not a byte count).  This is all fixed when calling
+ * the flash routine.
  */
 
 /* Status int must be first member of struct */
@@ -200,16 +197,16 @@ static int rtas_flash_release(struct inode *inode, struct file *file)
 	if (uf->flist) {    
 		/* File was opened in write mode for a new flash attempt */
 		/* Clear saved list */
-		if (rtas_firmware_flash_list.next) {
-			free_flash_list(rtas_firmware_flash_list.next);
-			rtas_firmware_flash_list.next = NULL;
+		if (rtas_firmware_flash_list) {
+			free_flash_list(rtas_firmware_flash_list);
+			rtas_firmware_flash_list = NULL;
 		}
 
 		if (uf->status != FLASH_AUTH)  
 			uf->status = flash_list_valid(uf->flist);
 
 		if (uf->status == FLASH_IMG_READY) 
-			rtas_firmware_flash_list.next = uf->flist;
+			rtas_firmware_flash_list = uf->flist;
 		else
 			free_flash_list(uf->flist);
 
@@ -592,7 +589,7 @@ static void rtas_flash_firmware(int reboot_type)
 	unsigned long rtas_block_list;
 	int i, status, update_token;
 
-	if (rtas_firmware_flash_list.next == NULL)
+	if (rtas_firmware_flash_list == NULL)
 		return;		/* nothing to do */
 
 	if (reboot_type != SYS_RESTART) {
@@ -609,20 +606,25 @@ static void rtas_flash_firmware(int reboot_type)
 		return;
 	}
 
-	/* NOTE: the "first" block list is a global var with no data
-	 * blocks in the kernel data segment.  We do this because
-	 * we want to ensure this block_list addr is under 4GB.
+	/*
+	 * NOTE: the "first" block must be under 4GB, so we create
+	 * an entry with no data blocks in the reserved buffer in
+	 * the kernel data segment.
 	 */
-	rtas_firmware_flash_list.num_blocks = 0;
-	flist = (struct flash_block_list *)&rtas_firmware_flash_list;
+	spin_lock(&rtas_data_buf_lock);
+	flist = (struct flash_block_list *)&rtas_data_buf[0];
+	flist->num_blocks = 0;
+	flist->next = rtas_firmware_flash_list;
 	rtas_block_list = virt_to_abs(flist);
 	if (rtas_block_list >= 4UL*1024*1024*1024) {
 		printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n");
+		spin_unlock(&rtas_data_buf_lock);
 		return;
 	}
 
 	printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n");
 	/* Update the block_list in place. */
+	rtas_firmware_flash_list = NULL; /* too hard to backout on error */
 	image_size = 0;
 	for (f = flist; f; f = next) {
 		/* Translate data addrs to absolute */
@@ -663,6 +665,7 @@ static void rtas_flash_firmware(int reboot_type)
 		printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status);
 		break;
 	}
+	spin_unlock(&rtas_data_buf_lock);
 }
 
 static void remove_flash_pde(struct proc_dir_entry *dp)
arch/x86/include/asm/pgtable-3level.h +3 -8
index 177b016..33927d2 100644
@@ -69,8 +69,6 @@ static inline void native_pmd_clear(pmd_t *pmd)
 
 static inline void pud_clear(pud_t *pudp)
 {
-	unsigned long pgd;
-
 	set_pud(pudp, __pud(0));
 
 	/*
@@ -79,13 +77,10 @@ static inline void pud_clear(pud_t *pudp)
 	 * section 8.1: in PAE mode we explicitly have to flush the
 	 * TLB via cr3 if the top-level pgd is changed...
 	 *
-	 * Make sure the pud entry we're updating is within the
-	 * current pgd to avoid unnecessary TLB flushes.
+	 * Currently all places where pud_clear() is called either have
+	 * flush_tlb_mm() followed or don't need TLB flush (x86_64 code or
+	 * pud_clear_bad()), so we don't need TLB flush here.
 	 */
-	pgd = read_cr3();
-	if (__pa(pudp) >= pgd && __pa(pudp) <
-	    (pgd + sizeof(pgd_t)*PTRS_PER_PGD))
-		write_cr3(pgd);
 }
 
 #ifdef CONFIG_SMP
arch/x86/kernel/e820.c +8 -2
index d17d482..a89739a 100644
@@ -1236,15 +1236,21 @@ static int __init parse_memopt(char *p)
 	if (!p)
 		return -EINVAL;
 
-#ifdef CONFIG_X86_32
 	if (!strcmp(p, "nopentium")) {
+#ifdef CONFIG_X86_32
 		setup_clear_cpu_cap(X86_FEATURE_PSE);
 		return 0;
-	}
+#else
+		printk(KERN_WARNING "mem=nopentium ignored! (only supported on x86_32)\n");
+		return -EINVAL;
 #endif
+	}
 
 	userdef = 1;
 	mem_size = memparse(p, &p);
+	/* don't remove all of memory when handling "mem={invalid}" param */
+	if (mem_size == 0)
+		return -EINVAL;
 	e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
 
 	return 0;
arch/x86/kernel/early-quirks.c +6 -1
index ef01d3d..f67a33c7 100644
@@ -161,7 +161,12 @@ static void __init ati_bugs_contd(int num, int slot, int func)
 	if (rev >= 0x40)
 		acpi_fix_pin2_polarity = 1;
 
-	if (rev > 0x13)
+	/*
+	 * SB600: revisions 0x11, 0x12, 0x13, 0x14, ...
+	 * SB700: revisions 0x39, 0x3a, ...
+	 * SB800: revisions 0x40, 0x41, ...
+	 */
+	if (rev >= 0x39)
 		return;
 
 	if (acpi_use_timer_override)
arch/x86/kernel/entry_64.S +1 -1
index b5c061f..34a56a9 100644
@@ -1303,7 +1303,7 @@ ENTRY(xen_do_hypervisor_callback)   # do_hypervisor_callback(struct *pt_regs)
 	decl PER_CPU_VAR(irq_count)
 	jmp  error_exit
 	CFI_ENDPROC
-END(do_hypervisor_callback)
+END(xen_do_hypervisor_callback)
 
 /*
  * Hypervisor uses this for application faults while it executes.
arch/x86/mm/fault.c +7 -0
index 1739358..8ac0d76 100644
@@ -830,6 +830,13 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,
 	       unsigned long address, unsigned int fault)
 {
 	if (fault & VM_FAULT_OOM) {
+		/* Kernel mode? Handle exceptions or die: */
+		if (!(error_code & PF_USER)) {
+			up_read(&current->mm->mmap_sem);
+			no_context(regs, error_code, address);
+			return;
+		}
+
 		out_of_memory(regs, error_code, address);
 	} else {
 		if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON))
arch/x86/mm/pgtable.c +1 -2
index c9ba9de..e0e6fad 100644
@@ -159,8 +159,7 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
 	 * section 8.1: in PAE mode we explicitly have to flush the
 	 * TLB via cr3 if the top-level pgd is changed...
 	 */
-	if (mm == current->active_mm)
-		write_cr3(read_cr3());
+	flush_tlb_mm(mm);
 }
 #else  /* !CONFIG_X86_PAE */
 
drivers/ata/ahci.c +5 -0
index e3d9816..7f94bd1 100644
@@ -576,6 +576,11 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 	{ PCI_VDEVICE(INTEL, 0x1c05), board_ahci }, /* CPT RAID */
 	{ PCI_VDEVICE(INTEL, 0x1c06), board_ahci }, /* CPT RAID */
 	{ PCI_VDEVICE(INTEL, 0x1c07), board_ahci }, /* CPT RAID */
+	{ PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */
+	{ PCI_VDEVICE(INTEL, 0x1d04), board_ahci }, /* PBG RAID */
+	{ PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */
+	{ PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */
+	{ PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */
 
 	/* JMicron 360/1/3/5/6, match class to avoid IDE function */
 	{ PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
drivers/ata/libata-core.c +15 -9
index 0963cd6..d4f7f99 100644
@@ -5016,9 +5016,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
 {
 	struct ata_device *dev = qc->dev;
 
-	if (ata_tag_internal(qc->tag))
-		return;
-
 	if (ata_is_nodata(qc->tf.protocol))
 		return;
 
@@ -5062,14 +5059,23 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
 		if (unlikely(qc->err_mask))
 			qc->flags |= ATA_QCFLAG_FAILED;
 
-		if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
-			/* always fill result TF for failed qc */
+		/*
+		 * Finish internal commands without any further processing
+		 * and always with the result TF filled.
+		 */
+		if (unlikely(ata_tag_internal(qc->tag))) {
 			fill_result_tf(qc);
+			__ata_qc_complete(qc);
+			return;
+		}
 
-			if (!ata_tag_internal(qc->tag))
-				ata_qc_schedule_eh(qc);
-			else
-				__ata_qc_complete(qc);
+		/*
+		 * Non-internal qc has failed.  Fill the result TF and
+		 * summon EH.
+		 */
+		if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
+			fill_result_tf(qc);
+			ata_qc_schedule_eh(qc);
 			return;
 		}
 
drivers/hwmon/f71882fg.c +1 -1
index 4146105..efbb602 100644
@@ -1957,7 +1957,6 @@ static int f71882fg_remove(struct platform_device *pdev)
 	int i;
 	struct f71882fg_data *data = platform_get_drvdata(pdev);
 
-	platform_set_drvdata(pdev, NULL);
 	if (data->hwmon_dev)
 		hwmon_device_unregister(data->hwmon_dev);
 
@@ -1982,6 +1981,7 @@ static int f71882fg_remove(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(f8000_fan_attr); i++)
 		device_remove_file(&pdev->dev, &f8000_fan_attr[i].dev_attr);
 
+	platform_set_drvdata(pdev, NULL);
 	kfree(data);
 
 	return 0;
drivers/hwmon/sht15.c +2 -2
index fbc997e..2040507 100644
@@ -332,11 +332,11 @@ static inline int sht15_calc_humid(struct sht15_data *data)
 
 	const int c1 = -4;
 	const int c2 = 40500; /* x 10 ^ -6 */
-	const int c3 = -2800; /* x10 ^ -9 */
+	const int c3 = -28; /* x 10 ^ -7 */
 
 	RHlinear = c1*1000
 		+ c2 * data->val_humid/1000
-		+ (data->val_humid * data->val_humid * c3)/1000000;
+		+ (data->val_humid * data->val_humid * c3) / 10000;
 	return (temp - 25000) * (10000 + 80 * data->val_humid)
 		/ 1000000 + RHlinear;
 }
drivers/infiniband/core/cm.c +1 -0
index 5130fc5..a5dea6b 100644
@@ -2986,6 +2986,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
 		goto out; /* No match. */
 	}
 	atomic_inc(&cur_cm_id_priv->refcount);
+	atomic_inc(&cm_id_priv->refcount);
 	spin_unlock_irq(&cm.lock);
 
 	cm_id_priv->id.cm_handler = cur_cm_id_priv->id.cm_handler;
drivers/infiniband/core/cma.c +15 -0
index 0753178..8fd3a6f 100644
@@ -1138,6 +1138,11 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
 	cm_id->context = conn_id;
 	cm_id->cm_handler = cma_ib_handler;
 
+	/*
+	 * Protect against the user destroying conn_id from another thread
+	 * until we're done accessing it.
+	 */
+	atomic_inc(&conn_id->refcount);
 	ret = conn_id->id.event_handler(&conn_id->id, &event);
 	if (!ret) {
 		/*
@@ -1150,8 +1155,10 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
 			ib_send_cm_mra(cm_id, CMA_CM_MRA_SETTING, NULL, 0);
 		mutex_unlock(&lock);
 		mutex_unlock(&conn_id->handler_mutex);
+		cma_deref_id(conn_id);
 		goto out;
 	}
+	cma_deref_id(conn_id);
 
 	/* Destroy the CM ID by returning a non-zero value. */
 	conn_id->cm_id.ib = NULL;
@@ -1353,17 +1360,25 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
 	event.param.conn.private_data_len = iw_event->private_data_len;
 	event.param.conn.initiator_depth = attr.max_qp_init_rd_atom;
 	event.param.conn.responder_resources = attr.max_qp_rd_atom;
+
+	/*
+	 * Protect against the user destroying conn_id from another thread
+	 * until we're done accessing it.
+	 */
+	atomic_inc(&conn_id->refcount);
 	ret = conn_id->id.event_handler(&conn_id->id, &event);
 	if (ret) {
 		/* User wants to destroy the CM ID */
 		conn_id->cm_id.iw = NULL;
 		cma_exch(conn_id, CMA_DESTROYING);
 		mutex_unlock(&conn_id->handler_mutex);
+		cma_deref_id(conn_id);
 		rdma_destroy_id(&conn_id->id);
 		goto out;
 	}
 
 	mutex_unlock(&conn_id->handler_mutex);
+	cma_deref_id(conn_id);
 
 out:
 	if (dev)
drivers/isdn/i4l/isdn_tty.c +0 -6
index 2881a66..9f65c9c 100644
@@ -2635,12 +2635,6 @@ isdn_tty_modem_result(int code, modem_info * info)
 		if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
 			return;
 		}
-#ifdef CONFIG_ISDN_AUDIO
-		if ( !info->vonline )
-			tty_ldisc_flush(info->tty);
-#else
-		tty_ldisc_flush(info->tty);
-#endif
 		if ((info->flags & ISDN_ASYNC_CHECK_CD) &&
 		    (!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
 		       (info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) {
drivers/mmc/core/sdio.c +8 -0
index cdb845b..cc55cd4 100644
@@ -267,6 +267,14 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
 		if (err)
 			goto remove;
 
+		/*
+		 * Update oldcard with the new RCA received from the SDIO
+		 * device -- we're doing this so that it's updated in the
+		 * "card" struct when oldcard overwrites that later.
+		 */
+		if (oldcard)
+			oldcard->rca = card->rca;
+
 		mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
 	}
 
drivers/mtd/nand/omap2.c +1 -1
index 090ab87..990184a 100644
@@ -1099,6 +1099,6 @@ static void __exit omap_nand_exit(void)
 module_init(omap_nand_init);
 module_exit(omap_nand_exit);
 
-MODULE_ALIAS(DRIVER_NAME);
+MODULE_ALIAS("platform:" DRIVER_NAME);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Glue layer for NAND flash on TI OMAP boards");
drivers/mtd/onenand/generic.c +1 -1
index e789149..ac08750 100644
@@ -131,7 +131,7 @@ static struct platform_driver generic_onenand_driver = {
 	.remove		= __devexit_p(generic_onenand_remove),
 };
 
-MODULE_ALIAS(DRIVER_NAME);
+MODULE_ALIAS("platform:" DRIVER_NAME);
 
 static int __init generic_onenand_init(void)
 {
drivers/mtd/onenand/omap2.c +1 -1
index 0108ed4..8ed531c 100644
@@ -800,7 +800,7 @@ static void __exit omap2_onenand_exit(void)
 module_init(omap2_onenand_init);
 module_exit(omap2_onenand_exit);
 
-MODULE_ALIAS(DRIVER_NAME);
+MODULE_ALIAS("platform:" DRIVER_NAME);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jarkko Lavinen <[email protected]>");
 MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2 / OMAP3");
drivers/net/wireless/ath/ath9k/hw.c +2 -2
index aed75eb..2570b72 100644
@@ -917,6 +917,8 @@ int ath9k_hw_init(struct ath_hw *ah)
 	ath9k_hw_init_defaults(ah);
 	ath9k_hw_init_config(ah);
 
+	ath9k_hw_read_revisions(ah);
+
 	if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
 		DPRINTF(ah->ah_sc, ATH_DBG_FATAL, "Couldn't reset chip\n");
 		return -EIO;
@@ -1758,8 +1760,6 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah)
 		return false;
 	}
 
-	ath9k_hw_read_revisions(ah);
-
 	return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM);
 }
 
drivers/pci/pci-sysfs.c +1 -1
index 3a3b911..0964b4c 100644
@@ -962,7 +962,7 @@ static int pci_create_capabilities_sysfs(struct pci_dev *dev)
 		attr->write = write_vpd_attr;
 		retval = sysfs_create_bin_file(&dev->dev.kobj, attr);
 		if (retval) {
-			kfree(dev->vpd->attr);
+			kfree(attr);
 			return retval;
 		}
 		dev->vpd->attr = attr;
drivers/pci/quirks.c +53 -60

141 lines not on this page · raw message

drivers/usb/host/xhci-ring.c +14 -0
index 974d492..38fb682 100644
@@ -417,6 +417,20 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
 		state->new_cycle_state = ~(state->new_cycle_state) & 0x1;
 	next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr);
 
+	/*
+	 * If there is only one segment in a ring, find_trb_seg()'s while loop
+	 * will not run, and it will return before it has a chance to see if it
+	 * needs to toggle the cycle bit.  It can't tell if the stalled transfer
+	 * ended just before the link TRB on a one-segment ring, or if the TD
+	 * wrapped around the top of the ring, because it doesn't have the TD in
+	 * question.  Look for the one-segment case where stalled TRB's address
+	 * is greater than the new dequeue pointer address.
+	 */
+	if (ep_ring->first_seg == ep_ring->first_seg->next &&
+			state->new_deq_ptr < dev->eps[ep_index].stopped_trb)
+		state->new_cycle_state ^= 0x1;
+	xhci_dbg(xhci, "Cycle state = 0x%x\n", state->new_cycle_state);
+
 	/* Don't update the ring cycle state for the producer (us). */
 	xhci_dbg(xhci, "New dequeue segment = %p (virtual)\n",
 			state->new_deq_seg);
drivers/usb/serial/ch341.c +1 -0
index e50823a..9fab6fe 100644
@@ -73,6 +73,7 @@ static int debug;
 static struct usb_device_id id_table [] = {
 	{ USB_DEVICE(0x4348, 0x5523) },
 	{ USB_DEVICE(0x1a86, 0x7523) },
+	{ USB_DEVICE(0x1a86, 0x5523) },
 	{ },
 };
 MODULE_DEVICE_TABLE(usb, id_table);
drivers/usb/serial/kobil_sct.c +1 -1
index 9d99e68..929ceb1 100644
@@ -372,7 +372,7 @@ static void kobil_read_int_callback(struct urb *urb)
 	}
 
 	tty = tty_port_tty_get(&port->port);
-	if (urb->actual_length) {
+	if (tty && urb->actual_length) {
 
 		/* BEGIN DEBUG */
 		/*
fs/ext3/namei.c +1 -1
index aad6400..a168780 100644
@@ -1550,8 +1550,8 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry,
 			goto cleanup;
 		node2 = (struct dx_node *)(bh2->b_data);
 		entries2 = node2->entries;
+		memset(&node2->fake, 0, sizeof(struct fake_dirent));
 		node2->fake.rec_len = ext3_rec_len_to_disk(sb->s_blocksize);
-		node2->fake.inode = 0;
 		BUFFER_TRACE(frame->bh, "get_write_access");
 		err = ext3_journal_get_write_access(handle, frame->bh);
 		if (err)
include/linux/ftrace.h +2 -0
index 0b4f97d..529a6d1 100644
@@ -412,6 +412,7 @@ extern void unregister_ftrace_graph(void);
 
 extern void ftrace_graph_init_task(struct task_struct *t);
 extern void ftrace_graph_exit_task(struct task_struct *t);
+extern void ftrace_graph_init_idle_task(struct task_struct *t, int cpu);
 
 static inline int task_curr_ret_stack(struct task_struct *t)
 {
@@ -435,6 +436,7 @@ static inline void unpause_graph_tracing(void)
 
 static inline void ftrace_graph_init_task(struct task_struct *t) { }
 static inline void ftrace_graph_exit_task(struct task_struct *t) { }
+static inline void ftrace_graph_init_idle_task(struct task_struct *t, int cpu) { }
 
 static inline int task_curr_ret_stack(struct task_struct *tsk)
 {
kernel/perf_event.c +2 -0
index 183d437..f9af60f 100644
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
 static const struct pmu *tp_perf_event_init(struct perf_event *event)
 {
+	if (event->hw.state & PERF_HES_STOPPED)
+		return 0;
 	/*
 	 * Raw tracepoint data is a severe data leak, only allow root to
 	 * have these.
kernel/sched.c +1 -1
index df16a0a..0591df8 100644
@@ -7290,7 +7290,7 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
 	 * The idle tasks have their own, simple scheduling class:
 	 */
 	idle->sched_class = &idle_sched_class;
-	ftrace_graph_init_task(idle);
+	ftrace_graph_init_idle_task(idle, cpu);
 }
 
 /*
kernel/smp.c +44 -11

86 lines not on this page · raw message

kernel/trace/ftrace.c +45 -7

70 lines not on this page · raw message

net/sunrpc/sched.c +6 -8
index cef74ba..9191b2f 100644
@@ -627,14 +627,12 @@ static void __rpc_execute(struct rpc_task *task)
 			save_callback = task->tk_callback;
 			task->tk_callback = NULL;
 			save_callback(task);
-		}
-
-		/*
-		 * Perform the next FSM step.
-		 * tk_action may be NULL when the task has been killed
-		 * by someone else.
-		 */
-		if (!RPC_IS_QUEUED(task)) {
+		} else {
+			/*
+			 * Perform the next FSM step.
+			 * tk_action may be NULL when the task has been killed
+			 * by someone else.
+			 */
 			if (task->tk_action == NULL)
 				break;
 			task->tk_action(task);
sound/pci/ctxfi/ctatc.c +1 -1
index cb1f533..9969a26 100644
@@ -868,7 +868,7 @@ spdif_passthru_playback_setup(struct ct_atc *atc, struct ct_atc_pcm *apcm)
 	mutex_lock(&atc->atc_mutex);
 	dao->ops->get_spos(dao, &status);
 	if (((status >> 24) & IEC958_AES3_CON_FS) != iec958_con_fs) {
-		status &= ((~IEC958_AES3_CON_FS) << 24);
+		status &= ~(IEC958_AES3_CON_FS << 24);
 		status |= (iec958_con_fs << 24);
 		dao->ops->set_spos(dao, status);
 		dao->ops->commit_write(dao);
sound/pci/ctxfi/ctdaio.c +2 -0
index af56eb9..47d9ea9 100644
@@ -176,6 +176,7 @@ static int dao_set_left_input(struct dao *dao, struct rsc *input)
 	if (!entry)
 		return -ENOMEM;
 
+	dao->ops->clear_left_input(dao);
 	/* Program master and conjugate resources */
 	input->ops->master(input);
 	daio->rscl.ops->master(&daio->rscl);
@@ -204,6 +205,7 @@ static int dao_set_right_input(struct dao *dao, struct rsc *input)
 	if (!entry)
 		return -ENOMEM;
 
+	dao->ops->clear_right_input(dao);
 	/* Program master and conjugate resources */
 	input->ops->master(input);
 	daio->rscr.ops->master(&daio->rscr);
sound/pci/ctxfi/ctmixer.c +5 -14
index 15c1e72..c3519ff 100644
@@ -566,19 +566,6 @@ static int ct_spdif_get_mask(struct snd_kcontrol *kcontrol,
 	return 0;
 }
 
-static int ct_spdif_default_get(struct snd_kcontrol *kcontrol,
-				struct snd_ctl_elem_value *ucontrol)
-{
-	unsigned int status = SNDRV_PCM_DEFAULT_CON_SPDIF;
-
-	ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
-	ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
-	ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
-	ucontrol->value.iec958.status[3] = (status >> 24) & 0xff;
-
-	return 0;
-}
-
 static int ct_spdif_get(struct snd_kcontrol *kcontrol,
 			struct snd_ctl_elem_value *ucontrol)
 {
@@ -586,6 +573,10 @@ static int ct_spdif_get(struct snd_kcontrol *kcontrol,
 	unsigned int status;
 
 	atc->spdif_out_get_status(atc, &status);
+
+	if (status == 0)
+		status = SNDRV_PCM_DEFAULT_CON_SPDIF;
+
 	ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
 	ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
 	ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
@@ -629,7 +620,7 @@ static struct snd_kcontrol_new iec958_default_ctl = {
 	.name		= SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
 	.count		= 1,
 	.info		= ct_spdif_info,
-	.get		= ct_spdif_default_get,
+	.get		= ct_spdif_get,
 	.put		= ct_spdif_put,
 	.private_value	= MIXER_IEC958_DEFAULT
 };
sound/pci/hda/patch_sigmatel.c +8 -3
index a280a68..7e59c34 100644
@@ -727,7 +727,7 @@ static int stac92xx_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
 	struct sigmatel_spec *spec = codec->spec;
 	unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
 	const struct hda_input_mux *imux = spec->input_mux;
-	unsigned int idx, prev_idx;
+	unsigned int idx, prev_idx, didx;
 
 	idx = ucontrol->value.enumerated.item[0];
 	if (idx >= imux->num_items)
@@ -739,7 +739,8 @@ static int stac92xx_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
 		snd_hda_codec_write_cache(codec, spec->mux_nids[adc_idx], 0,
 					  AC_VERB_SET_CONNECT_SEL,
 					  imux->items[idx].index);
-		if (prev_idx >= spec->num_analog_muxes) {
+		if (prev_idx >= spec->num_analog_muxes &&
+		    spec->mux_nids[adc_idx] != spec->dmux_nids[adc_idx]) {
 			imux = spec->dinput_mux;
 			/* 0 = analog */
 			snd_hda_codec_write_cache(codec,
@@ -749,9 +750,13 @@ static int stac92xx_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
 		}
 	} else {
 		imux = spec->dinput_mux;
+		/* first dimux item is hardcoded to select analog imux,
+		 * so lets skip it
+		 */
+		didx = idx - spec->num_analog_muxes + 1;
 		snd_hda_codec_write_cache(codec, spec->dmux_nids[adc_idx], 0,
 					  AC_VERB_SET_CONNECT_SEL,
-					  imux->items[idx - 1].index);
+					  imux->items[didx].index);
 	}
 	spec->cur_mux[adc_idx] = idx;
 	return 1;
#2 lore raw

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines · Greg KH
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
 static const struct pmu *tp_perf_event_init(struct perf_event *event)
 {
+	if (event->hw.state & PERF_HES_STOPPED)
+		return 0;
 	/*
 	 * Raw tracepoint data is a severe data leak, only allow root to
 	 * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
 In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987

Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100

perf: Handle stopped state with tracepoints

commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

thanks,

Signature · 2 lines
js
suse labs
author
#3 lore raw
Quoted 31 lines · Jiri Slaby

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines · Greg KH
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
 static const struct pmu *tp_perf_event_init(struct perf_event *event)
 {
+	if (event->hw.state & PERF_HES_STOPPED)
+		return 0;
 	/*
 	 * Raw tracepoint data is a severe data leak, only allow root to
 	 * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
 In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987

Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100
Quoted 7 lines

perf: Handle stopped state with tracepoints

commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

Ick, I don't know why it builds fine here. Federic, should I just drop this patch for the .32 tree?

thanks,

greg k-h

#7 lore raw
In reply to Jiri Slaby
Quoted 31 lines · Jiri Slaby

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines · Greg KH
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
  static const struct pmu *tp_perf_event_init(struct perf_event *event)
  {
+     if (event->hw.state & PERF_HES_STOPPED)
+             return 0;
       /*
        * Raw tracepoint data is a severe data leak, only allow root to
        * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987
Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100

Quoted 7 lines

   perf: Handle stopped state with tracepoints

   commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

   We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

It builds fine for me with gcc version 4.1.2 for both x86_32 and x86_64.

Thanks.

Kindest regards,
Giam Teck Choon

#8 lore raw
Quoted 34 lines · Teck Choon Giam
Quoted 33 lines · Jiri Slaby

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines · Greg KH
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
 static const struct pmu *tp_perf_event_init(struct perf_event *event)
 {
+     if (event->hw.state & PERF_HES_STOPPED)
+             return 0;
      /*
       * Raw tracepoint data is a severe data leak, only allow root to
       * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987

Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100

perf: Handle stopped state with tracepoints

Quoted 7 lines
Quoted 5 lines

commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

It builds fine for me with gcc version 4.1.2 for both x86_32 and x86_64.

It won't if you turn tracing on. hw_perf_event.state appeared in .37 via a4eaf7f1.

-Mike

#9 lore raw
Quoted 41 lines · Mike Galbraith
Quoted 40 lines · Teck Choon Giam
Quoted 38 lines · Jiri Slaby

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines · Greg KH
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
  static const struct pmu *tp_perf_event_init(struct perf_event *event)
  {
+     if (event->hw.state & PERF_HES_STOPPED)
+             return 0;
       /*
        * Raw tracepoint data is a severe data leak, only allow root to
        * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987
Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100

   perf: Handle stopped state with tracepoints

   commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

   We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

Quoted 6 lines
Quoted 1 line

It builds fine for me with gcc version 4.1.2 for both x86_32 and x86_64.

It won't if you turn tracing on.  hw_perf_event.state appeared in .37 via a4eaf7f1.

       -Mike

Oh ok. Noted with thanks ;)

Kindest regards,
Giam Teck Choon

#4 lore raw
In reply to Greg KH
Quoted 34 lines · Greg KH
Quoted 33 lines · Jiri Slaby

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines · Greg KH
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
 static const struct pmu *tp_perf_event_init(struct perf_event *event)
 {
+	if (event->hw.state & PERF_HES_STOPPED)
+		return 0;
 	/*
 	 * Raw tracepoint data is a severe data leak, only allow root to
 	 * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
 In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
 error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987

Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100

perf: Handle stopped state with tracepoints

Quoted 8 lines
Quoted 5 lines

commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

Ick, I don't know why it builds fine here. Federic, should I just drop this patch for the .32 tree?

Yes, please drop it.

Thanks,

Ingo

#5 lore raw

2011/3/24 Ingo Molnar <[email protected]>:

Quoted 43 lines · Greg KH
Quoted 41 lines · Jiri Slaby
Quoted 38 lines · Greg KH

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
  static const struct pmu *tp_perf_event_init(struct perf_event *event)
  {
+ if (event->hw.state & PERF_HES_STOPPED)
+         return 0;
   /*
    * Raw tracepoint data is a severe data leak, only allow root to
    * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987
Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100

    perf: Handle stopped state with tracepoints

    commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

    We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

Quoted 9 lines
Quoted 2 lines

Ick, I don't know why it builds fine here.  Federic, should I just drop this patch for the .32 tree?

Yes, please drop it.

Thanks,

       Ingo

Yeah sorry for this. The patch actually only applies starting from 2.6.37 Naked [email protected] tags (which I confess I use too) without version slice are sometimes creepy because they can cause such patches that may physically apply but not logically. And that's not the first time. Sometimes it's even worse when
it applies and builds but fails on runtime because the old code flow was different. I
remember a similar case with an old breakpoint patch that needed a different backport
version in .33, I was lucky enough to anticipate but a naked stable tag would have broken.

OTOH the flow of patches that get stable tags is bigger now that people are used to stable workflow. And checking every versions for all of them may require quite some time. This implies one to keep these trees handy in his filesystems and do careful checks, not even only build. That can be a bit of a congestion point as more stable trees are maintained by the time. But probably needed. Often it's simply a matter of doing a binary search to find the first tree that starts the slice of the backport.

author
#6 lore raw
Quoted 54 lines · Frederic Weisbecker

2011/3/24 Ingo Molnar <[email protected]>:

Quoted 43 lines · Greg KH
Quoted 41 lines · Jiri Slaby
Quoted 38 lines · Greg KH

kernel/perf_event.c static void tp_perf_event_destroy(struct perf_event *event) · line 4174

Quoted 11 lines
kernel/perf_event.c +2 -0
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
 
  static const struct pmu *tp_perf_event_init(struct perf_event *event)
  {
+ if (event->hw.state & PERF_HES_STOPPED)
+         return 0;
   /*
    * Raw tracepoint data is a severe data leak, only allow root to
    * have these.

This causes build to fail:
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:
In function 'tp_perf_event_init':
/usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'struct hw_perf_event' has no member named 'state' /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: 'PERF_HES_STOPPED' undeclared (first use in this function) /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: (Each undeclared identifier is reported only once /usr/src/packages/BUILD/kernel-vanilla-2.6.32.34/linux-2.6.32/kernel/perf_event.c:4170:
error: for each function it appears in.)

The source:
commit 6f197b73304b3bd3d5a43b931383a5331d6b2987
Author: Frederic Weisbecker <[email protected]>
Date:   Mon Mar 7 21:27:09 2011 +0100

    perf: Handle stopped state with tracepoints

    commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream.

    We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work.

Quoted 9 lines
Quoted 2 lines

Ick, I don't know why it builds fine here.  Federic, should I just drop this patch for the .32 tree?

Yes, please drop it.

Thanks,

       Ingo

Quoted 11 lines

Yeah sorry for this. The patch actually only applies starting from 2.6.37 Naked [email protected] tags (which I confess I use too) without version slice are sometimes creepy because they can cause such patches that may physically apply but not logically. And that's not the first time. Sometimes it's even worse when
it applies and builds but fails on runtime because the old code flow was different. I
remember a similar case with an old breakpoint patch that needed a different backport
version in .33, I was lucky enough to anticipate but a naked stable tag would have broken.

No problem, this was my fault in that my build tests didn't catch it. Which is odd, I should be using the same .config that Jiri was, I need to see what I did wrong here...

I'll go revert it and put out a new version now.

thanks,

greg k-h