]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge commit 'origin' into master
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 21 Oct 2008 04:52:04 +0000 (15:52 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 21 Oct 2008 04:52:04 +0000 (15:52 +1100)
Manual merge of:

arch/powerpc/Kconfig
arch/powerpc/include/asm/page.h

1  2 
arch/powerpc/Kconfig
arch/powerpc/include/asm/page.h
arch/powerpc/platforms/cell/spufs/sputrace.c

diff --combined arch/powerpc/Kconfig
index bbe149c2651805c7835d238a38e7bc04ff940620,9391199d9e7731d166b45130fa322e27936b1da0..369d93e7377cfc1b0ae7afbd3e8f91869102768a
@@@ -19,6 -19,12 +19,9 @@@ config WORD_SIZ
        default 64 if PPC64
        default 32 if !PPC64
  
 -config PPC_MERGE
 -      def_bool y
 -
+ config ARCH_PHYS_ADDR_T_64BIT
+        def_bool PPC64 || PHYS_64BIT
  config MMU
        bool
        default y
@@@ -224,6 -230,8 +227,8 @@@ config PPC_OF_PLATFORM_PC
  
  source "init/Kconfig"
  
+ source "kernel/Kconfig.freezer"
  source "arch/powerpc/sysdev/Kconfig"
  source "arch/powerpc/platforms/Kconfig"
  
index 120f4d49425749266ce8a4fc63e0cabfbcdf877b,5ac51e6efc1d860ea0d72702d60e63fa42a20c81..c0b8d4a29a91cd34c7e10bb45608d7e9fe83fee0
   * 2 of the License, or (at your option) any later version.
   */
  
- #include <asm/asm-compat.h>
- #include <asm/kdump.h>
  #ifndef __ASSEMBLY__
  #include <linux/types.h>
+ #else
+ #include <asm/types.h>
  #endif
+ #include <asm/asm-compat.h>
+ #include <asm/kdump.h>
  
  /*
   * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software
@@@ -75,7 -77,6 +77,7 @@@
  
  #if defined(CONFIG_RELOCATABLE)
  #ifndef __ASSEMBLY__
 +
  extern phys_addr_t memstart_addr;
  extern phys_addr_t kernstart_addr;
  #endif
index a2460e2e192893e386ae44d6695fb2c52d10a421,2ece399f2862361aaa0789f08a49a4bae169043e..d0b1f3f4d9c887de9a902b4e511c0a2940a4aa02
@@@ -40,7 -40,6 +40,7 @@@ static DECLARE_WAIT_QUEUE_HEAD(sputrace
  static ktime_t sputrace_start;
  static unsigned long sputrace_head, sputrace_tail;
  static struct sputrace *sputrace_log;
 +static int sputrace_logging;
  
  static int sputrace_used(void)
  {
@@@ -80,11 -79,6 +80,11 @@@ static ssize_t sputrace_read(struct fil
                char tbuf[128];
                int width;
  
 +              /* If we have data ready to return, don't block waiting
 +               * for more */
 +              if (cnt > 0 && sputrace_used() == 0)
 +                      break;
 +
                error = wait_event_interruptible(sputrace_wait,
                                                 sputrace_used() > 0);
                if (error)
  
  static int sputrace_open(struct inode *inode, struct file *file)
  {
 +      int rc;
 +
        spin_lock(&sputrace_lock);
 +      if (sputrace_logging) {
 +              rc = -EBUSY;
 +              goto out;
 +      }
 +
 +      sputrace_logging = 1;
        sputrace_head = sputrace_tail = 0;
        sputrace_start = ktime_get();
 +      rc = 0;
 +
 +out:
        spin_unlock(&sputrace_lock);
 +      return rc;
 +}
  
 +static int sputrace_release(struct inode *inode, struct file *file)
 +{
 +      spin_lock(&sputrace_lock);
 +      sputrace_logging = 0;
 +      spin_unlock(&sputrace_lock);
        return 0;
  }
  
  static const struct file_operations sputrace_fops = {
 -      .owner  = THIS_MODULE,
 -      .open   = sputrace_open,
 -      .read   = sputrace_read,
 +      .owner   = THIS_MODULE,
 +      .open    = sputrace_open,
 +      .read    = sputrace_read,
 +      .release = sputrace_release,
  };
  
  static void sputrace_log_item(const char *name, struct spu_context *ctx,
                struct spu *spu)
  {
        spin_lock(&sputrace_lock);
 +
 +      if (!sputrace_logging) {
 +              spin_unlock(&sputrace_lock);
 +              return;
 +      }
 +
        if (sputrace_avail() > 1) {
                struct sputrace *t = sputrace_log + sputrace_head;
  
@@@ -263,6 -232,7 +263,7 @@@ static void __exit sputrace_exit(void
  
        remove_proc_entry("sputrace", NULL);
        kfree(sputrace_log);
+       marker_synchronize_unregister();
  }
  
  module_init(sputrace_init);