linux-next: manual merge of the pci tree with the asm-generic tree
Hi Bjorn,
Today's linux-next merge of the pci tree got a conflict in include/asm-generic/io.h between commit 4005bfe0aa45 ("asm-generic/io.h: Implement generic {read,write}s*()") from the asm-generic tree and commit 3aad9c969c09 ("asm-generic/io.h: Fix ioport_map() for !CONFIG_GENERIC_IOMAP") from the pci tree.
I fixed it up (the only difference is that the latter castes the result to void __iomem * - see below) and can carry the fix as necessary (no action is required).
Signature · 25 lines
Cheers, Stephen Rothwell [email protected] diff --cc include/asm-generic/io.h index 3e976be3bdd4,2e2161b0c795..000000000000 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@@ -756,16 -329,11 +756,16 @@@ static inline void iounmap(void __iome #ifdef CONFIG_HAS_IOPORT_MAP #ifndef CONFIG_GENERIC_IOMAP +#ifndef ioport_map +#define ioport_map ioport_map static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) { - return PCI_IOBASE + (port & IO_SPACE_LIMIT); + return (void __iomem *)(PCI_IOBASE + (port & IO_SPACE_LIMIT)); } +#endif +#ifndef ioport_unmap +#define ioport_unmap ioport_unmap static inline void ioport_unmap(void __iomem *p) { }
Quoted 21 lines · Stephen Rothwell
Hi Bjorn,
Today's linux-next merge of the pci tree got a conflict in
include/asm-generic/io.hbetween commit4005bfe0aa45("asm-generic/io.h: Implement generic {read,write}s*()") from the asm-generic tree and commit3aad9c969c09("asm-generic/io.h: Fixioport_map()for !CONFIG_GENERIC_IOMAP") from the pci tree.I fixed it up (the only difference is that the latter castes the result to void
__iomem* - see below) and can carry the fix as necessary (no action is required).Signature · 2 lines
Cheers, Stephen Rothwell [email protected]include/asm-generic/io.h +0
-0
include/asm-generic/io.h
Quoted 9 lines
include/asm-generic/io.h +1
-1@@@ -756,16 -329,11 +756,16 @@@ static inline void iounmap(void __iome #ifdef CONFIG_HAS_IOPORT_MAP #ifndef CONFIG_GENERIC_IOMAP +#ifndef ioport_map +#define ioport_map ioport_map static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) { - return PCI_IOBASE + (port & IO_SPACE_LIMIT); + return (void __iomem *)(PCI_IOBASE + (port & IO_SPACE_LIMIT));
I don't think that cast is necessary. All instances of PCI_IOBASE are already defined to be void __iomem *.
Or at least they were until a few days ago. Commit f3dfddf7bd85 (ARM:
Define PCI_IOBASE as the base of virtual PCI IO space) introduces one variant for ARM which isn't actually void __iomem *. I think what we should do is standardize the type of PCI_IOBASE.
So how about we remove commit 3aad9c969c09 (asm-generic/io.h: Fix ioport_map() for !CONFIG_GENERIC_IOMAP) and move the cast to void __iomem * to Liviu's definition of PCI_IOBASE for ARM?
Thierry
Quoted 40 lines · Thierry Reding
Quoted 21 lines · Stephen Rothwell
Hi Bjorn,
Today's linux-next merge of the pci tree got a conflict in
include/asm-generic/io.hbetween commit4005bfe0aa45("asm-generic/io.h: Implement generic {read,write}s*()") from the asm-generic tree and commit3aad9c969c09("asm-generic/io.h: Fixioport_map()for !CONFIG_GENERIC_IOMAP") from the pci tree.I fixed it up (the only difference is that the latter castes the result to void
__iomem* - see below) and can carry the fix as necessary (no action is required).Signature · 2 lines
Cheers, Stephen Rothwell [email protected]include/asm-generic/io.h +0
-0include/asm-generic/io.h
Quoted 9 lines
include/asm-generic/io.h +1
-1@@@ -756,16 -329,11 +756,16 @@@ static inline void iounmap(void __iome #ifdef CONFIG_HAS_IOPORT_MAP #ifndef CONFIG_GENERIC_IOMAP +#ifndef ioport_map +#define ioport_map ioport_map static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) { - return PCI_IOBASE + (port & IO_SPACE_LIMIT); + return (void __iomem *)(PCI_IOBASE + (port & IO_SPACE_LIMIT));I don't think that cast is necessary. All instances of
PCI_IOBASEare already defined to be void__iomem*.Or at least they were until a few days ago. Commit
f3dfddf7bd85(ARM:
DefinePCI_IOBASEas the base of virtual PCI IO space) introduces one variant for ARM which isn't actually void__iomem*. I think what we should do is standardize the type ofPCI_IOBASE.
Quoted 5 lines
So how about we remove commit
3aad9c969c09(asm-generic/io.h: Fixioport_map()for !CONFIG_GENERIC_IOMAP) and move the cast to void__iomem* to Liviu's definition ofPCI_IOBASEfor ARM?Thierry
Hi Stephen,
I agree with Thierry's solution.
I don't know how these cases are handled. Should I send Bjorn a patch for his tree?
Best regards,
Liviu
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Hi Liviu,
Quoted 4 lines · On Fri, 26 Sep 2014 10:13:57 +0100 Liviu Dudau <[email protected]> wrote:
I agree with Thierry's solution.
I don't know how these cases are handled. Should I send Bjorn a patch for his tree?
They need to be fixed in one or other of the trees, so yes.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]