[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    Re: [PATCH] backport-include: add newly introduced macros in cordic.h
From:       Hauke Mehrtens <hauke () hauke-m ! de>
Date:       2019-03-13 20:33:20
Message-ID: d5c2c6b9-991a-1b30-9683-5bd5aff8fd55 () hauke-m ! de
[Download RAW message or body]

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 in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic