From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/socperf/haswellunc_sa.c:203:39: sparse: sparse: cast removes address space '__iomem' of expression
Date: Sat, 05 Dec 2020 08:52:09 +0800 [thread overview]
Message-ID: <202012050806.hcFHaxQO-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8778 bytes --]
tree: https://github.com/mchinth/linux sep_socwatch_linux_5_9
head: 7296486889985b9d9895a39f551764a4b0425bea
commit: 4a8adda8065c4c6944ffedd3025605c845c262a5 [32/41] SEP/SOCWATCH resolve build errors after rebasing to linux v5.6-rc3
config: x86_64-randconfig-s031-20201204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
# https://github.com/mchinth/linux/commit/4a8adda8065c4c6944ffedd3025605c845c262a5
git remote add mchinth https://github.com/mchinth/linux
git fetch --no-tags mchinth sep_socwatch_linux_5_9
git checkout 4a8adda8065c4c6944ffedd3025605c845c262a5
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/platform/x86/socperf/haswellunc_sa.c:203:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socperf/haswellunc_sa.c:395:10: sparse: sparse: Initializer entry defined twice
drivers/platform/x86/socperf/haswellunc_sa.c:399:10: sparse: also defined here
--
>> drivers/platform/x86/socperf/npk_uncore.c:292:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socperf/npk_uncore.c:492:10: sparse: sparse: Initializer entry defined twice
drivers/platform/x86/socperf/npk_uncore.c:496:10: sparse: also defined here
--
>> drivers/platform/x86/socperf/soc_uncore.c:756:47: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socperf/soc_uncore.c:889:10: sparse: sparse: Initializer entry defined twice
drivers/platform/x86/socperf/soc_uncore.c:893:10: sparse: also defined here
--
>> drivers/platform/x86/sepdk/sep/chap.c:78:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/sepdk/sep/chap.c:90:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/sepdk/sep/chap.c:103:39: sparse: sparse: cast removes address space '__iomem' of expression
vim +/__iomem +203 drivers/platform/x86/socperf/haswellunc_sa.c
71
72 /*!
73 * @fn static VOID hswunc_sa_Write_PMU(VOID*)
74 *
75 * @brief Initial write of PMU registers
76 * Walk through the entries and write the value of the register accordingly.
77 * When current_group = 0, then this is the first time this routine is called,
78 *
79 * @param param - device index
80 *
81 * @return None
82 *
83 * <I>Special Notes:</I>
84 */
85 static VOID hswunc_sa_Write_PMU(VOID *param)
86 {
87 U32 dev_idx = *((U32 *)param);
88 U32 cur_grp = LWPMU_DEVICE_cur_group(device_uncore);
89 ECB pecb = LWPMU_DEVICE_PMU_register_data(device_uncore)[cur_grp];
90 DRV_PCI_DEVICE_ENTRY dpden;
91 U32 pci_address;
92 U32 bar_lo;
93 U64 bar_hi;
94 U64 final_bar;
95 U64 physical_address;
96 U32 dev_index = 0;
97 S32 bar_list[HSWUNC_SA_MAX_PCI_DEVICES];
98 U32 bar_index = 0;
99 U64 gdxc_bar = 0;
100 U32 map_size = 0;
101 U64 virtual_address = 0;
102 U64 mmio_offset = 0;
103 U32 bar_name = 0;
104 DRV_PCI_DEVICE_ENTRY curr_pci_entry = NULL;
105 U32 next_bar_offset = 0;
106 U32 i = 0;
107
108 for (dev_index = 0; dev_index < HSWUNC_SA_MAX_PCI_DEVICES;
109 dev_index++) {
110 bar_list[dev_index] = -1;
111 }
112
113 device_id = dev_idx;
114 // initialize the CHAP per-counter overflow numbers
115 for (i = 0; i < HSWUNC_SA_MAX_COUNTERS; i++) {
116 counter_overflow[i] = 0;
117 socperf_pcb[0].last_uncore_count[i] = 0;
118 }
119
120 ECB_pcidev_entry_list(pecb) = (DRV_PCI_DEVICE_ENTRY)(
121 (S8 *)pecb + ECB_pcidev_list_offset(pecb));
122 dpden = ECB_pcidev_entry_list(pecb);
123
124 if (counter_virtual_address) {
125 for (i = 0; i < ECB_num_entries(pecb); i++) {
126 writel(HSWUNC_SA_CHAP_STOP,
127 (void __iomem *)(((char *)(UIOP)counter_virtual_address) +
128 HSWUNC_SA_CHAP_CTRL_REG_OFFSET +
129 i * 0x10));
130 }
131 }
132
133 for (dev_index = 0; dev_index < ECB_num_pci_devices(pecb);
134 dev_index++) {
135 curr_pci_entry = &dpden[dev_index];
136 mmio_offset = DRV_PCI_DEVICE_ENTRY_base_offset_for_mmio(
137 curr_pci_entry);
138 bar_name = DRV_PCI_DEVICE_ENTRY_bar_name(curr_pci_entry);
139 if (DRV_PCI_DEVICE_ENTRY_config_type(curr_pci_entry) ==
140 UNC_PCICFG) {
141 pci_address = FORM_PCI_ADDR(
142 DRV_PCI_DEVICE_ENTRY_bus_no(curr_pci_entry),
143 DRV_PCI_DEVICE_ENTRY_dev_no(curr_pci_entry),
144 DRV_PCI_DEVICE_ENTRY_func_no(curr_pci_entry),
145 mmio_offset);
146 SOCPERF_PCI_Write_Ulong(
147 pci_address,
148 DRV_PCI_DEVICE_ENTRY_value(curr_pci_entry));
149 continue;
150 }
151 // UNC_MMIO programming
152 if (bar_list[bar_name] != -1) {
153 bar_index = bar_list[bar_name];
154 virtual_address = DRV_PCI_DEVICE_ENTRY_virtual_address(
155 &dpden[bar_index]);
156 DRV_PCI_DEVICE_ENTRY_virtual_address(curr_pci_entry) =
157 DRV_PCI_DEVICE_ENTRY_virtual_address(
158 &dpden[bar_index]);
159 writel(DRV_PCI_DEVICE_ENTRY_value(curr_pci_entry),
160 (void __iomem *)(((char *)(UIOP)virtual_address) +
161 mmio_offset));
162 continue;
163 }
164 if (bar_name == UNC_GDXCBAR) {
165 DRV_PCI_DEVICE_ENTRY_bar_address(curr_pci_entry) =
166 gdxc_bar;
167 } else {
168 pci_address = FORM_PCI_ADDR(
169 DRV_PCI_DEVICE_ENTRY_bus_no(curr_pci_entry),
170 DRV_PCI_DEVICE_ENTRY_dev_no(curr_pci_entry),
171 DRV_PCI_DEVICE_ENTRY_func_no(curr_pci_entry),
172 DRV_PCI_DEVICE_ENTRY_bar_offset(
173 curr_pci_entry));
174 bar_lo = SOCPERF_PCI_Read_Ulong(pci_address);
175 next_bar_offset = DRV_PCI_DEVICE_ENTRY_bar_offset(
176 curr_pci_entry) +
177 HSWUNC_SA_NEXT_ADDR_OFFSET;
178 pci_address = FORM_PCI_ADDR(
179 DRV_PCI_DEVICE_ENTRY_bus_no(curr_pci_entry),
180 DRV_PCI_DEVICE_ENTRY_dev_no(curr_pci_entry),
181 DRV_PCI_DEVICE_ENTRY_func_no(curr_pci_entry),
182 next_bar_offset);
183 bar_hi = SOCPERF_PCI_Read_Ulong(pci_address);
184 final_bar =
185 (bar_hi << HSWUNC_SA_BAR_ADDR_SHIFT) | bar_lo;
186 final_bar &= HSWUNC_SA_BAR_ADDR_MASK;
187
188 DRV_PCI_DEVICE_ENTRY_bar_address(curr_pci_entry) =
189 final_bar;
190 }
191 physical_address =
192 DRV_PCI_DEVICE_ENTRY_bar_address(curr_pci_entry);
193
194 if (physical_address) {
195 if (bar_name == UNC_MCHBAR) {
196 map_size = HSWUNC_SA_MCHBAR_MMIO_PAGE_SIZE;
197 } else if (bar_name == UNC_PCIEXBAR) {
198 map_size = HSWUNC_SA_PCIEXBAR_MMIO_PAGE_SIZE;
199 } else {
200 map_size = HSWUNC_SA_OTHER_BAR_MMIO_PAGE_SIZE;
201 }
202 DRV_PCI_DEVICE_ENTRY_virtual_address(curr_pci_entry) =
> 203 (U64)(UIOP)ioremap_cache(physical_address,
204 map_size);
205 virtual_address = DRV_PCI_DEVICE_ENTRY_virtual_address(
206 curr_pci_entry);
207
208 if (!gdxc_bar && bar_name == UNC_MCHBAR) {
209 bar_lo = readl(
210 (void __iomem *)((char *)(UIOP)virtual_address +
211 HSWUNC_SA_GDXCBAR_OFFSET_LO));
212 bar_hi = readl(
213 (void __iomem *)((char *)(UIOP)virtual_address +
214 HSWUNC_SA_GDXCBAR_OFFSET_HI));
215 gdxc_bar =
216 (bar_hi << HSWUNC_SA_BAR_ADDR_SHIFT) |
217 bar_lo;
218 gdxc_bar = gdxc_bar & HSWUNC_SA_GDXCBAR_MASK;
219 }
220 writel((U32)DRV_PCI_DEVICE_ENTRY_value(curr_pci_entry),
221 (void __iomem *)(((char *)(UIOP)virtual_address) +
222 mmio_offset));
223 bar_list[bar_name] = dev_index;
224 if (counter_virtual_address == 0 &&
225 bar_name == UNC_CHAPADR) {
226 counter_virtual_address = virtual_address;
227 }
228 }
229 }
230 }
231
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27269 bytes --]
next reply other threads:[~2020-12-05 0:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 0:52 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-29 20:10 [mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/socperf/haswellunc_sa.c:203:39: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
2020-09-25 20:48 [mchinth:sep_socwatch_linux_5_9 " kernel test robot
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=202012050806.hcFHaxQO-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.