All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	"open list:MIPS" <linux-mips@vger.kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Huacai Chen <chenhuacai@loongson.cn>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH] MIPS: Remove unused and erroneous div64.h
Date: Fri, 16 Apr 2021 17:59:08 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2104161722050.44318@angie.orcam.me.uk> (raw)
In-Reply-To: <CAAhV-H7fPhA+vKNAYNdVsjZkU75CaVv2btpwRYh9E4XcX9h14A@mail.gmail.com>

On Thu, 15 Apr 2021, Huacai Chen wrote:

> >  I think this is a weak argument for removal, isn't it?
> Yes ,it is weak, but I'm not able to fix it, could you please help me?

 First of all you need to assign the quotient to `*n' rather than `__n', 
which is a temporary only.  Otherwise it's discarded, so no surprise the 
piece does not work.

 Also this piece assumes the quotient will fit in 32 bits (which should be 
obvious from the name and data type of the relevant temporary if not the 
asm itself), which is what the initial division of the high part was for 
before commit c21004cd5b4c and which the `do_div' wrapper does not arrange 
for.  Said commit is really broken indeed as it mustn't have dropped the 
initial division and instead it should have only amended the asm for the 
removal of the `h' constraint (easy fix).

  Maciej

  reply	other threads:[~2021-04-16 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  3:34 [PATCH] MIPS: Remove unused and erroneous div64.h Huacai Chen
2021-04-12 14:06 ` Maciej W. Rozycki
2021-04-15  6:14   ` Huacai Chen
2021-04-16 15:59     ` Maciej W. Rozycki [this message]
2021-04-12 14:53 ` H. Nikolaus Schaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2104161722050.44318@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.