mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
s390/lowcore: replace lowcore irb array with a per-cpu variable
Remove the 96-byte irb array from the lowcore and create a per-cpu variable instead. That way we will pick up any change in the definition of the struct irb automatically. Acked-By: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
993072ee67
commit
63aef00b55
@ -143,10 +143,7 @@ struct _lowcore {
|
|||||||
__u32 ftrace_func; /* 0x02f8 */
|
__u32 ftrace_func; /* 0x02f8 */
|
||||||
__u32 spinlock_lockval; /* 0x02fc */
|
__u32 spinlock_lockval; /* 0x02fc */
|
||||||
|
|
||||||
/* Interrupt response block */
|
__u8 pad_0x0300[0x0e00-0x0300]; /* 0x0300 */
|
||||||
__u8 irb[96]; /* 0x0300 */
|
|
||||||
|
|
||||||
__u8 pad_0x0360[0x0e00-0x0360]; /* 0x0360 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 0xe00 contains the address of the IPL Parameter Information
|
* 0xe00 contains the address of the IPL Parameter Information
|
||||||
@ -292,14 +289,10 @@ struct _lowcore {
|
|||||||
__u32 spinlock_lockval; /* 0x03a0 */
|
__u32 spinlock_lockval; /* 0x03a0 */
|
||||||
__u8 pad_0x03a0[0x0400-0x03a4]; /* 0x03a4 */
|
__u8 pad_0x03a0[0x0400-0x03a4]; /* 0x03a4 */
|
||||||
|
|
||||||
/* Interrupt response block. */
|
|
||||||
__u8 irb[96]; /* 0x0400 */
|
|
||||||
__u8 pad_0x0460[0x0480-0x0460]; /* 0x0460 */
|
|
||||||
|
|
||||||
/* Per cpu primary space access list */
|
/* Per cpu primary space access list */
|
||||||
__u32 paste[16]; /* 0x0480 */
|
__u32 paste[16]; /* 0x0400 */
|
||||||
|
|
||||||
__u8 pad_0x04c0[0x0e00-0x04c0]; /* 0x04c0 */
|
__u8 pad_0x04c0[0x0e00-0x0440]; /* 0x0440 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 0xe00 contains the address of the IPL Parameter Information
|
* 0xe00 contains the address of the IPL Parameter Information
|
||||||
|
@ -144,7 +144,6 @@ int main(void)
|
|||||||
DEFINE(__LC_MCCK_CLOCK, offsetof(struct _lowcore, mcck_clock));
|
DEFINE(__LC_MCCK_CLOCK, offsetof(struct _lowcore, mcck_clock));
|
||||||
DEFINE(__LC_MACHINE_FLAGS, offsetof(struct _lowcore, machine_flags));
|
DEFINE(__LC_MACHINE_FLAGS, offsetof(struct _lowcore, machine_flags));
|
||||||
DEFINE(__LC_FTRACE_FUNC, offsetof(struct _lowcore, ftrace_func));
|
DEFINE(__LC_FTRACE_FUNC, offsetof(struct _lowcore, ftrace_func));
|
||||||
DEFINE(__LC_IRB, offsetof(struct _lowcore, irb));
|
|
||||||
DEFINE(__LC_DUMP_REIPL, offsetof(struct _lowcore, ipib));
|
DEFINE(__LC_DUMP_REIPL, offsetof(struct _lowcore, ipib));
|
||||||
BLANK();
|
BLANK();
|
||||||
DEFINE(__LC_CPU_TIMER_SAVE_AREA, offsetof(struct _lowcore, cpu_timer_save_area));
|
DEFINE(__LC_CPU_TIMER_SAVE_AREA, offsetof(struct _lowcore, cpu_timer_save_area));
|
||||||
|
@ -252,7 +252,7 @@ static void ccwreq_log_status(struct ccw_device *cdev, enum io_status status)
|
|||||||
*/
|
*/
|
||||||
void ccw_request_handler(struct ccw_device *cdev)
|
void ccw_request_handler(struct ccw_device *cdev)
|
||||||
{
|
{
|
||||||
struct irb *irb = (struct irb *)&S390_lowcore.irb;
|
struct irb *irb = &__get_cpu_var(cio_irb);
|
||||||
struct ccw_request *req = &cdev->private->req;
|
struct ccw_request *req = &cdev->private->req;
|
||||||
enum io_status status;
|
enum io_status status;
|
||||||
int rc = -EOPNOTSUPP;
|
int rc = -EOPNOTSUPP;
|
||||||
|
@ -58,7 +58,7 @@ static void chsc_subchannel_irq(struct subchannel *sch)
|
|||||||
{
|
{
|
||||||
struct chsc_private *private = dev_get_drvdata(&sch->dev);
|
struct chsc_private *private = dev_get_drvdata(&sch->dev);
|
||||||
struct chsc_request *request = private->request;
|
struct chsc_request *request = private->request;
|
||||||
struct irb *irb = (struct irb *)&S390_lowcore.irb;
|
struct irb *irb = &__get_cpu_var(cio_irb);
|
||||||
|
|
||||||
CHSC_LOG(4, "irb");
|
CHSC_LOG(4, "irb");
|
||||||
CHSC_LOG_HEX(4, irb, sizeof(*irb));
|
CHSC_LOG_HEX(4, irb, sizeof(*irb));
|
||||||
|
@ -46,6 +46,9 @@ debug_info_t *cio_debug_msg_id;
|
|||||||
debug_info_t *cio_debug_trace_id;
|
debug_info_t *cio_debug_trace_id;
|
||||||
debug_info_t *cio_debug_crw_id;
|
debug_info_t *cio_debug_crw_id;
|
||||||
|
|
||||||
|
DEFINE_PER_CPU_ALIGNED(struct irb, cio_irb);
|
||||||
|
EXPORT_PER_CPU_SYMBOL(cio_irb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function: cio_debug_init
|
* Function: cio_debug_init
|
||||||
* Initializes three debug logs for common I/O:
|
* Initializes three debug logs for common I/O:
|
||||||
@ -560,7 +563,7 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy)
|
|||||||
|
|
||||||
__this_cpu_write(s390_idle.nohz_delay, 1);
|
__this_cpu_write(s390_idle.nohz_delay, 1);
|
||||||
tpi_info = (struct tpi_info *) &get_irq_regs()->int_code;
|
tpi_info = (struct tpi_info *) &get_irq_regs()->int_code;
|
||||||
irb = (struct irb *) &S390_lowcore.irb;
|
irb = &__get_cpu_var(cio_irb);
|
||||||
sch = (struct subchannel *)(unsigned long) tpi_info->intparm;
|
sch = (struct subchannel *)(unsigned long) tpi_info->intparm;
|
||||||
if (!sch) {
|
if (!sch) {
|
||||||
/* Clear pending interrupt condition. */
|
/* Clear pending interrupt condition. */
|
||||||
@ -609,7 +612,7 @@ void cio_tsch(struct subchannel *sch)
|
|||||||
struct irb *irb;
|
struct irb *irb;
|
||||||
int irq_context;
|
int irq_context;
|
||||||
|
|
||||||
irb = (struct irb *)&S390_lowcore.irb;
|
irb = &__get_cpu_var(cio_irb);
|
||||||
/* Store interrupt response block to lowcore. */
|
/* Store interrupt response block to lowcore. */
|
||||||
if (tsch(sch->schid, irb) != 0)
|
if (tsch(sch->schid, irb) != 0)
|
||||||
/* Not status pending or not operational. */
|
/* Not status pending or not operational. */
|
||||||
@ -746,7 +749,7 @@ __clear_io_subchannel_easy(struct subchannel_id schid)
|
|||||||
struct tpi_info ti;
|
struct tpi_info ti;
|
||||||
|
|
||||||
if (tpi(&ti)) {
|
if (tpi(&ti)) {
|
||||||
tsch(ti.schid, (struct irb *)&S390_lowcore.irb);
|
tsch(ti.schid, &__get_cpu_var(cio_irb));
|
||||||
if (schid_equal(&ti.schid, &schid))
|
if (schid_equal(&ti.schid, &schid))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,8 @@ struct subchannel {
|
|||||||
struct schib_config config;
|
struct schib_config config;
|
||||||
} __attribute__ ((aligned(8)));
|
} __attribute__ ((aligned(8)));
|
||||||
|
|
||||||
|
DECLARE_PER_CPU(struct irb, cio_irb);
|
||||||
|
|
||||||
#define to_subchannel(n) container_of(n, struct subchannel, dev)
|
#define to_subchannel(n) container_of(n, struct subchannel, dev)
|
||||||
|
|
||||||
extern int cio_validate_subchannel (struct subchannel *, struct subchannel_id);
|
extern int cio_validate_subchannel (struct subchannel *, struct subchannel_id);
|
||||||
|
@ -739,7 +739,7 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event)
|
|||||||
struct irb *irb;
|
struct irb *irb;
|
||||||
int is_cmd;
|
int is_cmd;
|
||||||
|
|
||||||
irb = (struct irb *)&S390_lowcore.irb;
|
irb = &__get_cpu_var(cio_irb);
|
||||||
is_cmd = !scsw_is_tm(&irb->scsw);
|
is_cmd = !scsw_is_tm(&irb->scsw);
|
||||||
/* Check for unsolicited interrupt. */
|
/* Check for unsolicited interrupt. */
|
||||||
if (!scsw_is_solicited(&irb->scsw)) {
|
if (!scsw_is_solicited(&irb->scsw)) {
|
||||||
@ -805,7 +805,7 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event)
|
|||||||
{
|
{
|
||||||
struct irb *irb;
|
struct irb *irb;
|
||||||
|
|
||||||
irb = (struct irb *)&S390_lowcore.irb;
|
irb = &__get_cpu_var(cio_irb);
|
||||||
/* Check for unsolicited interrupt. */
|
/* Check for unsolicited interrupt. */
|
||||||
if (scsw_stctl(&irb->scsw) ==
|
if (scsw_stctl(&irb->scsw) ==
|
||||||
(SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) {
|
(SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) {
|
||||||
|
@ -134,7 +134,7 @@ static void eadm_subchannel_irq(struct subchannel *sch)
|
|||||||
{
|
{
|
||||||
struct eadm_private *private = get_eadm_private(sch);
|
struct eadm_private *private = get_eadm_private(sch);
|
||||||
struct eadm_scsw *scsw = &sch->schib.scsw.eadm;
|
struct eadm_scsw *scsw = &sch->schib.scsw.eadm;
|
||||||
struct irb *irb = (struct irb *)&S390_lowcore.irb;
|
struct irb *irb = &__get_cpu_var(cio_irb);
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
EADM_LOG(6, "irq");
|
EADM_LOG(6, "irq");
|
||||||
|
Loading…
Reference in New Issue
Block a user