public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] check xpm2_control_block while setting bm_control
@ 2007-06-08 20:25 Venki Pallipadi
  2007-06-08 22:09 ` Pallipadi, Venkatesh
  0 siblings, 1 reply; 4+ messages in thread
From: Venki Pallipadi @ 2007-06-08 20:25 UTC (permalink / raw)
  To: Len Brown; +Cc: Robert Moore, linux-acpi


Check both pm2_control_block and cpm2_control_block for bm_control. It should
be better to do this with checking of address from consolidated
fadt_info_table[]. But, that will need some changes in acpica tables code.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Index: linux-2.6.22-rc-mm/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.22-rc-mm.orig/drivers/acpi/processor_core.c	2007-06-07 11:03:56.000000000 -0700
+++ linux-2.6.22-rc-mm/drivers/acpi/processor_core.c	2007-06-07 11:20:53.000000000 -0700
@@ -521,11 +521,22 @@
 
 	acpi_processor_errata(pr);
 
+	if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) {
+		/* FADT rev. 2 */
+		if (acpi_gbl_FADT.xpm_timer_block.space_id !=
+		    ACPI_ADR_SPACE_SYSTEM_IO)
 	/*
 	 * Check to see if we have bus mastering arbitration control.  This
 	 * is required for proper C3 usage (to maintain cache coherency).
+	 * Check both pm2_control_block and xpm2_control_block
 	 */
-	if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) {
+	if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
+	     acpi_gbl_FADT.xpm2_control_block.space_id ==
+						 ACPI_ADR_SPACE_SYSTEM_IO &&
+	     acpi_gbl_FADT.xpm2_control_block.address &&
+	     acpi_gbl_FADT.xpm2_control_block.bit_width) ||
+	    (acpi_gbl_FADT.pm2_control_block &&
+	     acpi_gbl_FADT.pm2_control_length)) {
 		pr->flags.bm_control = 1;
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 				  "Bus mastering arbitration control present\n"));

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

* RE: [PATCH] check xpm2_control_block while setting bm_control
  2007-06-08 20:25 [PATCH] check xpm2_control_block while setting bm_control Venki Pallipadi
@ 2007-06-08 22:09 ` Pallipadi, Venkatesh
  2007-06-08 22:16   ` Venki Pallipadi
  0 siblings, 1 reply; 4+ messages in thread
From: Pallipadi, Venkatesh @ 2007-06-08 22:09 UTC (permalink / raw)
  To: Pallipadi, Venkatesh, Brown, Len; +Cc: Moore, Robert, linux-acpi



Ooops. Sent the wrong/old version of the patch.
Len - Please do not apply this I will send a new one.

Thanks,
Venki 

>-----Original Message-----
>From: Pallipadi, Venkatesh 
>Sent: Friday, June 08, 2007 1:26 PM
>To: Brown, Len
>Cc: Moore, Robert; linux-acpi@vger.kernel.org
>Subject: [PATCH] check xpm2_control_block while setting bm_control
>
>
>Check both pm2_control_block and cpm2_control_block for 
>bm_control. It should
>be better to do this with checking of address from consolidated
>fadt_info_table[]. But, that will need some changes in acpica 
>tables code.
>
>Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
>Index: linux-2.6.22-rc-mm/drivers/acpi/processor_core.c
>===================================================================
>--- linux-2.6.22-rc-mm.orig/drivers/acpi/processor_core.c	
>2007-06-07 11:03:56.000000000 -0700
>+++ linux-2.6.22-rc-mm/drivers/acpi/processor_core.c	
>2007-06-07 11:20:53.000000000 -0700
>@@ -521,11 +521,22 @@
> 
> 	acpi_processor_errata(pr);
> 
>+	if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) {
>+		/* FADT rev. 2 */
>+		if (acpi_gbl_FADT.xpm_timer_block.space_id !=
>+		    ACPI_ADR_SPACE_SYSTEM_IO)
> 	/*
> 	 * Check to see if we have bus mastering arbitration 
>control.  This
> 	 * is required for proper C3 usage (to maintain cache 
>coherency).
>+	 * Check both pm2_control_block and xpm2_control_block
> 	 */
>-	if (acpi_gbl_FADT.pm2_control_block && 
>acpi_gbl_FADT.pm2_control_length) {
>+	if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
>+	     acpi_gbl_FADT.xpm2_control_block.space_id ==
>+						 
>ACPI_ADR_SPACE_SYSTEM_IO &&
>+	     acpi_gbl_FADT.xpm2_control_block.address &&
>+	     acpi_gbl_FADT.xpm2_control_block.bit_width) ||
>+	    (acpi_gbl_FADT.pm2_control_block &&
>+	     acpi_gbl_FADT.pm2_control_length)) {
> 		pr->flags.bm_control = 1;
> 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
> 				  "Bus mastering arbitration 
>control present\n"));
>

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

* Re: [PATCH] check xpm2_control_block while setting bm_control
  2007-06-08 22:09 ` Pallipadi, Venkatesh
@ 2007-06-08 22:16   ` Venki Pallipadi
  2007-07-19  1:54     ` Brown, Len
  0 siblings, 1 reply; 4+ messages in thread
