~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to drivers/edac/edac_core.h

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#define edac_printk(level, prefix, fmt, arg...) \
50
50
        printk(level "EDAC " prefix ": " fmt, ##arg)
51
51
 
 
52
#define edac_printk_verbose(level, prefix, fmt, arg...) \
 
53
        printk(level "EDAC " prefix ": " "in %s, line at %d: " fmt,     \
 
54
               __FILE__, __LINE__, ##arg)
 
55
 
52
56
#define edac_mc_printk(mci, level, fmt, arg...) \
53
57
        printk(level "EDAC MC%d: " fmt, mci->mc_idx, ##arg)
54
58
 
71
75
#ifdef CONFIG_EDAC_DEBUG
72
76
extern int edac_debug_level;
73
77
 
 
78
#ifndef CONFIG_EDAC_DEBUG_VERBOSE
 
79
#define edac_debug_printk(level, fmt, arg...)                           \
 
80
        do {                                                            \
 
81
                if (level <= edac_debug_level)                          \
 
82
                        edac_printk(KERN_DEBUG, EDAC_DEBUG,             \
 
83
                                    "%s: " fmt, __func__, ##arg);       \
 
84
        } while (0)
 
85
#else  /* CONFIG_EDAC_DEBUG_VERBOSE */
74
86
#define edac_debug_printk(level, fmt, arg...)                            \
75
87
        do {                                                             \
76
88
                if (level <= edac_debug_level)                           \
77
 
                        edac_printk(KERN_DEBUG, EDAC_DEBUG, fmt, ##arg); \
78
 
        } while(0)
 
89
                        edac_printk_verbose(KERN_DEBUG, EDAC_DEBUG, fmt, \
 
90
                                            ##arg);                     \
 
91
        } while (0)
 
92
#endif
79
93
 
80
94
#define debugf0( ... ) edac_debug_printk(0, __VA_ARGS__ )
81
95
#define debugf1( ... ) edac_debug_printk(1, __VA_ARGS__ )
136
150
        MEM_FB_DDR2,            /* fully buffered DDR2 */
137
151
        MEM_RDDR2,              /* Registered DDR2 RAM */
138
152
        MEM_XDR,                /* Rambus XDR */
 
153
        MEM_DDR3,               /* DDR3 RAM */
 
154
        MEM_RDDR3,              /* Registered DDR3 RAM */
139
155
};
140
156
 
141
157
#define MEM_FLAG_EMPTY          BIT(MEM_EMPTY)
153
169
#define MEM_FLAG_FB_DDR2        BIT(MEM_FB_DDR2)
154
170
#define MEM_FLAG_RDDR2          BIT(MEM_RDDR2)
155
171
#define MEM_FLAG_XDR            BIT(MEM_XDR)
 
172
#define MEM_FLAG_DDR3            BIT(MEM_DDR3)
 
173
#define MEM_FLAG_RDDR3           BIT(MEM_RDDR3)
156
174
 
157
175
/* chipset Error Detection and Correction capabilities and mode */
158
176
enum edac_type {
754
772
        pci_write_config_word(pdev, offset, value);
755
773
}
756
774
 
757
 
/* write all or some bits in a dword-register*/
 
775
/*
 
776
 * pci_write_bits32
 
777
 *
 
778
 * edac local routine to do pci_write_config_dword, but adds
 
779
 * a mask parameter. If mask is all ones, ignore the mask.
 
780
 * Otherwise utilize the mask to isolate specified bits
 
781
 *
 
782
 * write all or some bits in a dword-register
 
783
 */
758
784
static inline void pci_write_bits32(struct pci_dev *pdev, int offset,
759
785
                                    u32 value, u32 mask)
760
786
{
761
 
        if (mask != 0xffff) {
 
787
        if (mask != 0xffffffff) {
762
788
                u32 buf;
763
789
 
764
790
                pci_read_config_dword(pdev, offset, &buf);
819
845
                                int inst_nr, int block_nr, const char *msg);
820
846
extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
821
847
                                int inst_nr, int block_nr, const char *msg);
 
848
extern int edac_device_alloc_index(void);
822
849
 
823
850
/*
824
851
 * edac_pci APIs
831
858
extern void edac_pci_reset_delay_period(struct edac_pci_ctl_info *pci,
832
859
                                unsigned long value);
833
860
 
 
861
extern int edac_pci_alloc_index(void);
834
862
extern int edac_pci_add_device(struct edac_pci_ctl_info *pci, int edac_idx);
835
863
extern struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev);
836
864