[mips-linux:mips-fixes 3/3] arch/mips/kernel/process.c:669:44: error: section attribute cannot be specified for local variables

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git mips-fixes
head:   afe3a2ccc9586a001d4745a9d1898adfa630e47b
commit: afe3a2ccc9586a001d4745a9d1898adfa630e47b [3/3] MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout afe3a2ccc9586a001d4745a9d1898adfa630e47b
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=mips 

All error/warnings (new ones prefixed by >>):

   In file included from include/asm-generic/percpu.h:7:0,
                    from ./arch/mips/include/generated/asm/percpu.h:1,
                    from include/linux/percpu.h:13,
                    from include/linux/hrtimer.h:22,
                    from include/linux/sched.h:20,
                    from arch/mips/kernel/process.c:13:
   arch/mips/kernel/process.c: In function 'raise_backtrace':
>> include/linux/percpu-defs.h:91:33: error: section attribute cannot be specified for local variables
     extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;  \
                                    ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:92:26: error: section attribute cannot be specified for local variables
     __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;   \
                             ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:92:26: error: declaration of '__pcpu_unique_static_csd' with no linkage follows extern declaration
     __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;   \
                             ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:91:33: note: previous declaration of '__pcpu_unique_static_csd' was here
     extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;  \
                                    ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:44: error: section attribute cannot be specified for local variables
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:93:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     extern __PCPU_ATTRS(sec) __typeof__(type) name;   \
                                               ^~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:44: error: section attribute cannot be specified for local variables
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:95:19: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     __typeof__(type) name
                      ^~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:44: error: weak declaration of 'static_csd' must be public
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:95:19: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     __typeof__(type) name
                      ^~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
>> arch/mips/kernel/process.c:669:44: error: declaration of 'static_csd' with no linkage follows extern declaration
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:95:19: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     __typeof__(type) name
                      ^~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   arch/mips/kernel/process.c:669:44: note: previous declaration of 'static_csd' was here
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:93:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     extern __PCPU_ATTRS(sec) __typeof__(type) name;   \
                                               ^~~~
>> arch/mips/kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
--
   In file included from include/asm-generic/percpu.h:7:0,
                    from ./arch/mips/include/generated/asm/percpu.h:1,
                    from include/linux/percpu.h:13,
                    from include/linux/hrtimer.h:22,
                    from include/linux/sched.h:20,
                    from arch/mips//kernel/process.c:13:
   arch/mips//kernel/process.c: In function 'raise_backtrace':
>> include/linux/percpu-defs.h:91:33: error: section attribute cannot be specified for local variables
     extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;  \
                                    ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:92:26: error: section attribute cannot be specified for local variables
     __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;   \
                             ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:92:26: error: declaration of '__pcpu_unique_static_csd' with no linkage follows extern declaration
     __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;   \
                             ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:91:33: note: previous declaration of '__pcpu_unique_static_csd' was here
     extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;  \
                                    ^
>> include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     DEFINE_PER_CPU_SECTION(type, name, "")
     ^~~~~~~~~~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:44: error: section attribute cannot be specified for local variables
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:93:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     extern __PCPU_ATTRS(sec) __typeof__(type) name;   \
                                               ^~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:44: error: section attribute cannot be specified for local variables
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:95:19: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     __typeof__(type) name
                      ^~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:44: error: weak declaration of 'static_csd' must be public
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:95:19: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     __typeof__(type) name
                      ^~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:44: error: declaration of 'static_csd' with no linkage follows extern declaration
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:95:19: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     __typeof__(type) name
                      ^~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~
   arch/mips//kernel/process.c:669:44: note: previous declaration of 'static_csd' was here
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
                                               ^
   include/linux/percpu-defs.h:93:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     extern __PCPU_ATTRS(sec) __typeof__(type) name;   \
                                               ^~~~
   arch/mips//kernel/process.c:669:9: note: in expansion of macro 'DEFINE_PER_CPU'
     static DEFINE_PER_CPU(call_single_data_t, static_csd);
            ^~~~~~~~~~~~~~

vim +669 arch/mips/kernel/process.c

   666	
   667	static void raise_backtrace(cpumask_t *mask)
   668	{
 > 669		static DEFINE_PER_CPU(call_single_data_t, static_csd);
   670		call_single_data_t *csd;
   671		int cpu;
   672	
   673		for_each_cpu(cpu, mask) {
   674			/*
   675			 * If we previously sent an IPI to the target CPU & it hasn't
   676			 * cleared its bit in the busy cpumask then it didn't handle
   677			 * our previous IPI & it's not safe for us to reuse the
   678			 * call_single_data_t.
   679			 */
   680			if (cpumask_test_and_set_cpu(cpu, &backtrace_csd_busy)) {
   681				pr_warn("Unable to send backtrace IPI to CPU%u - perhaps it hung?\n",
   682					cpu);
   683				continue;
   684			}
   685	
   686			csd = &per_cpu(static_csd, cpu);
   687			csd->func = handle_backtrace;
   688			smp_call_function_single_async(cpu, csd);
   689		}
   690	}
   691	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux