s390/cio: simplify css_generate_pgid

Simplify the css_generate_pgid code by using stap() independent of
CONFIG_SMP. For !CONFIG_SMP builds stap() will deliver the address
of the cpu we IPL'ed from (which can be != 0).

Note: the ifdef was likely added to be compatible with _very_ old
machines which we don't support anyway.

Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Sebastian Ott 2015-07-16 22:40:27 +02:00 committed by Martin Schwidefsky
parent 230ccb370f
commit cd5dead9d3

View file

@ -702,17 +702,12 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
css->global_pgid.pgid_high.ext_cssid.version = 0x80;
css->global_pgid.pgid_high.ext_cssid.cssid = css->cssid;
} else {
#ifdef CONFIG_SMP
css->global_pgid.pgid_high.cpu_addr = stap();
#else
css->global_pgid.pgid_high.cpu_addr = 0;
#endif
}
get_cpu_id(&cpu_id);
css->global_pgid.cpu_id = cpu_id.ident;
css->global_pgid.cpu_model = cpu_id.machine;
css->global_pgid.tod_high = tod_high;
}
static void