All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jurriaan <thunder7@xs4all.nl>
To: Patrick Mansfield <patmans@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.44: problemn when shutting down, drivers/base/power.c and the global_device_list
Date: Mon, 21 Oct 2002 20:35:00 +0200	[thread overview]
Message-ID: <20021021183500.GA501@middle.of.nowhere> (raw)
In-Reply-To: <20021021084425.A29967@eng2.beaverton.ibm.com>

From: Patrick Mansfield <patmans@us.ibm.com>
Date: Mon, Oct 21, 2002 at 08:44:25AM -0700
> On Mon, Oct 21, 2002 at 07:36:22AM +0200, Jurriaan wrote:
> > I tried this patch:
> > 
> 
> Mike meant try his patch or my patch, not Patrick Mochel's, just remove one
> of the two duplicate calls to device_register(&shost->host_driverfs_dev),
> either the one in scsi_register_host or the one in scsi_set_pci_device
> and try again.
> 
Excellent work. With this patch:

--- 1.19/drivers/scsi/hosts.h	Wed Oct 16 17:53:47 2002
+++ edited/drivers/scsi/hosts.h	Sun Oct 20 19:45:35 2002
@@ -551,9 +551,6 @@
 {
 	shost->pci_dev = pdev;
 	shost->host_driverfs_dev.parent=&pdev->dev;
-
-	/* register parent with driverfs */
-	device_register(&shost->host_driverfs_dev);
 }
 
and this patch from Manfred Spraul

--- a/arch/i386/kernel/apm.c	2002-10-12 06:21:05.000000000 +0200
+++ b/arch/i386/kernel/apm.new	2002-10-20 19:48:30.000000000 +0200
@@ -912,10 +911,10 @@
 #ifdef CONFIG_SMP
 	/* Some bioses don't like being called from CPU != 0 */
 	if (smp_processor_id() != 0) {
-		current->cpus_allowed = 1;
-		schedule();
-		if (unlikely(smp_processor_id() != 0))
-			BUG();
+		if (cpu_online(0))
+			set_cpus_allowed(current, 1);
+		else
+			printk(KERN_INFO "apm: CPU 0 is offline, trying apm shutdown from cpu %d\n", smp_processor_id());
 	}
 #endif
 	if (apm_info.realmode_power_off)
@@ -1693,10 +1692,10 @@
 	 * Method suggested by Ingo Molnar.
 	 */
 	if (smp_processor_id() != 0) {
-		current->cpus_allowed = 1;
-		schedule();
-		if (unlikely(smp_processor_id() != 0))
-			BUG();
+		if (cpu_online(0))
+			set_cpus_allowed(current, 1);
+		else
+			printk(KERN_INFO "apm: CPU 0 is offline, trying apm shutdown from cpu %d\n", smp_processor_id());
 	}
 #endif

All my problems are over - shutdown works perfectly here.

Thanks, everybody!

Jurriaan
-- 
The absence of alternatives clears the mind marvelously.
Henry Kissinger
GNU/Linux 2.5.44 SMP/ReiserFS 2x1380 bogomips load av: 3.48 2.08 1.08

  parent reply	other threads:[~2002-10-21 18:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-19 15:34 2.5.44: problemn when shutting down, drivers/base/power.c and the global_device_list Jurriaan
2002-10-20 20:21 ` Patrick Mochel
2002-10-20 21:59   ` Patrick Mansfield
2002-10-21  3:30     ` Mike Anderson
2002-10-21  5:36     ` Jurriaan
2002-10-21 17:33       ` Patrick Mochel
     [not found]       ` <20021021084425.A29967@eng2.beaverton.ibm.com>
2002-10-21 18:35         ` Jurriaan [this message]
2002-10-21  4:26   ` Mike Anderson
  -- strict thread matches above, loose matches on Subject: below --
2002-10-20  1:39 ALESSANDRO.SUARDI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021021183500.GA501@middle.of.nowhere \
    --to=thunder7@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patmans@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.