[PATCH 1/2] powerpc/xmon: support dumping software pagetables

kbuild test robot lkp at intel.com
Mon Jul 24 00:50:06 AEST 2017


Hi Balbir,

[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.13-rc1 next-20170721]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Balbir-Singh/powerpc-xmon-support-dumping-software-pagetables/20170723-002848
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-akebono_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   arch/powerpc/xmon/xmon.c: In function 'show_pte':
>> arch/powerpc/xmon/xmon.c:2929:6: error: implicit declaration of function 'pud_huge' [-Werror=implicit-function-declaration]
     if (pud_huge(*pudp)) {
         ^~~~~~~~
>> arch/powerpc/xmon/xmon.c:2942:6: error: implicit declaration of function 'pmd_huge' [-Werror=implicit-function-declaration]
     if (pmd_huge(*pmdp)) {
         ^~~~~~~~
   cc1: all warnings being treated as errors

vim +/pud_huge +2929 arch/powerpc/xmon/xmon.c

  2874	
  2875	static void show_pte(unsigned long tskv)
  2876	{
  2877		unsigned long addr = 0;
  2878		struct task_struct *tsk = NULL;
  2879		struct mm_struct *mm;
  2880		pgd_t *pgdp;
  2881		pud_t *pudp;
  2882		pmd_t *pmdp;
  2883		pte_t *ptep;
  2884	
  2885		tsk = (struct task_struct *)tskv;
  2886		if (tsk == NULL)
  2887			mm = &init_mm;
  2888		else
  2889			mm = tsk->active_mm;
  2890	
  2891		if (mm == NULL)
  2892			mm = &init_mm;
  2893	
  2894		if (!scanhex(&addr))
  2895			printf("need address to translate\n");
  2896	
  2897		if (setjmp(bus_error_jmp) != 0) {
  2898			catch_memory_errors = 0;
  2899			printf("*** Error dumping pte for task %p\n", tsk);
  2900			return;
  2901		}
  2902	
  2903		catch_memory_errors = 1;
  2904		sync();
  2905	
  2906		if (mm == &init_mm)
  2907			pgdp = pgd_offset_k(addr);
  2908		else
  2909			pgdp = pgd_offset(mm, addr);
  2910	
  2911		if (pgd_none(*pgdp)) {
  2912			printf("no linux page table for address\n");
  2913			return;
  2914		}
  2915	
  2916		if (pgd_huge(*pgdp)) {
  2917			format_pte(pgd_val(*pgdp));
  2918			return;
  2919		}
  2920		printf("G: 0x%8lx\t", pgd_val(*pgdp));
  2921	
  2922		pudp = pud_offset(pgdp, addr);
  2923	
  2924		if (pud_none(*pudp)) {
  2925			printf("No valid PUD\n");
  2926			return;
  2927		}
  2928	
> 2929		if (pud_huge(*pudp)) {
  2930			format_pte(pud_val(*pudp));
  2931			return;
  2932		}
  2933		printf("U: 0x%8lx\t", pud_val(*pudp));
  2934	
  2935		pmdp = pmd_offset(pudp, addr);
  2936	
  2937		if (pmd_none(*pmdp)) {
  2938			printf("No valid PMD\n");
  2939			return;
  2940		}
  2941	
> 2942		if (pmd_huge(*pmdp)) {
  2943			format_pte(pmd_val(*pmdp));
  2944			return;
  2945		}
  2946		printf("M: 0x%8lx\t", pmd_val(*pmdp));
  2947	
  2948		/* pte_offset_map is the same as pte_offset_kernel */
  2949		ptep = pte_offset_kernel(pmdp, addr);
  2950		if (pte_none(*ptep)) {
  2951			printf("no valid PTE\n");
  2952			return;
  2953		}
  2954	
  2955		format_pte(pte_val(*ptep));
  2956	
  2957		sync();
  2958		__delay(200);
  2959		catch_memory_errors = 0;
  2960	}
  2961	static void show_tasks(void)
  2962	{
  2963		unsigned long tskv;
  2964		struct task_struct *tsk = NULL;
  2965	
  2966		printf("     task_struct     ->thread.ksp    PID   PPID S  P CMD\n");
  2967	
  2968		if (scanhex(&tskv))
  2969			tsk = (struct task_struct *)tskv;
  2970	
  2971		if (setjmp(bus_error_jmp) != 0) {
  2972			catch_memory_errors = 0;
  2973			printf("*** Error dumping task %p\n", tsk);
  2974			return;
  2975		}
  2976	
  2977		catch_memory_errors = 1;
  2978		sync();
  2979	
  2980		if (tsk)
  2981			show_task(tsk);
  2982		else
  2983			for_each_process(tsk)
  2984				show_task(tsk);
  2985	
  2986		sync();
  2987		__delay(200);
  2988		catch_memory_errors = 0;
  2989	}
  2990	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 15731 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170723/e85b0488/attachment.gz>


More information about the Linuxppc-dev mailing list