From: Venki Pallipadi @ 2007-06-08 22:16 UTC (permalink / raw)
  To: Pallipadi, Venkatesh; +Cc: Brown, Len, Moore, Robert, linux-acpi

On Fri, Jun 08, 2007 at 03:09:47PM -0700, Pallipadi, Venkatesh wrote:
> 
> 
> Ooops. Sent the wrong/old version of the patch.
> Len - Please do not apply this I will send a new one.
> 
> Thanks,
> Venki 
> 
Below is the proper patch I wanted to send earlier.
Thanks,
Venki



Check both pm2_control_block and cpm2_control_block for bm_control. It should
be better to do this with checking of address from consolidated
fadt_info_table[]. But, that will need some changes in acpica tables.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Index: linux-2.6.22-rc-mm/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.22-rc-mm.orig/drivers/acpi/processor_core.c	2007-06-07 11:33:00.000000000 -0700
+++ linux-2.6.22-rc-mm/drivers/acpi/processor_core.c	2007-06-08 14:26:32.000000000 -0700
@@ -524,8 +524,15 @@
 	/*
 	 * Check to see if we have bus mastering arbitration control.  This
 	 * is required for proper C3 usage (to maintain cache coherency).
+	 * Check both pm2_control_block and xpm2_control_block
 	 */
-	if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) {
+	if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
+	     acpi_gbl_FADT.xpm2_control_block.space_id ==
+						 ACPI_ADR_SPACE_SYSTEM_IO &&
+	     acpi_gbl_FADT.xpm2_control_block.address &&
+	     acpi_gbl_FADT.xpm2_control_block.bit_width) ||
+	    (acpi_gbl_FADT.pm2_control_block &&
+	     acpi_gbl_FADT.pm2_control_length)) {
 		pr->flags.bm_control = 1;
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 				  "Bus mastering arbitration control present\n"));

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

* RE: [PATCH] check xpm2_control_block while setting bm_control
  2007-06-08 22:16   ` Venki Pallipadi
@ 2007-07-19  1:54     ` Brown, Len
  0 siblings, 0 replies; 4+ messages in thread
From: Brown, Len @ 2007-07-19  1:54 UTC (permalink / raw)
  To: Pallipadi, Venkatesh; +Cc: Moore, Robert, linux-acpi

as fadt_info_table[] and acpi_tb_convert_fadt()
will always put the valid address at acpi_gbl_FADT.xpm2_control_block --
that is the only one you need to check, and you don't need to check
FADT version.

thanks,
-Len
 

>-----Original Message-----
>From: Pallipadi, Venkatesh 
>Sent: Friday, June 08, 2007 6:16 PM
>To: Pallipadi, Venkatesh
>Cc: Brown, Len; Moore, Robert; linux-acpi@vger.kernel.org
>Subject: Re: [PATCH] check xpm2_control_block while setting bm_control
>
>On Fri, Jun 08, 2007 at 03:09:47PM -0700, Pallipadi, Venkatesh wrote:
>> 
>> 
>> Ooops. Sent the wrong/old version of the patch.
>> Len - Please do not apply this I will send a new one.
>> 
>> Thanks,
>> Venki 
>> 
>Below is the proper patch I wanted to send earlier.
>Thanks,
>Venki
>
>
>
>Check both pm2_control_block and cpm2_control_block for 
>bm_control. It should
>be better to do this with checking of address from consolidated
>fadt_info_table[]. But, that will need some changes in acpica tables.
>
>Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
>Index: linux-2.6.22-rc-mm/drivers/acpi/processor_core.c
>===================================================================
>--- linux-2.6.22-rc-mm.orig/drivers/acpi/processor_core.c	
>2007-06-07 11:33:00.000000000 -0700
>+++ linux-2.6.22-rc-mm/drivers/acpi/processor_core.c	
>2007-06-08 14:26:32.000000000 -0700
>@@ -524,8 +524,15 @@
> 	/*
> 	 * Check to see if we have bus mastering arbitration 
>control.  This
> 	 * is required for proper C3 usage (to maintain cache 
>coherency).
>+	 * Check both pm2_control_block and xpm2_control_block
> 	 */
>-	if (acpi_gbl_FADT.pm2_control_block && 
>acpi_gbl_FADT.pm2_control_length) {
>+	if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
>+	     acpi_gbl_FADT.xpm2_control_block.space_id ==
>+						 
>ACPI_ADR_SPACE_SYSTEM_IO &&
>+	     acpi_gbl_FADT.xpm2_control_block.address &&
>+	     acpi_gbl_FADT.xpm2_control_block.bit_width) ||
>+	    (acpi_gbl_FADT.pm2_control_block &&
>+	     acpi_gbl_FADT.pm2_control_length)) {
> 		pr->flags.bm_control = 1;
> 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
> 				  "Bus mastering arbitration 
>control present\n"));
>

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

end of thread, other threads:[~2007-07-19  1:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08 20:25 [PATCH] check xpm2_control_block while setting bm_control Venki Pallipadi
2007-06-08 22:09 ` Pallipadi, Venkatesh
2007-06-08 22:16   ` Venki Pallipadi
2007-07-19  1:54     ` Brown, Len

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox