Skip to content

Commit 4bdc0d6

Browse files
author
Christoph Hellwig
committed
remove ioremap_nocache and devm_ioremap_nocache
ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
1 parent d23cc63 commit 4bdc0d6

File tree

368 files changed

+508
-581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+508
-581
lines changed

Documentation/driver-api/driver-model/devres.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ IOMAP
313313
devm_ioport_map()
314314
devm_ioport_unmap()
315315
devm_ioremap()
316-
devm_ioremap_nocache()
317316
devm_ioremap_uc()
318317
devm_ioremap_wc()
319318
devm_ioremap_resource() : checks resource, requests memory region, ioremaps

Documentation/sound/kernel-api/writing-an-alsa-driver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ and the allocation would be like below:
10581058
return err;
10591059
}
10601060
chip->iobase_phys = pci_resource_start(pci, 0);
1061-
chip->iobase_virt = ioremap_nocache(chip->iobase_phys,
1061+
chip->iobase_virt = ioremap(chip->iobase_phys,
10621062
pci_resource_len(pci, 0));
10631063

10641064
and the corresponding destructor would be:

Documentation/x86/pat.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ address range to avoid any aliasing.
4444
+------------------------+----------+--------------+------------------+
4545
| ioremap_uc | -- | UC | UC |
4646
+------------------------+----------+--------------+------------------+
47-
| ioremap_nocache | -- | UC- | UC- |
48-
+------------------------+----------+--------------+------------------+
4947
| ioremap_wc | -- | -- | WC |
5048
+------------------------+----------+--------------+------------------+
5149
| ioremap_wt | -- | -- | WT |

arch/alpha/include/asm/io.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,8 @@ static inline void __iomem *ioremap(unsigned long port, unsigned long size)
283283
return IO_CONCAT(__IO_PREFIX,ioremap) (port, size);
284284
}
285285

286-
static inline void __iomem * ioremap_nocache(unsigned long offset,
287-
unsigned long size)
288-
{
289-
return ioremap(offset, size);
290-
}
291-
292-
#define ioremap_wc ioremap_nocache
293-
#define ioremap_uc ioremap_nocache
286+
#define ioremap_wc ioremap
287+
#define ioremap_uc ioremap
294288

295289
static inline void iounmap(volatile void __iomem *addr)
296290
{

arch/arm/include/asm/io.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ static inline void memcpy_toio(volatile void __iomem *to, const void *from,
356356
*
357357
* Function Memory type Cacheability Cache hint
358358
* ioremap() Device n/a n/a
359-
* ioremap_nocache() Device n/a n/a
360359
* ioremap_cache() Normal Writeback Read allocate
361360
* ioremap_wc() Normal Non-cacheable n/a
362361
* ioremap_wt() Normal Non-cacheable n/a
@@ -368,13 +367,6 @@ static inline void memcpy_toio(volatile void __iomem *to, const void *from,
368367
* - unaligned accesses are "unpredictable"
369368
* - writes may be delayed before they hit the endpoint device
370369
*
371-
* ioremap_nocache() is the same as ioremap() as there are too many device
372-
* drivers using this for device registers, and documentation which tells
373-
* people to use it for such for this to be any different. This is not a
374-
* safe fallback for memory-like mappings, or memory regions where the
375-
* compiler may generate unaligned accesses - eg, via inlining its own
376-
* memcpy.
377-
*
378370
* All normal memory mappings have the following properties:
379371
* - reads can be repeated with no side effects
380372
* - repeated reads return the last value written

arch/arm/mach-bcm/platsmp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int nsp_write_lut(unsigned int cpu)
105105
if (!secondary_boot_addr)
106106
return -EINVAL;
107107

108-
sku_rom_lut = ioremap_nocache((phys_addr_t)secondary_boot_addr,
108+
sku_rom_lut = ioremap((phys_addr_t)secondary_boot_addr,
109109
sizeof(phys_addr_t));
110110
if (!sku_rom_lut) {
111111
pr_warn("unable to ioremap SKU-ROM LUT register for cpu %u\n", cpu);
@@ -174,7 +174,7 @@ static int kona_boot_secondary(unsigned int cpu, struct task_struct *idle)
174174
if (!secondary_boot_addr)
175175
return -EINVAL;
176176

177-
boot_reg = ioremap_nocache((phys_addr_t)secondary_boot_addr,
177+
boot_reg = ioremap((phys_addr_t)secondary_boot_addr,
178178
sizeof(phys_addr_t));
179179
if (!boot_reg) {
180180
pr_err("unable to map boot register for cpu %u\n", cpu_id);

arch/arm/mach-davinci/devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void __iomem *davinci_sysmod_base;
3434

3535
void davinci_map_sysmod(void)
3636
{
37-
davinci_sysmod_base = ioremap_nocache(DAVINCI_SYSTEM_MODULE_BASE,
37+
davinci_sysmod_base = ioremap(DAVINCI_SYSTEM_MODULE_BASE,
3838
0x800);
3939
/*
4040
* Throw a bug since a lot of board initialization code depends

arch/arm/mach-pxa/magician.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ static void __init magician_init(void)
10081008
pxa_set_udc_info(&magician_udc_info);
10091009

10101010
/* Check LCD type we have */
1011-
cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000);
1011+
cpld = ioremap(PXA_CS3_PHYS, 0x1000);
10121012
if (cpld) {
10131013
u8 board_id = __raw_readb(cpld + 0x14);
10141014

arch/arm/mach-shmobile/platsmp-apmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static void apmu_init_cpu(struct resource *res, int cpu, int bit)
189189
if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem)
190190
return;
191191

192-
apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res));
192+
apmu_cpus[cpu].iomem = ioremap(res->start, resource_size(res));
193193
apmu_cpus[cpu].bit = bit;
194194

195195
pr_debug("apmu ioremap %d %d %pr\n", cpu, bit, res);

arch/arm/mach-shmobile/pm-rcar-gen2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void __init rcar_gen2_pm_init(void)
103103
iounmap(p);
104104

105105
/* setup reset vectors */
106-
p = ioremap_nocache(RST, 0x63);
106+
p = ioremap(RST, 0x63);
107107
bar = phys_to_sbar(res.start);
108108
if (has_a15) {
109109
writel_relaxed(bar, p + CA15BAR);

0 commit comments

Comments
 (0)