Browse Source

Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix arch/ia64/pci/pci.c:571: warning: `return' with a value
  [IA64] Speed up boot - skip unnecessary clock calibration
  [IA64] bugfix stack layout upside-down
  [IA64] Fix possible invalid memory access in ia64_setup_msi_irq()
Linus Torvalds 18 years ago
parent
commit
9754c5f6cb
4 changed files with 18 additions and 4 deletions
  1. 1 1
      arch/ia64/kernel/msi_ia64.c
  2. 16 1
      arch/ia64/kernel/smpboot.c
  3. 1 1
      arch/ia64/mm/init.c
  4. 0 1
      arch/ia64/pci/pci.c

+ 1 - 1
arch/ia64/kernel/msi_ia64.c

@@ -68,7 +68,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 {
 {
 	struct msi_msg	msg;
 	struct msi_msg	msg;
 	unsigned long	dest_phys_id;
 	unsigned long	dest_phys_id;
-	unsigned int	irq, vector;
+	int	irq, vector;
 
 
 	irq = create_irq();
 	irq = create_irq();
 	if (irq < 0)
 	if (irq < 0)

+ 16 - 1
arch/ia64/kernel/smpboot.c

@@ -375,6 +375,7 @@ static void __devinit
 smp_callin (void)
 smp_callin (void)
 {
 {
 	int cpuid, phys_id, itc_master;
 	int cpuid, phys_id, itc_master;
+	struct cpuinfo_ia64 *last_cpuinfo, *this_cpuinfo;
 	extern void ia64_init_itm(void);
 	extern void ia64_init_itm(void);
 	extern volatile int time_keeper_id;
 	extern volatile int time_keeper_id;
 
 
@@ -424,7 +425,21 @@ smp_callin (void)
 	 * Get our bogomips.
 	 * Get our bogomips.
 	 */
 	 */
 	ia64_init_itm();
 	ia64_init_itm();
-	calibrate_delay();
+
+	/*
+	 * Delay calibration can be skipped if new processor is identical to the
+	 * previous processor.
+	 */
+	last_cpuinfo = cpu_data(cpuid - 1);
+	this_cpuinfo = local_cpu_data;
+	if (last_cpuinfo->itc_freq != this_cpuinfo->itc_freq ||
+	    last_cpuinfo->proc_freq != this_cpuinfo->proc_freq ||
+	    last_cpuinfo->features != this_cpuinfo->features ||
+	    last_cpuinfo->revision != this_cpuinfo->revision ||
+	    last_cpuinfo->family != this_cpuinfo->family ||
+	    last_cpuinfo->archrev != this_cpuinfo->archrev ||
+	    last_cpuinfo->model != this_cpuinfo->model)
+		calibrate_delay();
 	local_cpu_data->loops_per_jiffy = loops_per_jiffy;
 	local_cpu_data->loops_per_jiffy = loops_per_jiffy;
 
 
 #ifdef CONFIG_IA32_SUPPORT
 #ifdef CONFIG_IA32_SUPPORT

+ 1 - 1
arch/ia64/mm/init.c

@@ -155,7 +155,7 @@ ia64_set_rbs_bot (void)
 
 
 	if (stack_size > MAX_USER_STACK_SIZE)
 	if (stack_size > MAX_USER_STACK_SIZE)
 		stack_size = MAX_USER_STACK_SIZE;
 		stack_size = MAX_USER_STACK_SIZE;
-	current->thread.rbs_bot = STACK_TOP - stack_size;
+	current->thread.rbs_bot = PAGE_ALIGN(current->mm->start_stack - stack_size);
 }
 }
 
 
 /*
 /*

+ 0 - 1
arch/ia64/pci/pci.c

@@ -568,7 +568,6 @@ pcibios_disable_device (struct pci_dev *dev)
 	BUG_ON(atomic_read(&dev->enable_cnt));
 	BUG_ON(atomic_read(&dev->enable_cnt));
 	if (!dev->msi_enabled)
 	if (!dev->msi_enabled)
 		acpi_pci_irq_disable(dev);
 		acpi_pci_irq_disable(dev);
-	return 0;
 }
 }
 
 
 void
 void