linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: idle: delete access to ACPI_BITREG_BUS_MASTER_RLD
@ 2007-10-04  4:53 Len Brown
  2007-10-10  4:05 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Len Brown @ 2007-10-04  4:53 UTC (permalink / raw)
  To: ACPI Devel Maling List

From: Len Brown <len.brown@intel.com>

The ACPI specification describes PM1*_CNT_BLK.BM_RLD in two places.

The first description says that the OS needs to set BM_RLD
to enable bus master activity to wake the processor from C3.

The second description says that the platform sets BM_RLD
to indicate whether it was bus master activity that woke the
platform from C3 or not.

The first description is erroneous, the second description is correct.
Delete Linux's implementation of the first description.

Signed-off-by: Len Brown <len.brown@intel.com>

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f182613..4f004f1 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -192,26 +192,6 @@ acpi_processor_power_activate(struct acpi_processor *pr,
 		old->promotion.count = 0;
 	new->demotion.count = 0;
 
-	/* Cleanup from old state. */
-	if (old) {
-		switch (old->type) {
-		case ACPI_STATE_C3:
-			/* Disable bus master reload */
-			if (new->type != ACPI_STATE_C3 && pr->flags.bm_check)
-				acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
-			break;
-		}
-	}
-
-	/* Prepare to use new state. */
-	switch (new->type) {
-	case ACPI_STATE_C3:
-		/* Enable bus master reload */
-		if (old->type != ACPI_STATE_C3 && pr->flags.bm_check)
-			acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
-		break;
-	}
-
 	pr->power.state = new;
 
 	return;
@@ -1027,7 +1007,6 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
 					  " for C3 to be enabled on SMP systems\n"));
 			return;
 		}
-		acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
 	}
 
 	/*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: idle: delete access to ACPI_BITREG_BUS_MASTER_RLD
  2007-10-04  4:53 [PATCH] ACPI: idle: delete access to ACPI_BITREG_BUS_MASTER_RLD Len Brown
@ 2007-10-10  4:05 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2007-10-10  4:05 UTC (permalink / raw)
  To: ACPI Devel Maling List

I've been told that BM_RLD is not a NOP in the PIIX4 - ICH4-M generations;
and that those chips follow the 1st description in the ACPI spec, not
the second.  (I've also submitted a bug against the ACPI spec:-)

So the patch below is no good.
But the old code still isn't quite right.
It seems we should just set BM_RLD at initialization and forget about it
rather than monkeying with it at run-time.

cheers,
-Len


On Thursday 04 October 2007 00:53, Len Brown wrote:
> From: Len Brown <len.brown@intel.com>
> 
> The ACPI specification describes PM1*_CNT_BLK.BM_RLD in two places.
> 
> The first description says that the OS needs to set BM_RLD
> to enable bus master activity to wake the processor from C3.
> 
> The second description says that the platform sets BM_RLD
> to indicate whether it was bus master activity that woke the
> platform from C3 or not.
> 
> The first description is erroneous, the second description is correct.
> Delete Linux's implementation of the first description.
> 
> Signed-off-by: Len Brown <len.brown@intel.com>
> 
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index f182613..4f004f1 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -192,26 +192,6 @@ acpi_processor_power_activate(struct acpi_processor *pr,
>  		old->promotion.count = 0;
>  	new->demotion.count = 0;
>  
> -	/* Cleanup from old state. */
> -	if (old) {
> -		switch (old->type) {
> -		case ACPI_STATE_C3:
> -			/* Disable bus master reload */
> -			if (new->type != ACPI_STATE_C3 && pr->flags.bm_check)
> -				acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
> -			break;
> -		}
> -	}
> -
> -	/* Prepare to use new state. */
> -	switch (new->type) {
> -	case ACPI_STATE_C3:
> -		/* Enable bus master reload */
> -		if (old->type != ACPI_STATE_C3 && pr->flags.bm_check)
> -			acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
> -		break;
> -	}
> -
>  	pr->power.state = new;
>  
>  	return;
> @@ -1027,7 +1007,6 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
>  					  " for C3 to be enabled on SMP systems\n"));
>  			return;
>  		}
> -		acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
>  	}
>  
>  	/*
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-10  4:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-04  4:53 [PATCH] ACPI: idle: delete access to ACPI_BITREG_BUS_MASTER_RLD Len Brown
2007-10-10  4:05 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).