]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
authorLinus Torvalds <torvalds@woody.osdl.org>
Thu, 7 Dec 2006 23:39:22 +0000 (15:39 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 7 Dec 2006 23:39:22 +0000 (15:39 -0800)
* 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] replace kmalloc+memset with kzalloc
  [IA64] resolve name clash by renaming is_available_memory()
  [IA64] Need export for csum_ipv6_magic
  [IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAP
  [PATCH] Add support for type argument in PAL_GET_PSTATE
  [IA64] tidy up return value of ip_fast_csum
  [IA64] implement csum_ipv6_magic for ia64.
  [IA64] More Itanium PAL spec updates
  [IA64] Update processor_info features
  [IA64] Add se bit to Processor State Parameter structure
  [IA64] Add dp bit to cache and bus check structs
  [IA64] SN: Correctly update smp_affinty mask
  [IA64] sparse cleanups
  [IA64] IA64 Kexec/kdump

1  2 
arch/ia64/kernel/kprobes.c
arch/ia64/kernel/palinfo.c
arch/ia64/kernel/perfmon.c
include/linux/kexec.h
kernel/kexec.c

index 4d592ee9300b2739d6c82f569f0b1a02254ee09e,898a07d1d6f1bccfefc03a32e2e4ae87387053de..76e778951e20820208b7dea7ecc88c94e375d311
@@@ -481,7 -481,7 +481,7 @@@ void __kprobes arch_disarm_kprobe(struc
  void __kprobes arch_remove_kprobe(struct kprobe *p)
  {
        mutex_lock(&kprobe_mutex);
 -      free_insn_slot(p->ainsn.insn);
 +      free_insn_slot(p->ainsn.insn, 0);
        mutex_unlock(&kprobe_mutex);
  }
  /*
@@@ -851,7 -851,7 +851,7 @@@ static void ia64_get_bsp_cfm(struct unw
                        return;
                }
        } while (unw_unwind(info) >= 0);
-       lp->bsp = 0;
+       lp->bsp = NULL;
        lp->cfm = 0;
        return;
  }
index c4c10a0b99d94d1957e4457c6b65de6d6ecdf024,32f81b38ae48e9d587fe337879f507460c5e571e..a71df9ae03976ccbba7eb5154a639e941938ca44
@@@ -16,6 -16,7 +16,7 @@@
   * 02/05/2001   S.Eranian     fixed module support
   * 10/23/2001 S.Eranian       updated pal_perf_mon_info bug fixes
   * 03/24/2004 Ashok Raj       updated to work with CPU Hotplug
+  * 10/26/2006   Russ Anderson updated processor features to rev 2.2 spec
   */
  #include <linux/types.h>
  #include <linux/errno.h>
@@@ -314,13 -315,20 +315,20 @@@ vm_info(char *page
                     "Protection Key Registers(PKR)  : %d\n"
                     "Implemented bits in PKR.key    : %d\n"
                     "Hash Tag ID                    : 0x%x\n"
-                    "Size of RR.rid                 : %d\n",
+                    "Size of RR.rid                 : %d\n"
+                    "Max Purges                     : ",
                     vm_info_1.pal_vm_info_1_s.phys_add_size,
                     vm_info_2.pal_vm_info_2_s.impl_va_msb+1,
                     vm_info_1.pal_vm_info_1_s.max_pkr+1,
                     vm_info_1.pal_vm_info_1_s.key_size,
                     vm_info_1.pal_vm_info_1_s.hash_tag_id,
                     vm_info_2.pal_vm_info_2_s.rid_size);
+               if (vm_info_2.pal_vm_info_2_s.max_purges == PAL_MAX_PURGES)
+                       p += sprintf(p, "unlimited\n");
+               else
+                       p += sprintf(p, "%d\n",
+                               vm_info_2.pal_vm_info_2_s.max_purges ?
+                               vm_info_2.pal_vm_info_2_s.max_purges : 1);
        }
  
        if (ia64_pal_mem_attrib(&attrib) == 0) {
@@@ -467,7 -475,11 +475,11 @@@ static const char *proc_features[]=
        NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,
-       NULL,NULL,NULL,NULL,NULL,
+       "Unimplemented instruction address fault",
+       "INIT, PMI, and LINT pins",
+       "Simple unimplemented instr addresses",
+       "Variable P-state performance",
+       "Virtual machine features implemented",
        "XIP,XPSR,XFS implemented",
        "XR1-XR3 implemented",
        "Disable dynamic predicate prediction",
        "Disable dynamic data cache prefetch",
        "Disable dynamic inst cache prefetch",
        "Disable dynamic branch prediction",
-       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL,
+       "Disable P-states",
+       "Enable MCA on Data Poisoning",
+       "Enable vmsw instruction",
+       "Enable extern environmental notification",
        "Disable BINIT on processor time-out",
        "Disable dynamic power management (DPM)",
        "Disable coherency",
@@@ -952,6 -968,7 +968,6 @@@ remove_palinfo_proc_entries(unsigned in
        }
  }
  
 -#ifdef CONFIG_HOTPLUG_CPU
  static int palinfo_cpu_callback(struct notifier_block *nfb,
                                        unsigned long action, void *hcpu)
  {
@@@ -973,6 -990,7 +989,6 @@@ static struct notifier_block palinfo_cp
        .notifier_call = palinfo_cpu_callback,
        .priority = 0,
  };
 -#endif
  
  static int __init
  palinfo_init(void)
index e2321536ee4c067249bc9169524e1da0933f1cc9,fa4a1a7eb67d70db16b437b7abe5b0fa3280e6a3..dbb28164b19bcd3a2115b47d30ce3e4ab9d71db7
@@@ -853,9 -853,8 +853,8 @@@ pfm_context_alloc(void
         * allocate context descriptor 
         * must be able to free with interrupts disabled
         */
-       ctx = kmalloc(sizeof(pfm_context_t), GFP_KERNEL);
+       ctx = kzalloc(sizeof(pfm_context_t), GFP_KERNEL);
        if (ctx) {
-               memset(ctx, 0, sizeof(pfm_context_t));
                DPRINT(("alloc ctx @%p\n", ctx));
        }
        return ctx;
@@@ -2302,7 -2301,7 +2301,7 @@@ pfm_smpl_buffer_alloc(struct task_struc
        DPRINT(("smpl_buf @%p\n", smpl_buf));
  
        /* allocate vma */
 -      vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
 +      vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
        if (!vma) {
                DPRINT(("Cannot allocate vma\n"));
                goto error_kmem;
diff --combined include/linux/kexec.h
index e3abcec6c51c924f32d3181ac8038767034e407e,e14cd388c65be51b6e28fa97d851505b90daa710..d02425cdd801c28d94cef85666bdc564ae6c867e
@@@ -105,10 -105,13 +105,14 @@@ extern struct page *kimage_alloc_contro
                                                unsigned int order);
  extern void crash_kexec(struct pt_regs *);
  int kexec_should_crash(struct task_struct *);
 +void crash_save_cpu(struct pt_regs *regs, int cpu);
  extern struct kimage *kexec_image;
  extern struct kimage *kexec_crash_image;
  
+ #ifndef kexec_flush_icache_page
+ #define kexec_flush_icache_page(page)
+ #endif
  #define KEXEC_ON_CRASH  0x00000001
  #define KEXEC_ARCH_MASK 0xffff0000
  
@@@ -134,6 -137,7 +138,7 @@@ extern struct resource crashk_res
  typedef u32 note_buf_t[MAX_NOTE_BYTES/4];
  extern note_buf_t *crash_notes;
  
  #else /* !CONFIG_KEXEC */
  struct pt_regs;
  struct task_struct;
diff --combined kernel/kexec.c
index afbbbe981be288ecef8112b95a53321ee1971959,05aada2935927f80d668d0b0189426fc79049617..2a59c8a01ae0010da5ef5b80b39fad2ec1da14ae
@@@ -20,8 -20,6 +20,8 @@@
  #include <linux/syscalls.h>
  #include <linux/ioport.h>
  #include <linux/hardirq.h>
 +#include <linux/elf.h>
 +#include <linux/elfcore.h>
  
  #include <asm/page.h>
  #include <asm/uaccess.h>
@@@ -110,10 -108,11 +110,10 @@@ static int do_kimage_alloc(struct kimag
  
        /* Allocate a controlling structure */
        result = -ENOMEM;
 -      image = kmalloc(sizeof(*image), GFP_KERNEL);
 +      image = kzalloc(sizeof(*image), GFP_KERNEL);
        if (!image)
                goto out;
  
 -      memset(image, 0, sizeof(*image));
        image->head = 0;
        image->entry = &image->head;
        image->last_entry = &image->head;
@@@ -852,6 -851,7 +852,7 @@@ static int kimage_load_crash_segment(st
                        memset(ptr + uchunk, 0, mchunk - uchunk);
                }
                result = copy_from_user(ptr, buf, uchunk);
+               kexec_flush_icache_page(page);
                kunmap(page);
                if (result) {
                        result = (result < 0) ? result : -EIO;
@@@ -1068,60 -1068,6 +1069,60 @@@ void crash_kexec(struct pt_regs *regs
        }
  }
  
 +static u32 *append_elf_note(u32 *buf, char *name, unsigned type, void *data,
 +                          size_t data_len)
 +{
 +      struct elf_note note;
 +
 +      note.n_namesz = strlen(name) + 1;
 +      note.n_descsz = data_len;
 +      note.n_type   = type;
 +      memcpy(buf, &note, sizeof(note));
 +      buf += (sizeof(note) + 3)/4;
 +      memcpy(buf, name, note.n_namesz);
 +      buf += (note.n_namesz + 3)/4;
 +      memcpy(buf, data, note.n_descsz);
 +      buf += (note.n_descsz + 3)/4;
 +
 +      return buf;
 +}
 +
 +static void final_note(u32 *buf)
 +{
 +      struct elf_note note;
 +
 +      note.n_namesz = 0;
 +      note.n_descsz = 0;
 +      note.n_type   = 0;
 +      memcpy(buf, &note, sizeof(note));
 +}
 +
 +void crash_save_cpu(struct pt_regs *regs, int cpu)
 +{
 +      struct elf_prstatus prstatus;
 +      u32 *buf;
 +
 +      if ((cpu < 0) || (cpu >= NR_CPUS))
 +              return;
 +
 +      /* Using ELF notes here is opportunistic.
 +       * I need a well defined structure format
 +       * for the data I pass, and I need tags
 +       * on the data to indicate what information I have
 +       * squirrelled away.  ELF notes happen to provide
 +       * all of that, so there is no need to invent something new.
 +       */
 +      buf = (u32*)per_cpu_ptr(crash_notes, cpu);
 +      if (!buf)
 +              return;
 +      memset(&prstatus, 0, sizeof(prstatus));
 +      prstatus.pr_pid = current->pid;
 +      elf_core_copy_regs(&prstatus.pr_reg, regs);
 +      buf = append_elf_note(buf, "CORE", NT_PRSTATUS, &prstatus,
 +                              sizeof(prstatus));
 +      final_note(buf);
 +}
 +
  static int __init crash_notes_memory_init(void)
  {
        /* Allocate memory for saving cpu registers. */