[Top] [All Lists]

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

To: Greg KH <>, Yisheng Xie <>
Subject: Re: [PATCH v3 00/27] kill devm_ioremap_nocache
From: Guenter Roeck <>
Date: Sat, 23 Dec 2017 07:57:40 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1IfxSqrDmvb98HC/fFZYWsuw74blD3gNCqQyCuae3gI=; b=HxjkM2zporuAueqFs6JWY42sga4fNS2uEwwzCJdEFpxVWbulMULIJOeKOI1Ib+Mgct 2rmU+R9S2gO3utEE3rUALG1HA7y96rHFatXgalUBKIF4Z63cYYg97EPfiaCoaW4TdvH9 wzxqC2rUCnDs1efedLSIlT1iad3kvwuNRZ4bvS87AZPIiVp56lq7SrjaI0gUeYNEGdbC y1ncj8EmcOEEdgQ4XrLQZYqcTKAZEdS0NLU9TvLzrGq/B0lip7WPp0GiKDeGYJaekoF7 CoypLbYfoPwxMN8CWI9jhKoUtDIPBH36Bj85i5dt9Yho34mEpVIX6tZRp00g88Mo1Vaj 7Apg==
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
On 12/23/2017 05:48 AM, Greg KH wrote:
On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote:
Hi all,

When I tried to use devm_ioremap function and review related code, I found
devm_ioremap and devm_ioremap_nocache is almost the same with each other,
except one use ioremap while the other use ioremap_nocache.

For all arches?  Really?  Look at MIPS, and x86, they have different

Both mips and x86 end up mapping the same function, but other arches don't.
mn10300 is one where ioremap and ioremap_nocache are definitely different.


While ioremap's
default function is ioremap_nocache, so devm_ioremap_nocache also have the
same function with devm_ioremap, which can just be killed to reduce the size
of devres.o(from 20304 bytes to 18992 bytes in my compile environment).

I have posted two versions, which use macro instead of function for
devm_ioremap_nocache[1] or devm_ioremap[2]. And Greg suggest me to kill
devm_ioremap_nocache for no need to keep a macro around for the duplicate
thing. So here comes v3 and please help to review.

I don't think this can be done, what am I missing?  These functions are
not identical, sorry for missing that before.


greg k-h

<Prev in Thread] Current Thread [Next in Thread>