From: Hauke Mehrtens <hauke@hauke-m.de>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
backports@vger.kernel.org
Subject: Re: [PATCH] backport-include: add newly introduced macros in cordic.h
Date: Wed, 13 Mar 2019 21:33:20 +0100 [thread overview]
Message-ID: <d5c2c6b9-991a-1b30-9683-5bd5aff8fd55@hauke-m.de> (raw)
In-Reply-To: <1552467460-10165-1-git-send-email-arend.vanspriel@broadcom.com>
On 3/13/19 9:57 AM, Arend van Spriel wrote:
> The kernel header file linux/cordic.h changed in v5.0 kernel
> resulting in backport build to fail for brcmsmac (and probably
> b43 as well). So backport those definitions for older kernels.
This was already added here:
https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=77b9ee6a9f0e0c3697cbadf2fd59e46ea5c64def
Hauke
>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> ---
> Hi,
>
> It has been a while since I submitted or did anything with the backports
> repo. I was using it on Ubuntu 14.04 and had a problem building coccinelle
> v1.0.7. I finally fixed that so I wanted to share here what was going on so
> it may help others.
>
> So while building coccinelle it failed with following:
>
> make[1]: Entering directory `/projects/hnd_software_nl/work/arend/utils/coccinelle-1.0.7/bundles/parmap'
> /usr/bin/ocamlc.opt -unsafe -I parmap -c parmap/bytearray.ml -o parmap/bytearray.cmo
> File "parmap/bytearray.ml", line 1:
> Error: Could not find the .cmi file for interface parmap/bytearray.mli.
> make[1]: *** [parmap/bytearray.cmo] Error 2
> make[1]: Leaving directory `/projects/hnd_software_nl/work/arend/utils/coccinelle-1.0.7/bundles/parmap'
> make: *** [all] Error 2
>
> So what is going on. During configure it is detected that my machine does not
> have the parmap ocaml library. This library is also bundled in coccinelle tarbal
> so it decides to build that. However, that fails for some reason. I decided to
> take a closer look. I found that if I went to bundles/parmap/parmap and run make
> there the build went fine so I went along and installed it. Rerun configure picked
> up the installed parmap library and the reset of coccinelle build went fine.
>
> So I am back in business and here is the patch that should fix the cordic users.
>
> Regards,
> Arend
> ---
> backport/backport-include/linux/cordic.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/backport/backport-include/linux/cordic.h b/backport/backport-include/linux/cordic.h
> index 67d6a4a..101da91 100644
> --- a/backport/backport-include/linux/cordic.h
> +++ b/backport/backport-include/linux/cordic.h
> @@ -5,6 +5,16 @@
>
> #if (LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0))
> #include_next <linux/cordic.h>
> +#if LINUX_VERSION_IS_LESS(5,0,0)
> +#define CORDIC_ANGLE_GEN 39797
> +#define CORDIC_PRECISION_SHIFT 16
> +#define CORDIC_NUM_ITER (CORDIC_PRECISION_SHIFT + 2)
> +
> +#define CORDIC_FIXED(X) ((s32)((X) << CORDIC_PRECISION_SHIFT))
> +#define CORDIC_FLOAT(X) (((X) >= 0) \
> + ? ((((X) >> (CORDIC_PRECISION_SHIFT - 1)) + 1) >> 1) \
> + : -((((-(X)) >> (CORDIC_PRECISION_SHIFT - 1)) + 1) >> 1))
> +#endif
> #else
>
> /*
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe backports" in
>
--
To unsubscribe from this list: send the line "unsubscribe backports" in
prev parent reply other threads:[~2019-03-13 20:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 8:57 [PATCH] backport-include: add newly introduced macros in cordic.h Arend van Spriel
2019-03-13 20:33 ` Hauke Mehrtens [this message]
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=d5c2c6b9-991a-1b30-9683-5bd5aff8fd55@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=arend.vanspriel@broadcom.com \
--cc=backports@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 read-only IMAP folder(s) and NNTP newsgroup(s).