48074d2615
A lot of the ColdFire internal peripherals (clocks, timers, interrupt controllers, etc) are addressed using constants. The only problem with that is they are not type clean when used with __raw_read/__raw_write and read/write - they should be of type "void __iomem". This isn't a problem currently because the IO access functions are local macros. To switch to using the asm-generic implementations of these we need to clean up the types. Otherwise you get warnings like this: In file included from ./arch/m68k/include/asm/mcfsim.h:24:0, from arch/m68k/coldfire/intc-simr.c:20: arch/m68k/coldfire/intc-simr.c: In function ‘init_IRQ’: ./arch/m68k/include/asm/m520xsim.h:40:29: warning: passing argument 2 of ‘__raw_writeb’ makes pointer from integer without a cast [-Wint-conversion] #define MCFINTC0_SIMR (MCFICM_INTC0 + MCFINTC_SIMR) ^ arch/m68k/coldfire/intc-simr.c:182:21: note: in expansion of macro ‘MCFINTC0_SIMR’ __raw_writeb(0xff, MCFINTC0_SIMR); ^ In file included from ./arch/m68k/include/asm/io_no.h:120:0, from ./arch/m68k/include/asm/io.h:3, from ./include/linux/io.h:25, from ./include/linux/irq.h:25, from ./include/asm-generic/hardirq.h:13, from ./arch/m68k/include/asm/hardirq.h:25, from ./include/linux/hardirq.h:9, from ./include/linux/interrupt.h:13, from arch/m68k/coldfire/intc-simr.c:16: ./include/asm-generic/io.h:71:22: note: expected ‘volatile void *’ but argument is of type ‘unsigned int’ #define __raw_writeb __raw_writeb ^ ./include/asm-generic/io.h:72:20: note: in expansion of macro ‘__raw_writeb’ static inline void __raw_writeb(u8 value, volatile void __iomem *addr) ^ To start this clean up process introduce a macro, iomem(), that converts a constant address to the correct "void __iomem *" type. Signed-off-by: Greg Ungerer <gerg@linux-m68k.org> Tested-by: Angelo Dureghello <angelo@sysam.it> |
||
---|---|---|
Documentation | ||
LICENSES | ||
arch | ||
block | ||
certs | ||
crypto | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.clang-format | ||
.cocciconfig | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
COPYING | ||
CREDITS | ||
Kbuild | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README |
README
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. See Documentation/00-INDEX for a list of what is contained in each file. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.