Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58599
b: refs/heads/master
c: 83119ad
h: refs/heads/master
i:
  58597: 309490b
  58595: 37e7d9d
  58591: 0e5f7a5
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jul 10, 2007
1 parent c10cceb commit fc5ee4c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05dd25307ca67cbfa0207bbba2e6c79fa97d125b
refs/heads/master: 83119ad4a1ceacd99f380086c2855ae2c4268afc
1 change: 1 addition & 0 deletions trunk/arch/s390/kernel/early.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ void __init startup_init(void)
sort_main_extable();
setup_lowcore_early();
sclp_readinfo_early();
sclp_facilities_detect();
memsize = sclp_memory_detect();
#ifndef CONFIG_64BIT
/*
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/s390/char/sclp.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ struct sccb_header {
u16 response_code;
} __attribute__((packed));

extern u64 sclp_facilities;

#define SCLP_HAS_CHP_INFO (sclp_facilities & 0x8000000000000000ULL)
#define SCLP_HAS_CHP_RECONFIG (sclp_facilities & 0x2000000000000000ULL)

struct gds_subvector {
u8 length;
u8 key;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/s390/char/sclp_chp.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ static int do_configure(sclp_cmdw_t cmd)
struct chp_cfg_data *data;
int rc;

if (!SCLP_HAS_CHP_RECONFIG)
return -EOPNOTSUPP;
/* Prepare sccb. */
data = (struct chp_cfg_data *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
if (!data)
Expand Down Expand Up @@ -152,6 +154,8 @@ int sclp_chp_read_info(struct sclp_chp_info *info)
struct chp_info_data *data;
int rc;

if (!SCLP_HAS_CHP_INFO)
return -EOPNOTSUPP;
/* Prepare sccb. */
data = (struct chp_info_data *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
if (!data)
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/s390/char/sclp_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ struct sclp_readinfo_sccb {
static struct sclp_readinfo_sccb __initdata early_readinfo_sccb;
static int __initdata early_readinfo_sccb_valid;

u64 sclp_facilities;

void __init sclp_readinfo_early(void)
{
int ret;
Expand Down Expand Up @@ -70,6 +72,13 @@ void __init sclp_readinfo_early(void)
__ctl_clear_bit(0, 9);
}

void __init sclp_facilities_detect(void)
{
if (!early_readinfo_sccb_valid)
return;
sclp_facilities = early_readinfo_sccb.facilities;
}

unsigned long long __init sclp_memory_detect(void)
{
unsigned long long memsize;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-s390/sclp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct sclp_ipl_info {
};

void sclp_readinfo_early(void);
void sclp_facilities_detect(void);
unsigned long long sclp_memory_detect(void);
int sclp_sdias_blk_count(void);
int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
Expand Down

0 comments on commit fc5ee4c

Please sign in to comment.