From: Christian Lamparter <chunkeey@googlemail.com>
To: Ignacy Gawedzki <i@lri.fr>
Cc: linux-wireless@vger.kernel.org
Subject: Re: Dividing by a non-static value in carl9170-fw?
Date: Sat, 19 Mar 2011 01:43:26 +0100 [thread overview]
Message-ID: <201103190143.27042.chunkeey@googlemail.com> (raw)
In-Reply-To: <20110318191615.GA10032@zenon.in.qult.net>
On Friday 18 March 2011 20:16:15 Ignacy Gawedzki wrote:
> On Sun, Jan 16, 2011 at 01:48:33PM +0100, thus spake Ignacy Gawedzki:
> > On Sun, Jan 16, 2011 at 12:45:53PM +0100, thus spake Christian Lamparter:
> > > No need for a hack, just get a udivsi3_i4i.S (a good place is the linux kernel
> > > library sources in arch/sh/lib, you could also import one from the original
> > > ar9170fw.git) and place it into carlfw/src. Next, you need to modify the
> > > carlfw/CMakeLists.txt: add src/udivsi3_i4i.S to carl9170_lib_src and put
> > > "set_source_files_properties(src/udivsi3_i4i.S PROPERTIES LANGUAGE C)"
> > > a few lines further down.
> > >
> > > compile...
> > >
> > > [Note: you probably have to change the name of the __udivsi3_i4i symbol
> > > to ___udivsi3_i4i too]
> >
> > Great, thanks for the hint, I'll try that as soon as I can.
>
> So I finally got the time to test that solution. Compilation worked like a
> charm indeed, thanks. All seemed fine until I ran that code. Indeed the
> result of the division is completely off. :(
>
> For instance, if I have A = 17719, B = 44, then A / B gives C = 12886, instead
> of the expected 402. It is as though the result was multiplied by 32.
I gave it a try and It worked?!
[54670.551750] ieee80211 phy14: FW: a:0x4537 b:0x2c a/b:0x192 (0x192 = 402).
(It was nothing else than just define "a" and "b" (as global variables) and
add the INFO("a:0x%x b:0x%x a/b:0x%x", a, b, a/b);)
Regards,
Chr
next prev parent reply other threads:[~2011-03-19 0:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110116031600.GA21973@zenon.in.qult.net>
[not found] ` <201101161245.54221.chunkeey@googlemail.com>
2011-01-16 12:48 ` Dividing by a non-static value in carl9170-fw? Ignacy Gawedzki
2011-03-18 19:16 ` Ignacy Gawedzki
2011-03-19 0:43 ` Christian Lamparter [this message]
2011-03-19 1:22 ` Ignacy Gawedzki
2011-03-19 2:03 ` Christian Lamparter
2011-03-19 9:22 ` Ignacy Gawedzki
2011-03-19 15:43 ` Christian Lamparter
2011-03-21 11:05 ` Ignacy Gawedzki
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=201103190143.27042.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=i@lri.fr \
--cc=linux-wireless@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).