diff options
author | Joel Stanley <joel@jms.id.au> | 2014-08-14 18:24:46 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-08-15 13:03:08 +1000 |
commit | c0515b6361b03d18cffcbc358d0f6109cd684031 (patch) | |
tree | 088ff25d2614f7cab5a89629d1a44eae7439c163 /hdata | |
parent | 8058a51e2d17055cc68ca4c96c69269fdf9e9016 (diff) | |
download | skiboot-c0515b6361b03d18cffcbc358d0f6109cd684031.zip skiboot-c0515b6361b03d18cffcbc358d0f6109cd684031.tar.gz skiboot-c0515b6361b03d18cffcbc358d0f6109cd684031.tar.bz2 |
hdata/test: Fix broken tests
Commit e810dcbc (ATTN: Set up attention area to handle attention) broke
tests, as the familiy of CPU_TO_BEXX macros are not compile time constant.
hdata/test/../spira.c:60:4: error: initializer element is not constant
.addr = CPU_TO_BE64((unsigned long)&(cpu_ctl_spat_area) + SKIBOOT_BASE)
There is no test coverage of this code, so for now we can comment out
these areas in order to allow the tests to pass.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hdata')
-rw-r--r-- | hdata/spira.c | 4 | ||||
-rw-r--r-- | hdata/test/Makefile.check | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/hdata/spira.c b/hdata/spira.c index 3923bb5..e6a7561 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -55,6 +55,7 @@ __section(".cpuctrl.data") struct hsr_data_area cpu_ctl_hsr_area; __section(".cpuctrl.data") struct cpu_ctl_init_data cpu_ctl_init_data = { .hdr = HDIF_SIMPLE_HDR(CPU_CTL_HDIF_SIG, 2, struct cpu_ctl_init_data), .cpu_ctl = HDIF_IDATA_PTR(offsetof(struct cpu_ctl_init_data, cpu_ctl_lt), sizeof(struct cpu_ctl_legacy_table)), +#if !defined(TEST) .cpu_ctl_lt = { .spat = { .addr = CPU_TO_BE64((unsigned long)&(cpu_ctl_spat_area) + SKIBOOT_BASE), @@ -73,6 +74,7 @@ __section(".cpuctrl.data") struct cpu_ctl_init_data cpu_ctl_init_data = { .size = CPU_TO_BE64(sizeof(struct hsr_data_area)), }, }, +#endif }; /* Populate MDST table @@ -133,6 +135,7 @@ __section(".spira.data") struct spira spira = { .alloc_len = CPU_TO_BE32(sizeof(init_mdst_table)), }, +#if !defined(TEST) .cpu_ctrl = { .addr = CPU_TO_BE64((unsigned long)&cpu_ctl_init_data), .alloc_cnt = CPU_TO_BE16(1), @@ -140,6 +143,7 @@ __section(".spira.data") struct spira spira = { .alloc_len = CPU_TO_BE32(sizeof(cpu_ctl_init_data)), }, +#endif }, }; diff --git a/hdata/test/Makefile.check b/hdata/test/Makefile.check index e03a021..63fcb4a 100644 --- a/hdata/test/Makefile.check +++ b/hdata/test/Makefile.check @@ -10,7 +10,7 @@ hdata/test/stubs.o: hdata/test/stubs.c $(HOSTCC) $(HOSTCFLAGS) -g -c -o $@ $< hdata/test/hdata_to_dt: hdata/test/hdata_to_dt.c hdata/test/stubs.o - $(HOSTCC) $(HOSTCFLAGS) -O0 -g -I hdata -I include -I . -I libfdt -o $@ $< hdata/test/stubs.o + $(HOSTCC) $(HOSTCFLAGS) -DTEST -O0 -g -I hdata -I include -I . -I libfdt -o $@ $< hdata/test/stubs.o clean: hdata-test-clean |