linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] asm-generic/io.h: Add default configuration for readX/writeX_relaxed
@ 2014-04-08  7:16 Michal Simek
  2014-04-08 17:50 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2014-04-08  7:16 UTC (permalink / raw)
  To: linux-kernel, monstr; +Cc: git, wsa, Arnd Bergmann, linux-arch

[-- Attachment #1: Type: text/plain, Size: 7246 bytes --]

Define default readX/writeX_relaxed IO helper functions
for all archs which use asm-generic/io.h.
Using COMPILE_TEST, moving drivers out of arch/arm and
removing architecture dependencies in Kconfig is causing
that more and more drivers is using _relaxed IO helper
functions which is causing compilation failures on architectures
which don't define them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

git://git.monstr.eu/linux-2.6-microblaze  xnext/io
4b9d4a7ed112d0b68b654f09b87ad16ccd644a47  asm-generic/io.h: Add default configuration for readX/writeX_relaxed

elapsed time: 59m

configs tested: 119

sparc                               defconfig
sparc64                          allmodconfig
sparc64                           allnoconfig
sparc64                             defconfig
avr32                      atngw100_defconfig
avr32                     atstk1006_defconfig
frv                                 defconfig
mn10300                     asb2364_defconfig
openrisc                    or1ksim_defconfig
tile                         tilegx_defconfig
um                             i386_defconfig
um                           x86_64_defconfig
alpha                               defconfig
parisc                            allnoconfig
parisc                         b180_defconfig
parisc                        c3000_defconfig
parisc                              defconfig
arm                              allmodconfig
arm                               allnoconfig
arm                                      arm5
arm                                     arm67
arm                         at91_dt_defconfig
arm                                  at_hdmac
arm                                    ep93xx
arm                       imx_v6_v7_defconfig
arm                                  iop-adma
arm                          marzen_defconfig
arm                                       mmp
arm                       omap2plus_defconfig
arm                          prima2_defconfig
arm                         s3c2410_defconfig
arm                                    sa1100
arm                                   samsung
arm                                        sh
arm                       spear13xx_defconfig
arm                           tegra_defconfig
x86_64                            allnoconfig
sh                                allnoconfig
sh                          rsk7269_defconfig
sh                  sh7785lcr_32bit_defconfig
sh                            titan_defconfig
x86_64                     randconfig-c0-0407
x86_64                     randconfig-c1-0407
x86_64                     randconfig-c2-0407
x86_64                     randconfig-c3-0407
ia64                             alldefconfig
ia64                             allmodconfig
ia64                              allnoconfig
ia64                                defconfig
microblaze                       allyesconfig
microblaze                      mmu_defconfig
microblaze                    nommu_defconfig
mips                             allmodconfig
mips                              allnoconfig
mips                      fuloong2e_defconfig
mips                                   jz4740
mips                                     txx9
i386                             allyesconfig
i386                             alldefconfig
i386                             allmodconfig
i386                              allnoconfig
i386                                defconfig
m32r                       m32104ut_defconfig
m32r                     mappi3.smp_defconfig
m32r                         opsput_defconfig
m32r                           usrv_defconfig
xtensa                       common_defconfig
xtensa                          iss_defconfig
i386                      randconfig-fd0-0407
i386                      randconfig-fd1-0407
i386                      randconfig-fd2-0407
i386                      randconfig-fd3-0407
powerpc                      chroma_defconfig
powerpc               corenet64_smp_defconfig
powerpc                    gamecube_defconfig
powerpc                 linkstation_defconfig
powerpc                         wii_defconfig
i386                      randconfig-iv0-0407
i386                      randconfig-iv1-0407
i386                      randconfig-iv2-0407
i386                      randconfig-iv3-0407
x86_64                           allmodconfig
x86_64                    randconfig-sb0-0407
x86_64                    randconfig-sb1-0407
x86_64                    randconfig-sb2-0407
x86_64                    randconfig-sb3-0407
m68k                             allmodconfig
m68k                          amiga_defconfig
m68k                       m5475evb_defconfig
m68k                          multi_defconfig
blackfin                BF526-EZBRD_defconfig
blackfin                BF533-EZKIT_defconfig
blackfin            BF561-EZKIT-SMP_defconfig
blackfin                  TCM-BF537_defconfig
cris                 etrax-100lx_v2_defconfig
i386                       randconfig-r0-0407
i386                       randconfig-r1-0407
i386                       randconfig-r2-0407
i386                       randconfig-r3-0407
s390                             allmodconfig
s390                              allnoconfig
s390                                defconfig
x86_64                 randconfig-s0-03291922
x86_64                 randconfig-s1-03291922
x86_64                 randconfig-s2-03291922
x86_64                 randconfig-s3-03291922
x86_64                 randconfig-s4-03291922
x86_64                 randconfig-s5-03291922
arm                      jornada720_defconfig
ia64                            sim_defconfig
x86_64                                    lkp
x86_64                                   rhel
powerpc                          allmodconfig
powerpc                           allnoconfig
powerpc                             defconfig
powerpc                       ppc64_defconfig
x86_64                             acpi-redef
x86_64                           allyesdebian
x86_64                                nfsroot
---
 include/asm-generic/io.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index d5afe96..0b1de87 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -73,6 +73,18 @@ static inline void __raw_writeb(u8 b, volatile void __iomem *addr)
 }
 #endif

+#ifndef readb_relaxed
+#define readb_relaxed readb
+#endif
+
+#ifndef readw_relaxed
+#define readw_relaxed readw
+#endif
+
+#ifndef readl_relaxed
+#define readl_relaxed readl
+#endif
+
 #ifndef __raw_writew
 static inline void __raw_writew(u16 b, volatile void __iomem *addr)
 {
@@ -91,6 +103,18 @@ static inline void __raw_writel(u32 b, volatile void __iomem *addr)
 #define writew(b,addr) __raw_writew(__cpu_to_le16(b),addr)
 #define writel(b,addr) __raw_writel(__cpu_to_le32(b),addr)

+#ifndef writeb_relaxed
+#define writeb_relaxed writeb
+#endif
+
+#ifndef writew_relaxed
+#define writew_relaxed writew
+#endif
+
+#ifndef writel_relaxed
+#define writel_relaxed writel
+#endif
+
 #ifdef CONFIG_64BIT
 #ifndef __raw_readq
 static inline u64 __raw_readq(const volatile void __iomem *addr)
--
1.8.2.3


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] asm-generic/io.h: Add default configuration for readX/writeX_relaxed
  2014-04-08  7:16 [PATCH] asm-generic/io.h: Add default configuration for readX/writeX_relaxed Michal Simek
@ 2014-04-08 17:50 ` Sam Ravnborg
  2014-04-08 18:07   ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2014-04-08 17:50 UTC (permalink / raw)
  To: Michal Simek; +Cc: linux-kernel, monstr, git, wsa, Arnd Bergmann, linux-arch

On Tue, Apr 08, 2014 at 09:16:01AM +0200, Michal Simek wrote:
> Define default readX/writeX_relaxed IO helper functions
> for all archs which use asm-generic/io.h.
> Using COMPILE_TEST, moving drivers out of arch/arm and
> removing architecture dependencies in Kconfig is causing
> that more and more drivers is using _relaxed IO helper
> functions which is causing compilation failures on architectures
> which don't define them.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

There is a potential cleanup patch for several architectures.
Those that already have similar defines can have them deleted as
they are now provided by the generic version.
Can you try to look into this too?

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] asm-generic/io.h: Add default configuration for readX/writeX_relaxed
  2014-04-08 17:50 ` Sam Ravnborg
@ 2014-04-08 18:07   ` Michal Simek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Simek @ 2014-04-08 18:07 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Michal Simek, linux-kernel, git, wsa, Arnd Bergmann, linux-arch

[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]

Hi Sam,

On 04/08/2014 07:50 PM, Sam Ravnborg wrote:
> On Tue, Apr 08, 2014 at 09:16:01AM +0200, Michal Simek wrote:
>> Define default readX/writeX_relaxed IO helper functions
>> for all archs which use asm-generic/io.h.
>> Using COMPILE_TEST, moving drivers out of arch/arm and
>> removing architecture dependencies in Kconfig is causing
>> that more and more drivers is using _relaxed IO helper
>> functions which is causing compilation failures on architectures
>> which don't define them.
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> 
> There is a potential cleanup patch for several architectures.

definitely yes.

> Those that already have similar defines can have them deleted as
> they are now provided by the generic version.
> Can you try to look into this too?

Yes. I wanted to send this out just to know opinion from others.
If this is acceptable, I will look at all archs.
One patch per arch seems to be the best way how to do it.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-08 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08  7:16 [PATCH] asm-generic/io.h: Add default configuration for readX/writeX_relaxed Michal Simek
2014-04-08 17:50 ` Sam Ravnborg
2014-04-08 18:07   ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).