From: Catalin Marinas <catalin.marinas@arm•com>
To: Mark Rutland <mark.rutland@arm•com>
Cc: kbuild test robot <lkp@intel•com>,
kbuild-all@01•org, Geert Uytterhoeven <geert@linux-m68k•org>,
Arnd Bergmann <arnd@arndb•de>,
Sudip Mukherjee <sudipm.mukherjee@gmail•com>,
Stephen Rothwell <sfr@canb•auug.org.au>,
Linux-Next <linux-next@vger•kernel.org>,
"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
Ard Biesheuvel <ard.biesheuvel@linaro•org>,
Jeremy Linton <jeremy.linton@arm•com>,
Linux-Arch <linux-arch@vger•kernel.org>,
Laura Abbott <labbott@fedoraproject•org>,
Jeff Dike <jdike@addtoit•com>,
Richard Weinberger <richard@nod•at>
Subject: Re: [PATCH] asm-generic: Fix build when __set_fixmap is absent
Date: Tue, 9 Feb 2016 17:27:16 +0000 [thread overview]
Message-ID: <20160209172716.GJ16122@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <20160209172125.GA4348@leverpostej>
On Tue, Feb 09, 2016 at 05:21:26PM +0000, Mark Rutland wrote:
> From 6d283603d18071690dc138e4a0591a445a1d1e30 Mon Sep 17 00:00:00 2001
> From: Mark Rutland <mark.rutland@arm•com>
> Date: Tue, 9 Feb 2016 17:08:26 +0000
> Subject: [PATCH] asm-generic: make __set_fixmap_offset a macro again
>
> Turning __set_fixmap_offset into a static inline breaks the build for
> several architectures. Fixing this properly requires updates to a number
> of architectures to make them agree on the prototype of __set_fixmap.
>
> For the timebeing, restore __set_fixmap_offset to its prior state as a
> macro function, reverting commit ac4c0ac73485867c ("asm-generic: make
> __set_fixmap_offset a static inline"). To avoid the original issue with
> namespace clashes, 'addr' is prefixed with a liberal sprinking of
> underscores.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm•com>
> Cc: Arnd Bergmann <arnd@arndb•de>
> Cc: Catalin Marinas <catalin.marinas@arm•com>
> ---
> include/asm-generic/fixmap.h | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h
> index f9c27b6..827e4d3 100644
> --- a/include/asm-generic/fixmap.h
> +++ b/include/asm-generic/fixmap.h
> @@ -70,13 +70,13 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
> #endif
>
> /* Return a pointer with offset calculated */
> -static inline unsigned long __set_fixmap_offset(enum fixed_addresses idx,
> - phys_addr_t phys,
> - pgprot_t flags)
> -{
> - __set_fixmap(idx, phys, flags);
> - return fix_to_virt(idx) + (phys & (PAGE_SIZE - 1));
> -}
> +#define __set_fixmap_offset(idx, phys, flags) \
> +({ \
> + unsigned long ________addr; \
> + __set_fixmap(idx, phys, flags); \
> + ________addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \
> + ________addr; \
> +})
>
> #define set_fixmap_offset(idx, phys) \
> __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NORMAL)
> --
> 1.9.1
It looks fine to me.
--
Catalin
prev parent reply other threads:[~2016-02-09 17:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 5:41 linux-next: Tree for Feb 9 Stephen Rothwell
2016-02-09 7:34 ` Sudip Mukherjee
2016-02-09 12:00 ` Mark Rutland
2016-02-09 13:48 ` Geert Uytterhoeven
2016-02-09 14:35 ` Mark Rutland
2016-02-09 14:38 ` Catalin Marinas
2016-02-09 15:08 ` Arnd Bergmann
2016-02-09 16:01 ` Mark Rutland
2016-02-09 16:08 ` Arnd Bergmann
2016-02-09 16:13 ` [PATCH] asm-generic: Fix build when __set_fixmap is absent kbuild test robot
2016-02-09 16:33 ` Mark Rutland
2016-02-09 16:45 ` Arnd Bergmann
2016-02-09 16:52 ` Catalin Marinas
2016-02-09 17:21 ` Mark Rutland
2016-02-09 17:27 ` Catalin Marinas [this message]
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=20160209172716.GJ16122@e104818-lin.cambridge.arm.com \
--to=catalin.marinas@arm$(echo .)com \
--cc=ard.biesheuvel@linaro$(echo .)org \
--cc=arnd@arndb$(echo .)de \
--cc=geert@linux-m68k$(echo .)org \
--cc=jdike@addtoit$(echo .)com \
--cc=jeremy.linton@arm$(echo .)com \
--cc=kbuild-all@01$(echo .)org \
--cc=labbott@fedoraproject$(echo .)org \
--cc=linux-arch@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=lkp@intel$(echo .)com \
--cc=mark.rutland@arm$(echo .)com \
--cc=richard@nod$(echo .)at \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=sudipm.mukherjee@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox