Skip to contentSkip to conversation

drivers/media/platform/apple/msr/piodma.c:142:17: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'?

PATCH kernel test robot 1 participant 1 message Nov 30

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://github.com/AsahiLinux/linux bits/240-isp
head:   a8d695c590dce32e51a585ee96711819849e01be
commit: a8d695c590dce32e51a585ee96711819849e01be [104/104] media: apple: msr: add piodma
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20261130/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261130/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from include/asm-generic/bug.h:31,

                    from arch/m68k/include/asm/bug.h:32,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:107,
                    from arch/m68k/include/asm/processor.h:11,
                    from include/linux/sched.h:13,
                    from include/linux/ratelimit.h:6,
                    from drivers/media/platform/apple/msr/piodma.c:8:
   drivers/media/platform/apple/msr/piodma.c: In function 'dbg_registers':
>> drivers/media/platform/apple/msr/piodma.c:142:17: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'? [-Wimplicit-function-declaration]
     142 |                 readq_relaxed(ctx->reg + MEM_RD_ADDR));
         |                 ^~~~~~~~~~~~~
   include/linux/printk.h:483:33: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:584:9: note: in expansion of macro 'printk'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   drivers/media/platform/apple/msr/piodma.c:90:17: note: in expansion of macro 'pr_info'
      90 |                 pr_info("piodma: " fmt, ##args); \
         |                 ^~~~~~~
   drivers/media/platform/apple/msr/piodma.c:141:9: note: in expansion of macro 'pio_dbg'
     141 |         pio_dbg(2, "MEM_RD_ADDR: %#llx\n",
         |         ^~~~~~~
   include/linux/kern_levels.h:5:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'int' [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:483:25: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/linux/printk.h:584:9: note: in expansion of macro 'printk'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/linux/printk.h:584:16: note: in expansion of macro 'KERN_INFO'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~~
   drivers/media/platform/apple/msr/piodma.c:90:17: note: in expansion of macro 'pr_info'
      90 |                 pr_info("piodma: " fmt, ##args); \
         |                 ^~~~~~~
   drivers/media/platform/apple/msr/piodma.c:141:9: note: in expansion of macro 'pio_dbg'
     141 |         pio_dbg(2, "MEM_RD_ADDR: %#llx\n",
         |         ^~~~~~~
   include/linux/kern_levels.h:5:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'int' [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:483:25: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/linux/printk.h:584:9: note: in expansion of macro 'printk'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/linux/printk.h:584:16: note: in expansion of macro 'KERN_INFO'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~~
   drivers/media/platform/apple/msr/piodma.c:90:17: note: in expansion of macro 'pr_info'
      90 |                 pr_info("piodma: " fmt, ##args); \
         |                 ^~~~~~~
   drivers/media/platform/apple/msr/piodma.c:143:9: note: in expansion of macro 'pio_dbg'
     143 |         pio_dbg(2, "MEM_WR_ADDR: %#llx\n",
         |         ^~~~~~~
   include/linux/kern_levels.h:5:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'int' [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:483:25: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/linux/printk.h:584:9: note: in expansion of macro 'printk'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/linux/printk.h:584:16: note: in expansion of macro 'KERN_INFO'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~~
   drivers/media/platform/apple/msr/piodma.c:90:17: note: in expansion of macro 'pr_info'
      90 |                 pr_info("piodma: " fmt, ##args); \
         |                 ^~~~~~~
   drivers/media/platform/apple/msr/piodma.c:146:9: note: in expansion of macro 'pio_dbg'
     146 |         pio_dbg(2, "PIO_RD_ADDR: %#llx\n",
         |         ^~~~~~~
   include/linux/kern_levels.h:5:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'int' [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:483:25: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/linux/printk.h:584:9: note: in expansion of macro 'printk'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/linux/printk.h:584:16: note: in expansion of macro 'KERN_INFO'
     584 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~~
   drivers/media/platform/apple/msr/piodma.c:90:17: note: in expansion of macro 'pr_info'
      90 |                 pr_info("piodma: " fmt, ##args); \
         |                 ^~~~~~~
   drivers/media/platform/apple/msr/piodma.c:148:9: note: in expansion of macro 'pio_dbg'
     148 |         pio_dbg(2, "PIO_WR_ADDR: %#llx\n",
         |         ^~~~~~~

drivers/media/platform/apple/msr/piodma.c: In function 'piodma_init':
include/linux/kern_levels.h:5:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]

vim +142 drivers/media/platform/apple/msr/piodma.c

   > 8	#include <linux/ratelimit.h>
     9	#include <linux/interrupt.h>
    10	#include <linux/dma-mapping.h>
    11	
    12	#include "piodma.h"
    13	
    14	#define CFG	0x00
    15	
    16	#define IRQ_STS			0x04
    17	#define IRQ_EN			0x08
    18	#define IRQ_DONE		BIT(0)
    19	#define IRQ_CMD_PARSE_ERR	BIT(1)
    20	#define IRQ_SEQ_FIFO_OVERFLOW	BIT(2)
    21	#define IRQ_AXI_BUS_ERR		BIT(3)
    22	#define IRQ_BOUNDS_ERR		BIT(4)
    23	
    24	#define STATUS			0x0c
    25	#define STATUS_CMD_FREE		GENMASK(4, 0)
    26	#define STATUS_CMD_COMPLETED	GENMASK(20, 16)
    27	#define STATUS_BUSY		BIT(31)
    28	
    29	#define DMA_CFG_MEM_SRC		0x10
    30	#define DMA_CFG_MEM_DAT		0x14
    31	#define DMA_CFG_MEM_DST		0x18
    32	#define DMA_CFG_PIO_RD		0x1c
    33	#define DMA_CFG_PIO_WR		0x20
    34	
    35	#define DMA_CFG_PIO_BASE_CNT	4
    36	#define DMA_CFG_PIO_BASE_ADDR_LO(i)	(0x24 + (i) * 4)
    37	#define DMA_CFG_PIO_BASE_ADDR_HI(i)	(0xf0 + (i) * 4)
    38	
    39	#define MEM_DST_ADDR_LO	0x44
    40	#define MEM_DST_ADDR_HI	0x48
    41	
    42	#define MEM_SRC_ADDR_LO	0x4c
    43	#define MEM_SRC_ADDR_HI	0x50
    44	
    45	#define CMD_CTRL	0x54
    46	#define CMD_CTRL_RUN	BIT(0)
    47	#define CMD_CTRL_TYPE	GENMASK(2, 1)
    48	/*
    49	 * Uses high bits of CMD_CTX to fill CMD_TAG, might be related to the
    50	 * seemingly 4 missing DMA_CFG_PIO_BASE_ADDR
    51	 */
    52	#define CMD_CTRL_CTX1	BIT(3)
    53	#define CMD_CTRL_IRQ	BIT(4)
    54	#define CMD_CTRL_CNT	GENMASK(28, 8)
    55	
    56	#define HW_VERSION	0xb4
    57	#define ERR		0xc4
    58	#define ERR_PARSE_CNT	GENMASK(15, 0)
    59	
    60	#define CMD_CTX		0xd8
    61	#define CMD_CTX_TAG	GENMASK(7, 0)
    62	#define DONE_CMD_TAG	0xdc
    63	
    64	#define MEM_RD_ADDR	0x90
    65	#define MEM_WR_ADDR	0x98
    66	#define PIO_RD_ADDR	0xa0
    67	#define PIO_WR_ADDR	0xa8
    68	
    69	enum packet_type {
    70		PK_TYPE_RW = 1,
    71		PK_TYPE_LINK = 3,
    72	};
    73	
    74	#define PK_TYPE		GENMASK(1, 0)
    75	#define PK_RW_START	GENMASK(17, 2)
    76	#define PK_RW_CNT	GENMASK(29, 18)
    77	#define PK_RW_BASE_SEL	GENMASK(31, 30)
    78	
    79	#define PK_LINK_SIZE	GENMASK(23, 4)
    80	#define PK_LINK_FLAG	BIT(26) /* ?? */
    81	
    82	#define PK_SIZE		PAGE_SIZE
    83	#define PK_MAX_OFF	0x10000
    84	
    85	int piodebug;
    86	module_param(piodebug, int, 0644);
    87	
    88	#define pio_dbg(level, fmt, args...) do { \
    89		if (piodebug >= (level)) \
    90			pr_info("piodma: " fmt, ##args); \
    91	} while (false)
    92	
    93	#define pio_err(fmt, args...) \
    94		pr_err("piodma %s: " fmt, __func__, ##args)
    95	
    96	struct piodma_ctx {
    97		void __iomem *reg;
    98		const struct resource *res;
    99		struct {
   100			u32 *cpu;
   101			dma_addr_t addr;
   102			size_t size;
   103		} buf;
   104		struct device *dev;
   105		size_t cnt;
   106		size_t cmd_cnt;
   107		size_t base[DMA_CFG_PIO_BASE_CNT];
   108		struct delayed_work err_work;
   109		void *cb_prv;
   110		void (*cb)(void *prv, enum piodma_completion_status status);
   111	};
   112	
   113	static void dbg_registers(struct piodma_ctx *ctx)
   114	{
   115		int status = readl_relaxed(ctx->reg + STATUS);
   116		int irqstatus = readl_relaxed(ctx->reg + IRQ_STS);
   117		int err = readl_relaxed(ctx->reg + ERR);
   118	
   119		pio_dbg(1, "irq: %#x %s%s%s%s%s", irqstatus,
   120			irqstatus & IRQ_DONE ? "OK " : "",
   121			irqstatus & IRQ_CMD_PARSE_ERR ? "CMD_PARSE_ERR " : "",
   122			irqstatus & IRQ_SEQ_FIFO_OVERFLOW ? "FIFO_OVERFLOW " : "",
   123			irqstatus & IRQ_AXI_BUS_ERR ? "AXI_BUS_ERR " : "",
   124			irqstatus & IRQ_BOUNDS_ERR ? "BOUNDS_ERR " : "");
   125	
   126		if (err)
   127			pio_err("err %#x parse cnt %ld\n",
   128			       err, FIELD_GET(ERR_PARSE_CNT, err));
   129	
   130		pio_dbg(2, "status: %#x free %ld completed %ld busy %s\n",
   131			status,
   132			FIELD_GET(STATUS_CMD_FREE, status),
   133			FIELD_GET(STATUS_CMD_COMPLETED, status),
   134			FIELD_GET(STATUS_BUSY, status) ? "YES" : "NO");
   135	
   136		pio_dbg(2, "cfg %#x ctx %#x tag %#x",
   137			readl_relaxed(ctx->reg + CFG),
   138			readl_relaxed(ctx->reg + CMD_CTX),
   139			readl_relaxed(ctx->reg + DONE_CMD_TAG));
   140	
   141		pio_dbg(2, "MEM_RD_ADDR: %#llx\n",
 > 142			readq_relaxed(ctx->reg + MEM_RD_ADDR));

143 pio_dbg(2, "MEM_WR_ADDR: %#llx\n",
144 readq_relaxed(ctx->reg + MEM_WR_ADDR));
145
146 pio_dbg(2, "PIO_RD_ADDR: %#llx\n",
147 readq_relaxed(ctx->reg + PIO_RD_ADDR));
148 pio_dbg(2, "PIO_WR_ADDR: %#llx\n",
149 readq_relaxed(ctx->reg + PIO_WR_ADDR));
150 }
151

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki