Patch "hamradio: baycom_epp: fix build for UML" has been added to the 5.14-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    hamradio: baycom_epp: fix build for UML

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hamradio-baycom_epp-fix-build-for-uml.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 609338830e7348f9491b7f69fc30e4ad4410e1e4
Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Date:   Thu Oct 14 19:18:04 2021 -0700

    hamradio: baycom_epp: fix build for UML
    
    [ Upstream commit 0a9bb11a5e298e72b675255a4bb2893513000584 ]
    
    On i386, the baycom_epp driver wants to inspect X86 CPU features (TSC)
    and then act on that data, but that info is not available when running
    on UML, so prevent that test and do the default action.
    
    Prevents this build error on UML + i386:
    
    ../drivers/net/hamradio/baycom_epp.c: In function ‘epp_bh’:
    ../drivers/net/hamradio/baycom_epp.c:630:6: error: implicit declaration of function ‘boot_cpu_has’; did you mean ‘get_cpu_mask’? [-Werror=implicit-function-declaration]
      if (boot_cpu_has(X86_FEATURE_TSC))   \
          ^
    ../drivers/net/hamradio/baycom_epp.c:658:2: note: in expansion of macro ‘GETTICK’
      GETTICK(time1);
    
    Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
    Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Cc: linux-um@xxxxxxxxxxxxxxxxxxx
    Cc: Jeff Dike <jdike@xxxxxxxxxxx>
    Cc: Richard Weinberger <richard@xxxxxx>
    Cc: Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx>
    Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
    Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
    Cc: Thomas Sailer <t.sailer@xxxxxxxxxxxxxx>
    Cc: linux-hams@xxxxxxxxxxxxxxx
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index 4435a1195194..8ea8d50f81c4 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -623,16 +623,16 @@ static int receive(struct net_device *dev, int cnt)
 
 /* --------------------------------------------------------------------- */
 
-#ifdef __i386__
+#if defined(__i386__) && !defined(CONFIG_UML)
 #include <asm/msr.h>
 #define GETTICK(x)						\
 ({								\
 	if (boot_cpu_has(X86_FEATURE_TSC))			\
 		x = (unsigned int)rdtsc();			\
 })
-#else /* __i386__ */
+#else /* __i386__  && !CONFIG_UML */
 #define GETTICK(x)
-#endif /* __i386__ */
+#endif /* __i386__  && !CONFIG_UML */
 
 static void epp_bh(struct work_struct *work)
 {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux