0002-Handle-__mips64.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. From a5779893ee087409b2d1fe391ead102defe0f00b Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Wed, 2 Nov 2022 13:00:00 +0100
  4. Subject: [PATCH] Handle __mips64
  5. Handle __mips64 as __mips64__ to avoid the following build failure:
  6. makedumpfile.c: In function 'is_kvaddr':
  7. makedumpfile.c:1613:39: error: 'KVBASE' undeclared (first use in this function)
  8. return (addr >= (unsigned long long)(KVBASE));
  9. ^~~~~~
  10. Fixes:
  11. - http://autobuild.buildroot.org/results/94824fa8baa8edb99a5ca245e5561e0c4e430638
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. [Upstream status: https://github.com/makedumpfile/makedumpfile/pull/11]
  14. ---
  15. arch/mips64.c | 2 +-
  16. makedumpfile.h | 6 +++---
  17. 2 files changed, 4 insertions(+), 4 deletions(-)
  18. diff --git a/arch/mips64.c b/arch/mips64.c
  19. index ab45b6e..fd987b0 100644
  20. --- a/arch/mips64.c
  21. +++ b/arch/mips64.c
  22. @@ -16,7 +16,7 @@
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  25. */
  26. -#ifdef __mips64__
  27. +#if defined(__mips64__) || defined(__mips64)
  28. #include "../print_info.h"
  29. #include "../elf_info.h"
  30. diff --git a/makedumpfile.h b/makedumpfile.h
  31. index 70a1a91..3842f9c 100644
  32. --- a/makedumpfile.h
  33. +++ b/makedumpfile.h
  34. @@ -963,7 +963,7 @@ typedef unsigned long pgd_t;
  35. #endif /* sparc64 */
  36. -#ifdef __mips64__ /* mips64 */
  37. +#if defined(__mips64__) || defined(__mips64) /* mips64 */
  38. #define KVBASE PAGE_OFFSET
  39. #ifndef _XKPHYS_START_ADDR
  40. @@ -1204,7 +1204,7 @@ unsigned long long vaddr_to_paddr_sparc64(unsigned long vaddr);
  41. #define arch_crashkernel_mem_size() stub_false()
  42. #endif /* sparc64 */
  43. -#ifdef __mips64__ /* mips64 */
  44. +#if defined(__mips64__) || defined(__mips64) /* mips64 */
  45. int get_phys_base_mips64(void);
  46. int get_machdep_info_mips64(void);
  47. int get_versiondep_info_mips64(void);
  48. @@ -2364,7 +2364,7 @@ int get_xen_info_ia64(void);
  49. #define get_xen_info_arch(X) FALSE
  50. #endif /* sparc64 */
  51. -#ifdef __mips64__ /* mips64 */
  52. +#if defined(__mips64__) || defined(__mips64) /* mips64 */
  53. #define kvtop_xen(X) FALSE
  54. #define get_xen_basic_info_arch(X) FALSE
  55. #define get_xen_info_arch(X) FALSE
  56. --
  57. 2.35.1