On Fri, Feb 21, 2025 at 03:52:48PM +0800, bingbu.cao@xxxxxxxxx wrote: > From: Bingbu Cao <bingbu.cao@xxxxxxxxx> > > The Intel IPU7 has internal microproccessor which runs the firmware > The microprocessor access system DRAM by its internal 32-bit virtual > address space. Driver should setup the MMU table and expose the DMA > APIs for memory buffer mapping. s/microproccessor/microprocessor/ s/access/accesses/ > +#define ISP_PAGE_SHIFT 12 > +#define ISP_PAGE_SIZE BIT(ISP_PAGE_SHIFT) > +#define ISP_PAGE_MASK (~(ISP_PAGE_SIZE - 1)) > + > +#define ISP_L1PT_SHIFT 22 > +#define ISP_L1PT_MASK (~((1U << ISP_L1PT_SHIFT) - 1)) > + > +#define ISP_L2PT_SHIFT 12 > +#define ISP_L2PT_MASK (~(ISP_L1PT_MASK | (~(ISP_PAGE_MASK)))) > + > +#define ISP_L1PT_PTES 1024 > +#define ISP_L2PT_PTES 1024 > + > +#define ISP_PADDR_SHIFT 12 If you used GENMASK(), FIELD_PREP(), FIELD_GET(), you wouldn't need these _SHIFT #defines.