mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
ia64: do not typedef struct pal_min_state_area_s
Documentation/process/coding-style.rst says: Please don't use things like ``vps_t``. It's a **mistake** to use typedef for structures and pointers. This commit converts as follows: struct pal_min_state_area_s -> struct pal_min_state_area pal_min_state_area_t -> struct pal_min_state_area My main motivation for this is to slim down the include directives of <asm/mca.h> in the next commit. Currently, <asm/mca.h> is required to include <asm/pal.h> directly or indirectly due to (pal_min_state_area_t *). Otherwise, it would have no idea what pal_min_state_area_t is. Replacing it with (struct pal_min_state_area *) will relax the header dependency since it is enough to tell it is a pointer to a structure, and to resolve the size of struct pal_min_state_area. It will make <asm/mca.h> independent of <asm/pal.h>. <asm/pal.h> typedef's a lot of structures, but it is trivial to convert the others in the same way. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
This commit is contained in:
parent
92bf22614b
commit
2770ef7c8a
@ -83,7 +83,7 @@ struct ia64_sal_os_state {
|
||||
/* common */
|
||||
unsigned long sal_ra; /* Return address in SAL, physical */
|
||||
unsigned long sal_gp; /* GP of the SAL - physical */
|
||||
pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */
|
||||
struct pal_min_state_area *pal_min_state; /* from R17. physical in asm, virtual in C */
|
||||
/* Previous values of IA64_KR(CURRENT) and IA64_KR(CURRENT_STACK).
|
||||
* Note: if the MCA/INIT recovery code wants to resume to a new context
|
||||
* then it must change these values to reflect the new kernel stack.
|
||||
|
@ -750,7 +750,7 @@ typedef union pal_mc_error_info_u {
|
||||
* for PAL.
|
||||
*/
|
||||
|
||||
typedef struct pal_min_state_area_s {
|
||||
struct pal_min_state_area {
|
||||
u64 pmsa_nat_bits; /* nat bits for saved GRs */
|
||||
u64 pmsa_gr[15]; /* GR1 - GR15 */
|
||||
u64 pmsa_bank0_gr[16]; /* GR16 - GR31 */
|
||||
@ -766,7 +766,7 @@ typedef struct pal_min_state_area_s {
|
||||
u64 pmsa_xfs; /* previous ifs */
|
||||
u64 pmsa_br1; /* branch register 1 */
|
||||
u64 pmsa_reserved[70]; /* pal_min_state_area should total to 1KB */
|
||||
} pal_min_state_area_t;
|
||||
};
|
||||
|
||||
|
||||
struct ia64_pal_retval {
|
||||
|
@ -385,7 +385,7 @@ typedef struct sal_processor_static_info {
|
||||
fr : 1,
|
||||
reserved : 58;
|
||||
} valid;
|
||||
pal_min_state_area_t min_state_area;
|
||||
struct pal_min_state_area min_state_area;
|
||||
u64 br[8];
|
||||
u64 cr[128];
|
||||
u64 ar[128];
|
||||
|
@ -245,23 +245,23 @@ void foo(void)
|
||||
BLANK();
|
||||
|
||||
DEFINE(IA64_PMSA_GR_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_gr));
|
||||
offsetof(struct pal_min_state_area, pmsa_gr));
|
||||
DEFINE(IA64_PMSA_BANK1_GR_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_bank1_gr));
|
||||
offsetof(struct pal_min_state_area, pmsa_bank1_gr));
|
||||
DEFINE(IA64_PMSA_PR_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_pr));
|
||||
offsetof(struct pal_min_state_area, pmsa_pr));
|
||||
DEFINE(IA64_PMSA_BR0_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_br0));
|
||||
offsetof(struct pal_min_state_area, pmsa_br0));
|
||||
DEFINE(IA64_PMSA_RSC_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_rsc));
|
||||
offsetof(struct pal_min_state_area, pmsa_rsc));
|
||||
DEFINE(IA64_PMSA_IIP_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_iip));
|
||||
offsetof(struct pal_min_state_area, pmsa_iip));
|
||||
DEFINE(IA64_PMSA_IPSR_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_ipsr));
|
||||
offsetof(struct pal_min_state_area, pmsa_ipsr));
|
||||
DEFINE(IA64_PMSA_IFS_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_ifs));
|
||||
offsetof(struct pal_min_state_area, pmsa_ifs));
|
||||
DEFINE(IA64_PMSA_XIP_OFFSET,
|
||||
offsetof (struct pal_min_state_area_s, pmsa_xip));
|
||||
offsetof(struct pal_min_state_area, pmsa_xip));
|
||||
BLANK();
|
||||
|
||||
/* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */
|
||||
|
@ -894,7 +894,7 @@ static void
|
||||
finish_pt_regs(struct pt_regs *regs, struct ia64_sal_os_state *sos,
|
||||
unsigned long *nat)
|
||||
{
|
||||
const pal_min_state_area_t *ms = sos->pal_min_state;
|
||||
const struct pal_min_state_area *ms = sos->pal_min_state;
|
||||
const u64 *bank;
|
||||
|
||||
/* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use
|
||||
@ -970,7 +970,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
|
||||
char *p;
|
||||
ia64_va va;
|
||||
extern char ia64_leave_kernel[]; /* Need asm address, not function descriptor */
|
||||
const pal_min_state_area_t *ms = sos->pal_min_state;
|
||||
const struct pal_min_state_area *ms = sos->pal_min_state;
|
||||
struct task_struct *previous_current;
|
||||
struct pt_regs *old_regs;
|
||||
struct switch_stack *old_sw;
|
||||
|
@ -496,7 +496,7 @@ recover_from_read_error(slidx_table_t *slidx,
|
||||
struct ia64_sal_os_state *sos)
|
||||
{
|
||||
u64 target_identifier;
|
||||
pal_min_state_area_t *pmsa;
|
||||
struct pal_min_state_area *pmsa;
|
||||
struct ia64_psr *psr1, *psr2;
|
||||
ia64_fptr_t *mca_hdlr_bh = (ia64_fptr_t*)mca_handler_bhhook;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user