[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/8] arm64: Provide dcache_by_myline_op_nosync helper


  • To: Will Deacon <will@xxxxxxxxxx>
  • From: Barry Song <21cnbao@xxxxxxxxx>
  • Date: Mon, 26 Jan 2026 09:43:02 +0800
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=Td4QUCSFnNiGlIQcniNA/rp8ZfKnX5RqAxkcu4MfCJE=; fh=yO1yMD14bAceKbkyokr5DzCgIxCl0W9L3blG0KrUmA0=; b=NWJSo4t3X95lJLZbghy9rJRAdsnWlrCHbf0v5b40flJTOJVgVRirmUWoN+1pM0+UFE 08IGIqv5U+E7yCKHZB58rPuJ17iWQ2X4KZZq2dJbdJqsjmvlNod8jgGttBu0WfvesPk2 U7D/afqKYRphzHpXNwXF/YUjvxpLezzii9xmT3KWiLEIxpWZ18cB+kR4dAh1WzywXBrY M080mqQQiwQyfnY3g5QXJQ0I2kcP9r8PapoJydG/JZcvIwMKdiVdw+MB4sz5Y5zZm18v GFIeTBJFBqhIZQbN+hLrMHS9ASlV9V78DvCeFSbG2o0yeCsYjmpXOxfzC7bac9SuTi3i jRIw==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1769391794; cv=none; d=google.com; s=arc-20240605; b=lef6yUPyJp/RAGlSuUwSU8yHQfoYaappC8ZjrfIHhs6mcB+THer6+xGkmqDdWuPhpq 1oivQqUhqm3inmQCVWEryWnYOs0XV5B7lHv7dEGbwO6ISFhp/To5wfQuvgWM5I2MwOXT 4oY/S6NzJxKpl8ihgGzo9pERFSU8rRO9az8CX86kpiLBQPv+X7bNrO1ObiHwhXt2qLbg wLHXqokYZFkrqUEsiEJiSajShmG5vNlQxzVqcRoZ6Qqm5KfVfW1F+DOXyjDrwB5mcp/c SDVGeJbJYTaoOamlrOwNfzIUC06tNpQBKRzbacDMocEt/qWr0s7fZ1w9Km+8gGkXG7+S V8CA==
  • Cc: catalin.marinas@xxxxxxx, m.szyprowski@xxxxxxxxxxx, robin.murphy@xxxxxxx, iommu@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Leon Romanovsky <leon@xxxxxxxxxx>, Ada Couprie Diaz <ada.coupriediaz@xxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Anshuman Khandual <anshuman.khandual@xxxxxxx>, Ryan Roberts <ryan.roberts@xxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>, Tangquan Zheng <zhengtangquan@xxxxxxxx>
  • Delivery-date: Mon, 26 Jan 2026 01:43:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

[...]

> >   */
> > -     .macro dcache_by_myline_op op, domain, start, end, linesz, tmp, fixup
> > +     .macro raw_dcache_by_myline_op op, start, end, linesz, tmp, fixup
> >       sub     \tmp, \linesz, #1
> >       bic     \start, \start, \tmp
> >  .Ldcache_op\@:
> > @@ -402,14 +401,13 @@ alternative_endif
> >       add     \start, \start, \linesz
> >       cmp     \start, \end
> >       b.lo    .Ldcache_op\@
> > -     dsb     \domain
>
> Naming nit, but I'd prefer this to be dcache_by_myline_op_nosync() for
> consistency with the other macros that you're adding. The 'raw' prefix
> is used by raw_dcache_line_size() to indicate that we're getting the
> value from the underlying hardware register.

Ok. thanks!

>
> >
> >       _cond_uaccess_extable .Ldcache_op\@, \fixup
> >       .endm
> >
> >  /*
> >   * Macro to perform a data cache maintenance for the interval
> > - * [start, end)
> > + * [start, end) and wait for completion
> >   *
> >   *   op:             operation passed to dc instruction
> >   *   domain:         domain used in dsb instruction
> > @@ -420,7 +418,23 @@ alternative_endif
> >   */
> >       .macro dcache_by_line_op op, domain, start, end, tmp1, tmp2, fixup
> >       dcache_line_size \tmp1, \tmp2
> > -     dcache_by_myline_op \op, \domain, \start, \end, \tmp1, \tmp2, \fixup
> > +     raw_dcache_by_myline_op \op, \start, \end, \tmp1, \tmp2, \fixup
> > +     dsb \domain
> > +     .endm
>
> This could just be dcache_by_line_op_nosync() + dsb.

Ok. thanks!

Best Regards
Barry



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.