[ia64:rdt-cat-resplit 14/14] arch/x86/kernel/cpu/intel_rdt_schemata.c:163:26: error: 'struct rdt_resource' has no member named 'num_cbms'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git rdt-cat-resplit
head:   691824e3d6bb20388835681298bfcad06a48f6d6
commit: 691824e3d6bb20388835681298bfcad06a48f6d6 [14/14] x86/intel_rdt: Add schemata file
config: i386-randconfig-i0-201640 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
        git checkout 691824e3d6bb20388835681298bfcad06a48f6d6
        # save the attached .config to linux build tree
        make ARCH=i386 

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

   arch/x86/kernel/cpu/intel_rdt_schemata.c: In function 'cbm_validate':
   arch/x86/kernel/cpu/intel_rdt_schemata.c:51:28: error: expected expression before '<' token
     if (zero_bit - first_bit) < r->min_cbm_bits)
                               ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:51:45: error: expected statement before ')' token
     if (zero_bit - first_bit) < r->min_cbm_bits)
                                                ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c: In function 'parse_cbm_token':
   arch/x86/kernel/cpu/intel_rdt_schemata.c:69:3: error: expected ')' before 'return'
      return -EINVAL;
      ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:72:1: error: expected expression before '}' token
    }
    ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c: In function 'parse_cbm':
   arch/x86/kernel/cpu/intel_rdt_schemata.c:90:5: error: expected '(' before 'r'
     if r->cdp_enabled)
        ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:90:5: warning: statement with no effect [-Wunused-value]
   arch/x86/kernel/cpu/intel_rdt_schemata.c:90:19: error: expected statement before ')' token
     if r->cdp_enabled)
                      ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c: In function 'parse_line':
   arch/x86/kernel/cpu/intel_rdt_schemata.c:109:3: error: 'dom' undeclared (first use in this function)
      dom = strsep(&line, ";");
      ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:109:3: note: each undeclared identifier is reported only once for each function it appears in
   arch/x86/kernel/cpu/intel_rdt_schemata.c:112:3: error: 'id' undeclared (first use in this function)
      id = strsep(&dom, "=");
      ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:113:25: error: 'dom_id' undeclared (first use in this function)
      if (kstrtoul(id, 10, &dom_id) || dom_id != d->id)
                            ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c: In function 'update_domains':
   arch/x86/kernel/cpu/intel_rdt_schemata.c:129:20: error: 'struct resource' has no member named 'base_msr'
     msr_param.base = r->base_msr;
                       ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:130:29: error: 'struct resource' has no member named 'cbm_enabled'
     msr_param.low = closid << r->cbm_enabled;
                                ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:131:40: error: 'struct resource' has no member named 'cbm_enabled'
     msr_param.high = msr_param.low + 1 + r->cbm_enabled;
                                           ^
   In file included from include/linux/kernfs.h:12:0,
                    from arch/x86/kernel/cpu/intel_rdt_schemata.c:27:
   arch/x86/kernel/cpu/intel_rdt_schemata.c:133:21: error: 'struct resource' has no member named 'domains'
     list_for_each(l, &r->domains) {
                        ^
   include/linux/list.h:409:14: note: in definition of macro 'list_for_each'
     for (pos = (head)->next; pos != (head); pos = pos->next)
                 ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:133:21: error: 'struct resource' has no member named 'domains'
     list_for_each(l, &r->domains) {
                        ^
   include/linux/list.h:409:35: note: in definition of macro 'list_for_each'
     for (pos = (head)->next; pos != (head); pos = pos->next)
                                      ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:136:28: error: 'struct resource' has no member named 'tmp_cbms'
      d->cbm[msr_param.low] = r->tmp_cbms[idx++];
                               ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:137:8: error: 'struct resource' has no member named 'cbm_enabled'
      if (r->cbm_enabled)
           ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:138:33: error: 'struct resource' has no member named 'tmp_cbms'
       d->cbm[msr_param.low + 1] = r->tmp_cbms[idx++];
                                    ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c: In function 'rdtgroup_schemata_write':
>> arch/x86/kernel/cpu/intel_rdt_schemata.c:163:26: error: 'struct rdt_resource' has no member named 'num_cbms'
      r->tmp_cbms = kcalloc(r->num_cbms << r->cdp_enabled,
                             ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:173:48: error: expected ')' before '{' token
       if (!strncmp(tok, r->name, strlen(r->name)) {
                                                   ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:177:3: error: expected expression before '}' token
      }
      ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:184:21: error: 'struct rdt_resource' has no member named 'num_cbms'
      if (!r->tmp_cbms[r->num_cbms - 1])
                        ^
>> arch/x86/kernel/cpu/intel_rdt_schemata.c:188:3: warning: passing argument 1 of 'update_domains' from incompatible pointer type [enabled by default]
      update_domains(r, closid);
      ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:120:13: note: expected 'struct resource *' but argument is of type 'struct rdt_resource *'
    static void update_domains(struct resource *r, int closid)
                ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:200:13: error: invalid storage class for function 'show_doms'
    static void show_doms(struct seq_file *s, struct rdt_resource *r, int closid)
                ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:200:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    static void show_doms(struct seq_file *s, struct rdt_resource *r, int closid)
    ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:234:1: error: expected declaration or statement at end of input
    }
    ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c:149:23: warning: unused variable 'num_l3_cbms' [-Wunused-variable]
     int closid, ret = 0, num_l3_cbms = 0;
                          ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c: At top level:
   arch/x86/kernel/cpu/intel_rdt_schemata.c:101:13: warning: 'parse_line' defined but not used [-Wunused-function]
    static void parse_line(char *line, struct rdt_resource *r)
                ^
   arch/x86/kernel/cpu/intel_rdt_schemata.c: In function 'rdtgroup_schemata_write':
   arch/x86/kernel/cpu/intel_rdt_schemata.c:234:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +163 arch/x86/kernel/cpu/intel_rdt_schemata.c

   131		msr_param.high = msr_param.low + 1 + r->cbm_enabled;
   132	
   133		list_for_each(l, &r->domains) {
   134			d = list_entry(l, struct rdt_domain, list);
   135			cpumask_set_cpu(cpumask_any(&d->cpu_mask), &cpu_mask);
   136			d->cbm[msr_param.low] = r->tmp_cbms[idx++];
 > 137			if (r->cbm_enabled)
   138				d->cbm[msr_param.low + 1] = r->tmp_cbms[idx++];
   139		}
   140		smp_call_function_many(&cpu_mask, rdt_cbm_update, &msr_param, 1);
   141	}
   142	
   143	ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
   144					char *buf, size_t nbytes, loff_t off)
   145	{
   146		char *buf1, *tok;
   147		struct rdtgroup *rdtgrp;
   148		struct rdt_resource *r;
   149		int closid, ret = 0, num_l3_cbms = 0;
   150		u32 *l3_cbms = NULL;
   151	
   152		buf1 = kmalloc(nbytes + 1, GFP_KERNEL);
   153		if (!buf1)
   154			return -ENOMEM;
   155		memcpy(buf1, buf, nbytes);
   156		buf1[nbytes] = '\0';
   157	
   158		rdtgrp = rdtgroup_kn_lock_live(of->kn);
   159		closid = rdtgrp - rdtgroups_all;
   160	
   161		/* get scratch space to save all the masks while we validate input */
   162		for_each_rdt_resource(r) {
 > 163			r->tmp_cbms = kcalloc(r->num_cbms << r->cdp_enabled,
   164					      sizeof *l3_cbms, GFP_KERNEL);
   165			if (!r->tmp_cbms) {
   166				ret = -ENOMEM;
   167				goto fail;
   168			}
   169		}
   170	
   171		while ((tok = strsep(&buf1, "\n")) != NULL) {
   172			for_each_rdt_resource(r) {
 > 173				if (!strncmp(tok, r->name, strlen(r->name)) {
   174					parse_line(tok + strlen(r->name), r);
   175					break;
   176				}
   177			}
   178			if (!r->name)
   179				goto fail;
   180		}
   181	
   182		/* Did the parser find all the masks we need? */
   183		for_each_rdt_resource(r) {
   184			if (!r->tmp_cbms[r->num_cbms - 1])
   185				goto fail;
   186	
   187		for_each_rdt_resource(r)
 > 188			update_domains(r, closid);
   189	
   190	fail:
   191		rdtgroup_kn_unlock(of->kn);

---
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 Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux