public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, gregkh@suse.de
Subject: Re: acpi_handle is intel only.
Date: Tue, 08 May 2007 14:11:05 +0800	[thread overview]
Message-ID: <1178604665.3014.7.camel@ymzhang> (raw)
In-Reply-To: <20070505202930.GA6360@aepfle.de>

On Sat, 2007-05-05 at 22:29 +0200, Olaf Hering wrote:
> On Sat, May 05, Andrew Morton wrote:
> 
> > +gregkh-pci-pci-reduce-aer-init-error-information.patch
> 
> include/linux/pci-acpi.h:57: error: expected ')' before 'handle'
> make[4]: *** [drivers/pci/pcie/portdrv_pci.o] Error 1
> 
> acpi_handle is intel only.
Sorry. I didn't check CONFIG_ACPI=n. The acpi header file inclusion
is too complicated.

Below patch against 2.6.21+gregkh-pci-pci-reduce-aer-init-error-information.patch
fixes the compiling issue. I delete the acpi header file inclusion in aerdrv.h,
and move function aer_osc_setup to another file.

I tested it with both CONFIG_ACPI=y and CONFIG_ACPI=n.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>

---

diff -Nraup linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_acpi.c linux-2.6.21_aer_fix/drivers/pci/pcie/aer/aerdrv_acpi.c
--- linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_acpi.c	2007-05-09 21:00:15.000000000 +0800
+++ linux-2.6.21_aer_fix/drivers/pci/pcie/aer/aerdrv_acpi.c	1970-01-01 08:00:00.000000000 +0800
@@ -1,61 +0,0 @@
-/*
- * Access ACPI _OSC method
- *
- * Copyright (C) 2006 Intel Corp.
- *	Tom Long Nguyen (tom.l.nguyen@intel.com)
- *	Zhang Yanmin (yanmin.zhang@intel.com)
- *
- */
-
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/pm.h>
-#include <linux/suspend.h>
-#include <linux/acpi.h>
-#include <linux/pci-acpi.h>
-#include <linux/delay.h>
-#include "aerdrv.h"
-
-/**
- * aer_osc_setup - run ACPI _OSC method
- *
- * Return:
- *	Zero if success. Nonzero for otherwise.
- *
- * Invoked when PCIE bus loads AER service driver. To avoid conflict with
- * BIOS AER support requires BIOS to yield AER control to OS native driver.
- **/
-acpi_status aer_osc_setup(struct pci_dev *dev)
-{
-	acpi_status status = AE_NOT_FOUND;
-	acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
-	struct pci_dev *pdev = dev;
-	struct pci_bus *parent;
-
-	while (!handle) {
-		if (!pdev || !pdev->bus->parent)
-			break;
-		parent = pdev->bus->parent;
-		if (!parent->self)
-			/* Parent must be a host bridge */
-			handle = acpi_get_pci_rootbridge_handle(
-					pci_domain_nr(parent),
-					parent->number);
-		else
-			handle = DEVICE_ACPI_HANDLE(
-					&(parent->self->dev));
-		pdev = parent->self;
-	}
-
-	if (!handle)
-		return status;
-
-	pci_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT);
-	status = pci_osc_control_set(handle, OSC_PCI_EXPRESS_AER_CONTROL |
-		OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);
-
-	return status;
-}
-
diff -Nraup linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_core.c linux-2.6.21_aer_fix/drivers/pci/pcie/aer/aerdrv_core.c
--- linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_core.c	2007-05-09 21:00:15.000000000 +0800
+++ linux-2.6.21_aer_fix/drivers/pci/pcie/aer/aerdrv_core.c	2007-05-09 21:02:14.000000000 +0800
@@ -726,6 +726,47 @@ void aer_delete_rootport(struct aer_rpc 
 }
 
 /**
+ * aer_osc_setup - run ACPI _OSC method
+ *
+ * Return:
+ *	Zero if success. Nonzero for otherwise.
+ *
+ * Invoked when PCIE bus loads AER service driver. To avoid conflict with
+ * BIOS AER support requires BIOS to yield AER control to OS native driver.
+ **/
+acpi_status aer_osc_setup(struct pci_dev *dev)
+{
+	acpi_status status = AE_NOT_FOUND;
+	acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
+	struct pci_dev *pdev = dev;
+	struct pci_bus *parent;
+
+	while (!handle) {
+		if (!pdev || !pdev->bus->parent)
+			break;
+		parent = pdev->bus->parent;
+		if (!parent->self)
+			/* Parent must be a host bridge */
+			handle = acpi_get_pci_rootbridge_handle(
+					pci_domain_nr(parent),
+					parent->number);
+		else
+			handle = DEVICE_ACPI_HANDLE(
+					&(parent->self->dev));
+		pdev = parent->self;
+	}
+
+	if (!handle)
+		return status;
+
+	pci_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT);
+	status = pci_osc_control_set(handle, OSC_PCI_EXPRESS_AER_CONTROL |
+		OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);
+
+	return status;
+}
+
+/**
  * aer_init - provide AER initialization
  * @dev: pointer to AER pcie device
  *
diff -Nraup linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv.h linux-2.6.21_aer_fix/drivers/pci/pcie/aer/aerdrv.h
--- linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv.h	2007-05-09 21:00:15.000000000 +0800
+++ linux-2.6.21_aer_fix/drivers/pci/pcie/aer/aerdrv.h	2007-05-09 21:00:59.000000000 +0800
@@ -9,8 +9,6 @@
 #define _AERDRV_H_
 
 #include <linux/pcieport_if.h>
-#include <linux/acpi.h>
-#include <linux/pci-acpi.h>
 #include <linux/aer.h>
 
 #define AER_NONFATAL			0
@@ -118,6 +116,5 @@ extern void aer_delete_rootport(struct a
 extern int aer_init(struct pcie_device *dev);
 extern void aer_isr(struct work_struct *work);
 extern void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
-extern acpi_status aer_osc_setup(struct pci_dev *dev);
 
 #endif //_AERDRV_H_
diff -Nraup linux-2.6.21_aer/drivers/pci/pcie/aer/Makefile linux-2.6.21_aer_fix/drivers/pci/pcie/aer/Makefile
--- linux-2.6.21_aer/drivers/pci/pcie/aer/Makefile	2007-05-09 21:00:03.000000000 +0800
+++ linux-2.6.21_aer_fix/drivers/pci/pcie/aer/Makefile	2007-05-09 21:02:34.000000000 +0800
@@ -4,5 +4,5 @@
 
 obj-$(CONFIG_PCIEAER) += aerdriver.o
 
-aerdriver-objs := aerdrv_errprint.o aerdrv_core.o aerdrv.o aerdrv_acpi.o
+aerdriver-objs := aerdrv_errprint.o aerdrv_core.o aerdrv.o
 

  reply	other threads:[~2007-05-08  6:11 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-05  8:49 2.6.21-mm1 Andrew Morton
2007-05-05 10:36 ` 2.6.21-mm1 Pekka Enberg
2007-05-05 17:18   ` 2.6.21-mm1 Gabriel C
2007-05-05 10:54 ` 2.6.21-mm1 Gabriel C
2007-05-05 12:14 ` [-mm patch] mutex.h bogus __must_check (was Re: 2.6.21-mm1) Frederik Deweerdt
2007-05-05 18:31   ` Andrew Morton
2007-05-05 15:48 ` 2.6.21-mm1 Maciej Rutecki
2007-05-05 18:48   ` 2.6.21-mm1 Andrew Morton
2007-05-05 21:48     ` 2.6.21-mm1 Michael Buesch
2007-05-05 22:25       ` 2.6.21-mm1 John W. Linville
2007-05-05 16:09 ` 2.6.21-mm1 Gabriel C
2007-05-05 16:44 ` [-mm patch] fix fs/nfs/nfsroot.c compile error Adrian Bunk
2007-05-05 17:20   ` Trond Myklebust
2007-05-05 17:27     ` Trond Myklebust
2007-05-07 10:47   ` David Howells
2007-05-07 10:56     ` Adrian Bunk
2007-05-07 13:12       ` Trond Myklebust
2007-05-07 15:49         ` David Howells
2007-05-05 17:00 ` [-mm patch] fix unionfs compilation Adrian Bunk
2007-05-05 18:57   ` Andrew Morton
2007-05-05 19:09     ` Adrian Bunk
2007-05-05 19:13     ` Josef Sipek
2007-05-05 19:22       ` Andrew Morton
2007-05-05 19:19     ` Pekka Enberg
2007-05-05 19:23       ` Josef Sipek
2007-05-05 20:31   ` Josef Sipek
2007-05-05 17:19 ` [-mm patch] drivers/battery/olpc_battery.c: fix compilation Adrian Bunk
2007-05-05 17:30 ` [-mm patch] the OLPC laptop is not available for $100 Adrian Bunk
2007-05-06 21:04   ` Anton Vorontsov
2007-05-05 18:10 ` 2.6.21-mm1 Valdis.Kletnieks
2007-05-05 20:29 ` acpi_handle is intel only Olaf Hering
2007-05-08  6:11   ` Zhang, Yanmin [this message]
2007-05-05 20:38 ` cpufreq_set_policy [arch/powerpc/platforms/cell/cbe_cpufreq.ko] undefined! Olaf Hering
2007-05-05 21:13 ` [-mm patch] do_revoke error handling (was Re: 2.6.21-mm1) Frederik Deweerdt
2007-05-05 21:23   ` Pekka J Enberg
2007-05-05 21:47     ` Frederik Deweerdt
2007-05-06  9:12       ` Pekka Enberg
2007-05-05 23:22 ` 2.6.21-mm1 Simon Arlott
     [not found]   ` <a8f16e2b0705052130g37307df1vb7bd8a178d3130a@mail.gmail.com>
2007-05-06  4:33     ` 2.6.21-mm1 Dan Kruchinin
2007-05-06 20:44       ` 2.6.21-mm1 Sam Ravnborg
2007-05-06 20:55         ` 2.6.21-mm1 Andrew Morton
2007-05-06 22:01           ` 2.6.21-mm1 Williams, Dan J
2007-05-06 15:00     ` Fwd: 2.6.21-mm1 Simon Arlott
2007-05-06 20:23   ` 2.6.21-mm1 Sam Ravnborg
2007-05-06  6:49 ` 2.6.21-mm1 Valdis.Kletnieks
2007-05-06 20:57   ` 2.6.21-mm1 Sam Ravnborg
2007-05-06 21:08     ` 2.6.21-mm1 Andrew Morton
2007-05-06 21:27       ` 2.6.21-mm1 Sam Ravnborg
2007-05-06  9:03 ` [-mm patch] get_unmapped_area: remove now unused ret variable (was Re: 2.6.21-mm1) Frederik Deweerdt
2007-05-06 21:45   ` Benjamin Herrenschmidt
2007-05-06 14:59 ` 2.6.21-mm1 Simon Arlott
2007-05-06 20:08   ` 2.6.21-mm1 Andrew Morton
2007-05-06 21:04     ` 2.6.21-mm1 Satyam Sharma
2007-05-06 21:13       ` 2.6.21-mm1 Satyam Sharma
2007-05-06 21:22       ` 2.6.21-mm1 Andrew Morton
2007-05-06 21:13     ` 2.6.21-mm1 Simon Arlott
2007-05-06 19:00 ` 2.6.21-mm1: DRM does kmalloc(0) sometimes? Alexey Dobriyan
2007-05-06 19:30   ` [BUG] mixing 8250/16550 and AT91 serial ports causes oops Ryan Ordway
2007-05-06 20:05     ` Russell King
2007-05-06 20:36 ` 2.6.21-mm1 Simon Arlott
2007-05-06 20:54   ` 2.6.21-mm1 Andrew Morton
2007-05-06 21:07     ` 2.6.21-mm1 Simon Arlott
2007-05-07 22:58     ` sleeping function called from invalid context at block/cfq-iosched.c (Was: Re: 2.6.21-mm1) Simon Arlott
2007-05-07 23:23       ` Andrew Morton
2007-05-07 23:30         ` Simon Arlott
2007-05-07 23:33           ` Andrew Morton
2007-05-08  4:31             ` Jeremy Fitzhardinge
2007-05-08  5:24               ` Andrew Morton
2007-05-08  5:31                 ` William Lee Irwin III
2007-05-08  5:37                   ` Andrew Morton
2007-05-08  6:03                     ` William Lee Irwin III
2007-05-08  8:59                   ` Andi Kleen
2007-05-08 10:46                     ` William Lee Irwin III
2007-05-08  5:38                 ` Jeremy Fitzhardinge
2007-05-08  6:18                   ` David Chinner
2007-05-08  8:28                     ` Jan Engelhardt
2007-05-07 10:35 ` [PATCH] drivers/macintosh: remove default y from Kconfig (was: " Borislav Petkov
2007-05-08  8:33   ` Jan Engelhardt
2007-05-08 20:16     ` Borislav Petkov
2007-05-07 11:04 ` 2.6.21-mm1 Cornelia Huck
2007-05-07 16:06 ` 2.6.21-mm1 J.A. Magallón
2007-05-08  9:46 ` 2.6.21-mm1 -- x86 verify_cpu.S compile failure Andy Whitcroft
2007-05-08 15:24   ` Andi Kleen
2007-05-09  8:49     ` Andy Whitcroft
2007-05-09 16:06     ` Andy Whitcroft
2007-05-10  8:33       ` Andy Whitcroft
2007-05-08 13:04 ` 2.6.21-mm1 Andy Whitcroft
2007-05-08 16:07   ` 2.6.21-mm1 Christoph Lameter
2007-05-08 17:22 ` kmem_cache_init failure (was Re: 2.6.21-mm1) Frederik Deweerdt
2007-05-08 19:35   ` Andrew Morton
2007-05-08 22:12   ` Andi Kleen
2007-05-08 23:47     ` Frederik Deweerdt
2007-05-09  7:40   ` Jan Beulich
2007-05-09  9:00     ` Andi Kleen
2007-05-09 12:26       ` Frederik Deweerdt
2007-05-09 18:04         ` Frederik Deweerdt
2007-05-08 22:48 ` 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot Kevin Winchester
2007-05-08 23:04   ` Christoph Lameter
2007-05-08 23:33     ` Kevin Winchester
2007-05-08 23:43       ` Christoph Lameter
2007-05-09  0:58         ` 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot - crypto? Kevin Winchester
2007-05-09  3:02           ` Herbert Xu
2007-05-10 11:10             ` Kevin Winchester
2007-05-14 17:38               ` Luca Tettamanti
2007-05-15  1:43                 ` Herbert Xu
2007-05-15 18:52                   ` Luca Tettamanti
2007-05-18  3:19                     ` Herbert Xu
2007-05-18 12:09                       ` Luca
2007-05-18 13:14                         ` Herbert Xu
2007-05-18 19:16                           ` Luca Tettamanti
2007-05-18 20:48                             ` Chuck Ebbert
2007-05-19  4:50                             ` Herbert Xu
2007-05-17 17:46                   ` Luca Tettamanti
2007-05-17 19:20                     ` Luca
2007-05-08 23:57       ` 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot Christoph Lameter
2007-05-08 23:08   ` Christoph Lameter
2007-06-14  8:25 ` mach64 breakage in 2.6.22 Olaf Hering
2007-06-14 17:36   ` Ville Syrjälä
2007-06-18 14:45     ` Olaf Hering
2007-06-21 17:25       ` Ville Syrjälä
2007-06-22 16:06         ` Olaf Hering

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=1178604665.3014.7.camel@ymzhang \
    --to=yanmin_zhang@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox