diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
tree | 2624a44924c625c367f3cebf937853b9da2de282 /drivers/edac/edac_mc.h | |
parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/edac/edac_mc.h')
-rw-r--r-- | drivers/edac/edac_mc.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h index 8d9e83909b9c..bf6ab8a8d5ed 100644 --- a/drivers/edac/edac_mc.h +++ b/drivers/edac/edac_mc.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #ifndef _EDAC_MC_H_ | 18 | #ifndef _EDAC_MC_H_ |
19 | #define _EDAC_MC_H_ | 19 | #define _EDAC_MC_H_ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
@@ -79,15 +78,17 @@ extern int edac_debug_level; | |||
79 | 78 | ||
80 | #endif /* !CONFIG_EDAC_DEBUG */ | 79 | #endif /* !CONFIG_EDAC_DEBUG */ |
81 | 80 | ||
82 | #define edac_xstr(s) edac_str(s) | ||
83 | #define edac_str(s) #s | ||
84 | #define EDAC_MOD_STR edac_xstr(KBUILD_BASENAME) | ||
85 | |||
86 | #define BIT(x) (1 << (x)) | 81 | #define BIT(x) (1 << (x)) |
87 | 82 | ||
88 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ | 83 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ |
89 | PCI_DEVICE_ID_ ## vend ## _ ## dev | 84 | PCI_DEVICE_ID_ ## vend ## _ ## dev |
90 | 85 | ||
86 | #if defined(CONFIG_X86) && defined(CONFIG_PCI) | ||
87 | #define dev_name(dev) pci_name(to_pci_dev(dev)) | ||
88 | #else | ||
89 | #define dev_name(dev) to_platform_device(dev)->name | ||
90 | #endif | ||
91 | |||
91 | /* memory devices */ | 92 | /* memory devices */ |
92 | enum dev_type { | 93 | enum dev_type { |
93 | DEV_UNKNOWN = 0, | 94 | DEV_UNKNOWN = 0, |
@@ -327,10 +328,10 @@ struct mem_ctl_info { | |||
327 | struct csrow_info *csrows; | 328 | struct csrow_info *csrows; |
328 | /* | 329 | /* |
329 | * FIXME - what about controllers on other busses? - IDs must be | 330 | * FIXME - what about controllers on other busses? - IDs must be |
330 | * unique. pdev pointer should be sufficiently unique, but | 331 | * unique. dev pointer should be sufficiently unique, but |
331 | * BUS:SLOT.FUNC numbers may not be unique. | 332 | * BUS:SLOT.FUNC numbers may not be unique. |
332 | */ | 333 | */ |
333 | struct pci_dev *pdev; | 334 | struct device *dev; |
334 | const char *mod_name; | 335 | const char *mod_name; |
335 | const char *mod_ver; | 336 | const char *mod_ver; |
336 | const char *ctl_name; | 337 | const char *ctl_name; |
@@ -353,6 +354,8 @@ struct mem_ctl_info { | |||
353 | struct completion kobj_complete; | 354 | struct completion kobj_complete; |
354 | }; | 355 | }; |
355 | 356 | ||
357 | #ifdef CONFIG_PCI | ||
358 | |||
356 | /* write all or some bits in a byte-register*/ | 359 | /* write all or some bits in a byte-register*/ |
357 | static inline void pci_write_bits8(struct pci_dev *pdev, int offset, u8 value, | 360 | static inline void pci_write_bits8(struct pci_dev *pdev, int offset, u8 value, |
358 | u8 mask) | 361 | u8 mask) |
@@ -401,14 +404,16 @@ static inline void pci_write_bits32(struct pci_dev *pdev, int offset, | |||
401 | pci_write_config_dword(pdev, offset, value); | 404 | pci_write_config_dword(pdev, offset, value); |
402 | } | 405 | } |
403 | 406 | ||
407 | #endif /* CONFIG_PCI */ | ||
408 | |||
404 | #ifdef CONFIG_EDAC_DEBUG | 409 | #ifdef CONFIG_EDAC_DEBUG |
405 | void edac_mc_dump_channel(struct channel_info *chan); | 410 | void edac_mc_dump_channel(struct channel_info *chan); |
406 | void edac_mc_dump_mci(struct mem_ctl_info *mci); | 411 | void edac_mc_dump_mci(struct mem_ctl_info *mci); |
407 | void edac_mc_dump_csrow(struct csrow_info *csrow); | 412 | void edac_mc_dump_csrow(struct csrow_info *csrow); |
408 | #endif /* CONFIG_EDAC_DEBUG */ | 413 | #endif /* CONFIG_EDAC_DEBUG */ |
409 | 414 | ||
410 | extern int edac_mc_add_mc(struct mem_ctl_info *mci); | 415 | extern int edac_mc_add_mc(struct mem_ctl_info *mci,int mc_idx); |
411 | extern struct mem_ctl_info * edac_mc_del_mc(struct pci_dev *pdev); | 416 | extern struct mem_ctl_info * edac_mc_del_mc(struct device *dev); |
412 | extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, | 417 | extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, |
413 | unsigned long page); | 418 | unsigned long page); |
414 | extern void edac_mc_scrub_block(unsigned long page, unsigned long offset, | 419 | extern void edac_mc_scrub_block(unsigned long page, unsigned long offset, |