Patches contributed by Eötvös Lorand University


commit 1de8cd3cb9f61e854e743c7210df43db517d4832
Merge: 1eb1b3b65dc3 3d14bdad4031
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sat Jan 10 23:56:42 2009 +0100

    Merge branch 'linus' into x86/cleanups

diff --cc arch/x86/include/asm/smp.h
index 74ad9ef6ae02,19953df61c52..1963e27673c9
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@@ -18,10 -18,30 +18,27 @@@
  #include <asm/pda.h>
  #include <asm/thread_info.h>
  
+ #ifdef CONFIG_X86_64
+ 
+ extern cpumask_var_t cpu_callin_mask;
+ extern cpumask_var_t cpu_callout_mask;
+ extern cpumask_var_t cpu_initialized_mask;
+ extern cpumask_var_t cpu_sibling_setup_mask;
+ 
+ #else /* CONFIG_X86_32 */
+ 
+ extern cpumask_t cpu_callin_map;
  extern cpumask_t cpu_callout_map;
  extern cpumask_t cpu_initialized;
- extern cpumask_t cpu_callin_map;
+ extern cpumask_t cpu_sibling_setup_map;
+ 
+ #define cpu_callin_mask		((struct cpumask *)&cpu_callin_map)
+ #define cpu_callout_mask	((struct cpumask *)&cpu_callout_map)
+ #define cpu_initialized_mask	((struct cpumask *)&cpu_initialized)
+ #define cpu_sibling_setup_mask	((struct cpumask *)&cpu_sibling_setup_map)
+ 
+ #endif /* CONFIG_X86_32 */
  
 -extern void (*mtrr_hook)(void);
 -extern void zap_low_mappings(void);
 -
  extern int __cpuinit get_local_pda(int cpu);
  
  extern int smp_num_siblings;
@@@ -144,8 -175,12 +170,8 @@@ void smp_store_cpu_info(int id)
  /* We don't mark CPUs online until __cpu_up(), so we need another measure */
  static inline int num_booting_cpus(void)
  {
- 	return cpus_weight(cpu_callout_map);
+ 	return cpumask_weight(cpu_callout_mask);
  }
 -#else
 -static inline void prefill_possible_map(void)
 -{
 -}
  #endif /* CONFIG_SMP */
  
  extern unsigned disabled_cpus __cpuinitdata;

commit 736f93236ce786d1bcf09ad4dcb38a360d35ea1b
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sat Jan 10 12:06:19 2009 +0100

    bzip2/lzma: make flush_buffer() unconditional
    
    Impact: build fix
    
    flush_buffer() is used unconditionally:
    
      init/initramfs.c:456: error: 'flush_buffer' undeclared (first use in this function)
      init/initramfs.c:456: error: (Each undeclared identifier is reported only once
      init/initramfs.c:456: error: for each function it appears in.)
    
    So remove the decompressor #ifdefs from around it.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/init/initramfs.c b/init/initramfs.c
index f8241e832aa3..76f4a0125338 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -390,7 +390,6 @@ static int __init write_buffer(char *buf, unsigned len)
 	return len - count;
 }
 
-#if defined CONFIG_RD_GZIP || defined CONFIG_RD_BZIP2 || defined CONFIG_RD_LZMA
 static int __init flush_buffer(void *bufv, unsigned len)
 {
 	char *buf = (char *) bufv;
@@ -413,7 +412,6 @@ static int __init flush_buffer(void *bufv, unsigned len)
 	}
 	return origLen;
 }
-#endif
 
 static unsigned my_inptr;   /* index of next byte to be processed in inbuf */
 

commit b17304245f0db0ac69b795c411407808f3f2796d
Merge: 889c92d21db4 9a100a446491
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sat Jan 10 12:04:41 2009 +0100

    Merge branch 'linus' into x86/setup-lzma
    
    Conflicts:
            init/do_mounts_rd.c

diff --cc init/do_mounts_rd.c
index a06ed4f92e0e,0f0f0cf3ba9a..a015e267fd17
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@@ -9,10 -9,8 +9,11 @@@
  #include <linux/string.h>
  
  #include "do_mounts.h"
+ #include "../fs/squashfs/squashfs_fs.h"
  
 +#include <linux/decompress/generic.h>
 +
 +
  int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */
  
  static int __init prompt_ramdisk(char *str)
@@@ -40,23 -38,24 +41,25 @@@ static int __init crd_load(int in_fd, i
   * numbers could not be found.
   *
   * We currently check for the following magic numbers:
 - * 	minix
 - * 	ext2
 + *	minix
 + *	ext2
   *	romfs
   *	cramfs
+  *	squashfs
 - * 	gzip
 + *	gzip
   */
 -static int __init 
 -identify_ramdisk_image(int fd, int start_block)
 +static int __init
 +identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor)
  {
  	const int size = 512;
  	struct minix_super_block *minixsb;
  	struct ext2_super_block *ext2sb;
  	struct romfs_super_block *romfsb;
  	struct cramfs_super *cramfsb;
+ 	struct squashfs_super_block *squashfsb;
  	int nblocks = -1;
  	unsigned char *buf;
 +	const char *compress_name;
  
  	buf = kmalloc(size, GFP_KERNEL);
  	if (!buf)

commit ac3f6454d1ee0eb68485e05bb068de7c22e730d7
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Jan 6 14:06:28 2009 +0000

    powerpc/pasemi: local_irq_save uses an unsigned long
    
    [Split from a larger patch - sfr]
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c
index 58556b028a4c..86db47c1b665 100644
--- a/arch/powerpc/platforms/pasemi/cpufreq.c
+++ b/arch/powerpc/platforms/pasemi/cpufreq.c
@@ -112,7 +112,7 @@ static int get_gizmo_latency(void)
 
 static void set_astate(int cpu, unsigned int astate)
 {
-	u64 flags;
+	unsigned long flags;
 
 	/* Return if called before init has run */
 	if (unlikely(!sdcasr_mapbase))

commit b36ac9e84b4a3602bd07c2b7cf995f88f76d8428
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Jan 6 14:03:44 2009 +0000

    powerpc/cell: Fix some u64 vs. long types
    
    in/out_be64() work on u64s.
    
    The first parameter to ppc_md.ioremap is a phys_addr_t.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 2d5bb22d6c09..28c04dab2633 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -148,7 +148,7 @@ static unsigned int iic_get_irq(void)
 
 	iic = &__get_cpu_var(iic);
 	*(unsigned long *) &pending =
-		in_be64((unsigned long __iomem *) &iic->regs->pending_destr);
+		in_be64((u64 __iomem *) &iic->regs->pending_destr);
 	if (!(pending.flags & CBE_IIC_IRQ_VALID))
 		return NO_IRQ;
 	virq = irq_linear_revmap(iic_host, iic_pending_to_hwnum(pending));
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
index b5f84e8f0899..059cad6c3f69 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -130,14 +130,14 @@ static const struct ppc_pci_io __devinitconst iowa_pci_io = {
 
 };
 
-static void __iomem *iowa_ioremap(unsigned long addr, unsigned long size,
+static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
 						unsigned long flags)
 {
 	struct iowa_bus *bus;
 	void __iomem *res = __ioremap(addr, size, flags);
 	int busno;
 
-	bus = iowa_pci_find(0, addr);
+	bus = iowa_pci_find(0, (unsigned long)addr);
 	if (bus != NULL) {
 		busno = bus - iowa_busses;
 		PCI_SET_ADDR_TOKEN(res, busno + 1);
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 86db4dd170a0..88d94b59a7cb 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -150,8 +150,8 @@ static int cbe_nr_iommus;
 static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte,
 		long n_ptes)
 {
-	unsigned long __iomem *reg;
-	unsigned long val;
+	u64 __iomem *reg;
+	u64 val;
 	long n;
 
 	reg = iommu->xlate_regs + IOC_IOPT_CacheInvd;

commit 19b0bd025d6647549e07becf02b99e5168c17432
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Jan 6 14:01:23 2009 +0000

    powerpc/cell: Use correct types in beat files
    
    Only pass the address of a u64 if that is what the function requires.
    
    [Split out of a larger patch - sfr]
    [update comment - sfr]
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

diff --git a/arch/powerpc/platforms/cell/beat_htab.c b/arch/powerpc/platforms/cell/beat_htab.c
index 2e67bd840e01..35b1ec492715 100644
--- a/arch/powerpc/platforms/cell/beat_htab.c
+++ b/arch/powerpc/platforms/cell/beat_htab.c
@@ -44,8 +44,8 @@ static DEFINE_SPINLOCK(beat_htab_lock);
 
 static inline unsigned int beat_read_mask(unsigned hpte_group)
 {
-	unsigned long hpte_v[5];
 	unsigned long rmask = 0;
+	u64 hpte_v[5];
 
 	beat_read_htab_entries(0, hpte_group + 0, hpte_v);
 	if (!(hpte_v[0] & HPTE_V_BOLTED))
@@ -93,8 +93,7 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
 				  int psize, int ssize)
 {
 	unsigned long lpar_rc;
-	unsigned long slot;
-	unsigned long hpte_v, hpte_r;
+	u64 hpte_v, hpte_r, slot;
 
 	/* same as iseries */
 	if (vflags & HPTE_V_SECONDARY)
@@ -153,8 +152,9 @@ static long beat_lpar_hpte_remove(unsigned long hpte_group)
 
 static unsigned long beat_lpar_hpte_getword0(unsigned long slot)
 {
-	unsigned long dword0, dword[5];
+	unsigned long dword0;
 	unsigned long lpar_rc;
+	u64 dword[5];
 
 	lpar_rc = beat_read_htab_entries(0, slot & ~3UL, dword);
 
@@ -170,7 +170,7 @@ static void beat_lpar_hptab_clear(void)
 	unsigned long size_bytes = 1UL << ppc64_pft_size;
 	unsigned long hpte_count = size_bytes >> 4;
 	int i;
-	unsigned long dummy0, dummy1;
+	u64 dummy0, dummy1;
 
 	/* TODO: Use bulk call */
 	for (i = 0; i < hpte_count; i++)
@@ -189,7 +189,8 @@ static long beat_lpar_hpte_updatepp(unsigned long slot,
 				    int psize, int ssize, int local)
 {
 	unsigned long lpar_rc;
-	unsigned long dummy0, dummy1, want_v;
+	u64 dummy0, dummy1;
+	unsigned long want_v;
 
 	want_v = hpte_encode_v(va, psize, MMU_SEGSIZE_256M);
 
@@ -255,7 +256,8 @@ static void beat_lpar_hpte_updateboltedpp(unsigned long newpp,
 					  unsigned long ea,
 					  int psize, int ssize)
 {
-	unsigned long lpar_rc, slot, vsid, va, dummy0, dummy1;
+	unsigned long lpar_rc, slot, vsid, va;
+	u64 dummy0, dummy1;
 
 	vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M);
 	va = (vsid << 28) | (ea & 0x0fffffff);
@@ -276,7 +278,7 @@ static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
 {
 	unsigned long want_v;
 	unsigned long lpar_rc;
-	unsigned long dummy1, dummy2;
+	u64 dummy1, dummy2;
 	unsigned long flags;
 
 	DBG_LOW("    inval : slot=%lx, va=%016lx, psize: %d, local: %d\n",
@@ -315,8 +317,7 @@ static long beat_lpar_hpte_insert_v3(unsigned long hpte_group,
 				  int psize, int ssize)
 {
 	unsigned long lpar_rc;
-	unsigned long slot;
-	unsigned long hpte_v, hpte_r;
+	u64 hpte_v, hpte_r, slot;
 
 	/* same as iseries */
 	if (vflags & HPTE_V_SECONDARY)
diff --git a/arch/powerpc/platforms/cell/beat_udbg.c b/arch/powerpc/platforms/cell/beat_udbg.c
index 6b418f6b6175..350735bc8888 100644
--- a/arch/powerpc/platforms/cell/beat_udbg.c
+++ b/arch/powerpc/platforms/cell/beat_udbg.c
@@ -40,8 +40,8 @@ static void udbg_putc_beat(char c)
 }
 
 /* Buffered chars getc */
-static long inbuflen;
-static long inbuf[2];	/* must be 2 longs */
+static u64 inbuflen;
+static u64 inbuf[2];	/* must be 2 u64s */
 
 static int udbg_getc_poll_beat(void)
 {
diff --git a/drivers/char/hvc_beat.c b/drivers/char/hvc_beat.c
index 91cdb35a9204..0afc8b82212e 100644
--- a/drivers/char/hvc_beat.c
+++ b/drivers/char/hvc_beat.c
@@ -44,7 +44,7 @@ static int hvc_beat_get_chars(uint32_t vtermno, char *buf, int cnt)
 	static unsigned char q[sizeof(unsigned long) * 2]
 		__attribute__((aligned(sizeof(unsigned long))));
 	static int qlen = 0;
-	unsigned long got;
+	u64 got;
 
 again:
 	if (qlen) {
@@ -63,7 +63,7 @@ static int hvc_beat_get_chars(uint32_t vtermno, char *buf, int cnt)
 		}
 	}
 	if (beat_get_term_char(vtermno, &got,
-		((unsigned long *)q), ((unsigned long *)q) + 1) == 0) {
+		((u64 *)q), ((u64 *)q) + 1) == 0) {
 		qlen = got;
 		goto again;
 	}

commit 2b931fb67e10d6eb99d9928fa3afe83cdeeb7354
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Jan 6 13:56:52 2009 +0000

    powerpc: Use correct type in prom_init.c
    
    tce_entryp is a "u64 *" not an "unsigned long *".
    
    [Split from a large patch -sfr]
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 2445945d3761..7f1b33d5e30d 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1210,7 +1210,7 @@ static void __init prom_initialize_tce_table(void)
 		/* Initialize the table to have a one-to-one mapping
 		 * over the allocated size.
 		 */
-		tce_entryp = (unsigned long *)base;
+		tce_entryp = (u64 *)base;
 		for (i = 0; i < (minsize >> 3) ;tce_entryp++, i++) {
 			tce_entry = (i << PAGE_SHIFT);
 			tce_entry |= 0x3;

commit 104bafcfab7ce3031399e60069949f10acecc022
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Dec 12 06:49:40 2008 +0100

    PCI: Don't carp about BAR allocation failures in quiet boot
    
    These are easy to trigger (more or less harmlessly) with multiple video
    cards, since the ROM BAR will typically not be given any space by the
    BIOS bridge setup.  No reason to punish quiet boot for this.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index e51bf2cda4b0..f884740da318 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -129,7 +129,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
 				pr = pci_find_parent_resource(dev, r);
 				if (!r->start || !pr ||
 				    request_resource(pr, r) < 0) {
-					dev_err(&dev->dev, "BAR %d: can't allocate resource\n", idx);
+					dev_info(&dev->dev, "BAR %d: can't allocate resource\n", idx);
 					/*
 					 * Something is wrong with the region.
 					 * Invalidate the resource to prevent
@@ -170,7 +170,7 @@ static void __init pcibios_allocate_resources(int pass)
 					r->flags, disabled, pass);
 				pr = pci_find_parent_resource(dev, r);
 				if (!pr || request_resource(pr, r) < 0) {
-					dev_err(&dev->dev, "BAR %d: can't allocate resource\n", idx);
+					dev_info(&dev->dev, "BAR %d: can't allocate resource\n", idx);
 					/* We'll assign a new address later */
 					r->end -= r->start;
 					r->start = 0;
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 2dbd96cce2d8..4e375632499a 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -134,7 +134,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
 
 	align = resource_alignment(res);
 	if (!align) {
-		dev_err(&dev->dev, "BAR %d: can't allocate resource (bogus "
+		dev_info(&dev->dev, "BAR %d: can't allocate resource (bogus "
 			"alignment) %pR flags %#lx\n",
 			resno, res, res->flags);
 		return -EINVAL;
@@ -157,7 +157,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
 	}
 
 	if (ret) {
-		dev_err(&dev->dev, "BAR %d: can't allocate %s resource %pR\n",
+		dev_info(&dev->dev, "BAR %d: can't allocate %s resource %pR\n",
 			resno, res->flags & IORESOURCE_IO ? "I/O" : "mem", res);
 	} else {
 		res->flags &= ~IORESOURCE_STARTALIGN;

commit da4276b8299a6544dc41ac2485d3ffca5811b3fb
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 7 11:05:10 2009 +0100

    x86: offer frame pointers in all build modes
    
    CONFIG_FRAME_POINTERS=y results in much better debug info for the
    kernel (clear and precise backtraces), with the only drawback being
    a ~1% increase in kernel size.
    
    So offer it unconditionally and enable it by default.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 862adb9bf0d4..73f7fe8fd4d1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -27,6 +27,7 @@ config X86
 	select HAVE_IOREMAP_PROT
 	select HAVE_KPROBES
 	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARCH_WANT_FRAME_POINTERS
 	select HAVE_KRETPROBES
 	select HAVE_FTRACE_MCOUNT_RECORD
 	select HAVE_DYNAMIC_FTRACE
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 2e75478e9c69..2d0f14490174 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -566,14 +566,14 @@ config DEBUG_NOTIFIERS
 config FRAME_POINTER
 	bool "Compile the kernel with frame pointers"
 	depends on DEBUG_KERNEL && \
-		(X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \
-		 AVR32 || SUPERH || BLACKFIN || MN10300)
-	default y if DEBUG_INFO && UML
-	help
-	  If you say Y here the resulting kernel image will be slightly larger
-	  and slower, but it might give very useful debugging information on
-	  some architectures or if you use external debuggers.
-	  If you don't debug the kernel, you can say N.
+		(CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \
+		 AVR32 || SUPERH || BLACKFIN || MN10300) || \
+		ARCH_WANT_FRAME_POINTERS
+	default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
+	help
+	  If you say Y here the resulting kernel image will be slightly
+	  larger and slower, but it gives very useful debugging information
+	  in case of kernel bugs. (precise oopses/stacktraces/warnings)
 
 config BOOT_PRINTK_DELAY
 	bool "Delay each boot printk message by N milliseconds"

commit 0936912274af78a21fd8d54c3f94a50a285cf7f9
Merge: 87c6fe26186d 9e9197370daf 40bcc69b399d
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Jan 6 17:39:52 2009 +0100

    Merge branches 'x86/cleanups', 'x86/mpparse', 'x86/numa' and 'x86/uv' into x86/urgent