Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
c37be00b
Unverified
Commit
c37be00b
authored
Mar 03, 2018
by
davidcunado-arm
Committed by
GitHub
Mar 03, 2018
Browse files
Merge pull request #1292 from danh-arm/dh/spurious-dep-warn
Suppress spurious deprecated declaration warnings
parents
06e3a5e1
dcf01a0a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
c37be00b
...
...
@@ -374,6 +374,12 @@ ifeq ($(HW_ASSISTED_COHERENCY)-$(USE_COHERENT_MEM),1-1)
$(error USE_COHERENT_MEM cannot be enabled with HW_ASSISTED_COHERENCY)
endif
ifneq ($(MULTI_CONSOLE_API), 0)
ifeq (${ARCH},aarch32)
$(error "
Error
:
MULTI_CONSOLE_API is not supported for AArch32")
endif
endif
################################################################################
# Process platform overrideable behaviour
################################################################################
...
...
@@ -588,9 +594,9 @@ all: msg_start
msg_start
:
@
echo
"Building
${PLAT}
"
# Check if deprecated declarations should be treated as error or not.
# Check if deprecated declarations
and cpp warnings
should be treated as error or not.
ifeq
(${ERROR_DEPRECATED},0)
TF_C
FLAGS
+=
-Wno-error
=
deprecated-declarations
CPP
FLAGS
+=
-Wno-error
=
deprecated-declarations
-Wno-error
=
cpp
endif
# Expand build macros for the different images
...
...
bl31/bl31_context_mgmt.c
View file @
c37be00b
...
...
@@ -79,7 +79,13 @@ void *cm_get_context_by_mpidr(uint64_t mpidr, uint32_t security_state)
{
assert
(
sec_state_is_valid
(
security_state
));
/*
* Suppress deprecated declaration warning in compatibility function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return
cm_get_context_by_index
(
platform_get_core_pos
(
mpidr
),
security_state
);
#pragma GCC diagnostic pop
}
/*******************************************************************************
...
...
@@ -90,8 +96,14 @@ void cm_set_context_by_mpidr(uint64_t mpidr, void *context, uint32_t security_st
{
assert
(
sec_state_is_valid
(
security_state
));
/*
* Suppress deprecated declaration warning in compatibility function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
cm_set_context_by_index
(
platform_get_core_pos
(
mpidr
),
context
,
security_state
);
#pragma GCC diagnostic pop
}
/*******************************************************************************
...
...
@@ -104,7 +116,15 @@ void cm_init_context(uint64_t mpidr, const entry_point_info_t *ep)
if
((
mpidr
&
MPIDR_AFFINITY_MASK
)
==
(
read_mpidr_el1
()
&
MPIDR_AFFINITY_MASK
))
cm_init_my_context
(
ep
);
else
else
{
/*
* Suppress deprecated declaration warning in compatibility
* function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
cm_init_context_by_index
(
platform_get_core_pos
(
mpidr
),
ep
);
#pragma GCC diagnostic pop
}
}
#endif
#endif
/* ERROR_DEPRECATED */
drivers/arm/gic/v2/gicv2_main.c
View file @
c37be00b
...
...
@@ -85,10 +85,17 @@ void gicv2_pcpu_distif_init(void)
driver_data
->
interrupt_props_num
);
#if !ERROR_DEPRECATED
}
else
{
/*
* Suppress deprecated declaration warnings in compatibility
* function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
assert
(
driver_data
->
g0_interrupt_array
);
gicv2_secure_ppi_sgi_setup
(
driver_data
->
gicd_base
,
driver_data
->
g0_interrupt_num
,
driver_data
->
g0_interrupt_array
);
#pragma GCC diagnostic pop
}
#endif
...
...
@@ -128,12 +135,20 @@ void gicv2_distif_init(void)
driver_data
->
interrupt_props_num
);
#if !ERROR_DEPRECATED
}
else
{
/*
* Suppress deprecated declaration warnings in compatibility
* function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
assert
(
driver_data
->
g0_interrupt_array
);
/* Configure the G0 SPIs */
gicv2_secure_spis_configure
(
driver_data
->
gicd_base
,
driver_data
->
g0_interrupt_num
,
driver_data
->
g0_interrupt_array
);
#pragma GCC diagnostic pop
}
#endif
...
...
@@ -156,6 +171,13 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data)
/* Interrupt properties array size must be 0 */
assert
(
plat_driver_data
->
interrupt_props_num
==
0
);
/*
* Suppress deprecated declaration warnings in compatibility
* function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/* The platform should provide a list of secure interrupts */
assert
(
plat_driver_data
->
g0_interrupt_array
);
...
...
@@ -166,6 +188,11 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data)
assert
(
plat_driver_data
->
g0_interrupt_array
?
plat_driver_data
->
g0_interrupt_num
:
plat_driver_data
->
g0_interrupt_num
==
0
);
#pragma GCC diagnostic pop
WARN
(
"Using deprecated integer interrupt array in "
"gicv2_driver_data_t
\n
"
);
WARN
(
"Please migrate to using an interrupt_prop_t array
\n
"
);
}
#else
assert
(
plat_driver_data
->
interrupt_props
!=
NULL
);
...
...
drivers/arm/gic/v3/gicv3_main.c
View file @
c37be00b
...
...
@@ -72,6 +72,13 @@ void gicv3_driver_init(const gicv3_driver_data_t *plat_driver_data)
/* Interrupt properties array size must be 0 */
assert
(
plat_driver_data
->
interrupt_props_num
==
0
);
/*
* Suppress deprecated declaration warnings in compatibility
* function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/*
* The platform should provide a list of at least one type of
* interrupt.
...
...
@@ -89,6 +96,11 @@ void gicv3_driver_init(const gicv3_driver_data_t *plat_driver_data)
assert
(
plat_driver_data
->
g1s_interrupt_array
?
plat_driver_data
->
g1s_interrupt_num
:
plat_driver_data
->
g1s_interrupt_num
==
0
);
#pragma GCC diagnostic pop
WARN
(
"Using deprecated integer interrupt arrays in "
"gicv3_driver_data_t
\n
"
);
WARN
(
"Please migrate to using interrupt_prop_t arrays
\n
"
);
}
#else
assert
(
plat_driver_data
->
interrupt_props
!=
NULL
);
...
...
@@ -189,6 +201,13 @@ void gicv3_distif_init(void)
gicv3_driver_data
->
interrupt_props_num
);
#if !ERROR_DEPRECATED
}
else
{
/*
* Suppress deprecated declaration warnings in compatibility
* function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
assert
(
gicv3_driver_data
->
g1s_interrupt_array
||
gicv3_driver_data
->
g0_interrupt_array
);
...
...
@@ -209,6 +228,7 @@ void gicv3_distif_init(void)
INTR_GROUP0
);
bitmap
|=
CTLR_ENABLE_G0_BIT
;
}
#pragma GCC diagnostic pop
}
#endif
...
...
@@ -253,6 +273,13 @@ void gicv3_rdistif_init(unsigned int proc_num)
gicv3_driver_data
->
interrupt_props_num
);
#if !ERROR_DEPRECATED
}
else
{
/*
* Suppress deprecated declaration warnings in compatibility
* function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
assert
(
gicv3_driver_data
->
g1s_interrupt_array
||
gicv3_driver_data
->
g0_interrupt_array
);
...
...
@@ -273,6 +300,7 @@ void gicv3_rdistif_init(unsigned int proc_num)
INTR_GROUP0
);
bitmap
|=
CTLR_ENABLE_G0_BIT
;
}
#pragma GCC diagnostic pop
}
#endif
...
...
drivers/console/aarch64/deprecated_console.S
View file @
c37be00b
/*
*
Copyright
(
c
)
2015
-
201
7
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
201
8
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -9,6 +9,7 @@
*
This
is
the
common
console
core
code
for
the
deprecated
single
-
console
API
.
*
New
platforms
should
set
MULTI_CONSOLE_API
=
1
and
not
use
this
file
.
*/
#warning "Using deprecated console implementation. Please migrate to MULTI_CONSOLE_API"
.
globl
console_init
.
globl
console_uninit
...
...
include/drivers/arm/gicv2.h
View file @
c37be00b
...
...
@@ -155,8 +155,8 @@ typedef struct gicv2_driver_data {
uintptr_t
gicd_base
;
uintptr_t
gicc_base
;
#if !ERROR_DEPRECATED
unsigned
int
g0_interrupt_num
;
const
unsigned
int
*
g0_interrupt_array
;
unsigned
int
g0_interrupt_num
__deprecated
;
const
unsigned
int
*
g0_interrupt_array
__deprecated
;
#endif
unsigned
int
*
target_masks
;
unsigned
int
target_masks_num
;
...
...
include/drivers/arm/gicv3.h
View file @
c37be00b
...
...
@@ -310,10 +310,10 @@ typedef struct gicv3_driver_data {
uintptr_t
gicd_base
;
uintptr_t
gicr_base
;
#if !ERROR_DEPRECATED
unsigned
int
g0_interrupt_num
;
unsigned
int
g1s_interrupt_num
;
const
unsigned
int
*
g0_interrupt_array
;
const
unsigned
int
*
g1s_interrupt_array
;
unsigned
int
g0_interrupt_num
__deprecated
;
unsigned
int
g1s_interrupt_num
__deprecated
;
const
unsigned
int
*
g0_interrupt_array
__deprecated
;
const
unsigned
int
*
g1s_interrupt_array
__deprecated
;
#endif
const
interrupt_prop_t
*
interrupt_props
;
unsigned
int
interrupt_props_num
;
...
...
include/drivers/console.h
View file @
c37be00b
/*
* Copyright (c) 2013-201
7
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -63,10 +63,10 @@ int console_getc(void);
int
console_flush
(
void
);
#if !MULTI_CONSOLE_API
/*
DEPRECAT
ED on AArch64 -- use console_<driver>_register() instead! */
/*
REMOV
ED on AArch64 -- use console_<driver>_register() instead! */
int
console_init
(
uintptr_t
base_addr
,
unsigned
int
uart_clk
,
unsigned
int
baud_rate
)
__deprecated
;
void
console_uninit
(
void
)
__deprecated
;
unsigned
int
uart_clk
,
unsigned
int
baud_rate
);
void
console_uninit
(
void
);
#endif
#endif
/* __ASSEMBLY__ */
...
...
make_helpers/defaults.mk
View file @
c37be00b
#
# Copyright (c) 2016-201
7
, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2016-201
8
, ARM Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
...
...
@@ -98,9 +98,9 @@ KEY_ALG := rsa
# Flag to enable new version of image loading
LOAD_IMAGE_V2
:=
0
#
Use the new console API that allows registering more than one console instance
# at
once. Use = instead of := to dynamically default to ERROR_DEPRECATED
.
MULTI_CONSOLE_API
=
$(ERROR_DEPRECATED)
#
Enable use of the console API allowing multiple consoles to be registered
# at
the same time
.
MULTI_CONSOLE_API
:
=
0
# NS timer register save and restore
NS_TIMER_SWITCH
:=
0
...
...
plat/common/aarch64/plat_common.c
View file @
c37be00b
...
...
@@ -65,7 +65,15 @@ unsigned int platform_core_pos_helper(unsigned long mpidr)
#if !ERROR_DEPRECATED
unsigned
int
plat_get_syscnt_freq2
(
void
)
{
WARN
(
"plat_get_syscnt_freq() is deprecated
\n
"
);
WARN
(
"Please define plat_get_syscnt_freq2()
\n
"
);
/*
* Suppress deprecated declaration warning in compatibility function
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
unsigned
long
long
freq
=
plat_get_syscnt_freq
();
#pragma GCC diagnostic pop
assert
(
freq
>>
32
==
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment