Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky: "One patch to increase the number of possible CPUs to 256, with the latest machine a single LPAR can have up to 101 CPUs. Plus a number of bug fixes, the clock_gettime patch fixes a regression added in the 3.13 merge window" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/time,vdso: fix clock_gettime for CLOCK_MONOTONIC s390/vdso: ectg gettime support for CLOCK_THREAD_CPUTIME_ID s390/vdso: fix access-list entry initialization s390: increase CONFIG_NR_CPUS limit s390/smp,sclp: fix size of sclp_cpu_info structure s390/sclp: replace uninitialized early_event_mask_sccb variable with sccb_early s390/dasd: fix memory leak caused by dangling references to request_queue
This commit is contained in:
commit
22056614ee
@ -347,14 +347,14 @@ config SMP
|
|||||||
Even if you don't know what to do here, say Y.
|
Even if you don't know what to do here, say Y.
|
||||||
|
|
||||||
config NR_CPUS
|
config NR_CPUS
|
||||||
int "Maximum number of CPUs (2-64)"
|
int "Maximum number of CPUs (2-256)"
|
||||||
range 2 64
|
range 2 256
|
||||||
depends on SMP
|
depends on SMP
|
||||||
default "32" if !64BIT
|
default "32" if !64BIT
|
||||||
default "64" if 64BIT
|
default "64" if 64BIT
|
||||||
help
|
help
|
||||||
This allows you to specify the maximum number of CPUs which this
|
This allows you to specify the maximum number of CPUs which this
|
||||||
kernel will support. The maximum supported value is 64 and the
|
kernel will support. The maximum supported value is 256 and the
|
||||||
minimum value which makes sense is 2.
|
minimum value which makes sense is 2.
|
||||||
|
|
||||||
This is purely to save memory - each supported CPU adds
|
This is purely to save memory - each supported CPU adds
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <asm/chpid.h>
|
#include <asm/chpid.h>
|
||||||
|
#include <asm/cpu.h>
|
||||||
|
|
||||||
#define SCLP_CHP_INFO_MASK_SIZE 32
|
#define SCLP_CHP_INFO_MASK_SIZE 32
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ struct sclp_cpu_info {
|
|||||||
unsigned int standby;
|
unsigned int standby;
|
||||||
unsigned int combined;
|
unsigned int combined;
|
||||||
int has_cpu_type;
|
int has_cpu_type;
|
||||||
struct sclp_cpu_entry cpu[255];
|
struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
int sclp_get_cpu_info(struct sclp_cpu_info *info);
|
int sclp_get_cpu_info(struct sclp_cpu_info *info);
|
||||||
|
@ -72,6 +72,7 @@ int main(void)
|
|||||||
/* constants used by the vdso */
|
/* constants used by the vdso */
|
||||||
DEFINE(__CLOCK_REALTIME, CLOCK_REALTIME);
|
DEFINE(__CLOCK_REALTIME, CLOCK_REALTIME);
|
||||||
DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC);
|
DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC);
|
||||||
|
DEFINE(__CLOCK_THREAD_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID);
|
||||||
DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
|
DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
|
||||||
BLANK();
|
BLANK();
|
||||||
/* idle data offsets */
|
/* idle data offsets */
|
||||||
|
@ -125,7 +125,7 @@ int vdso_alloc_per_cpu(struct _lowcore *lowcore)
|
|||||||
psal[i] = 0x80000000;
|
psal[i] = 0x80000000;
|
||||||
|
|
||||||
lowcore->paste[4] = (u32)(addr_t) psal;
|
lowcore->paste[4] = (u32)(addr_t) psal;
|
||||||
psal[0] = 0x20000000;
|
psal[0] = 0x02000000;
|
||||||
psal[2] = (u32)(addr_t) aste;
|
psal[2] = (u32)(addr_t) aste;
|
||||||
*(unsigned long *) (aste + 2) = segment_table +
|
*(unsigned long *) (aste + 2) = segment_table +
|
||||||
_ASCE_TABLE_LENGTH + _ASCE_USER_BITS + _ASCE_TYPE_SEGMENT;
|
_ASCE_TABLE_LENGTH + _ASCE_USER_BITS + _ASCE_TYPE_SEGMENT;
|
||||||
|
@ -46,18 +46,13 @@ __kernel_clock_gettime:
|
|||||||
jnm 3f
|
jnm 3f
|
||||||
a %r0,__VDSO_TK_MULT(%r5)
|
a %r0,__VDSO_TK_MULT(%r5)
|
||||||
3: alr %r0,%r2
|
3: alr %r0,%r2
|
||||||
al %r0,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */
|
al %r0,__VDSO_WTOM_NSEC(%r5)
|
||||||
al %r1,__VDSO_XTIME_NSEC+4(%r5)
|
|
||||||
brc 12,4f
|
|
||||||
ahi %r0,1
|
|
||||||
4: al %r0,__VDSO_WTOM_NSEC(%r5) /* + wall_to_monotonic.nsec */
|
|
||||||
al %r1,__VDSO_WTOM_NSEC+4(%r5)
|
al %r1,__VDSO_WTOM_NSEC+4(%r5)
|
||||||
brc 12,5f
|
brc 12,5f
|
||||||
ahi %r0,1
|
ahi %r0,1
|
||||||
5: l %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */
|
5: l %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */
|
||||||
srdl %r0,0(%r2) /* >> tk->shift */
|
srdl %r0,0(%r2) /* >> tk->shift */
|
||||||
l %r2,__VDSO_XTIME_SEC+4(%r5)
|
l %r2,__VDSO_WTOM_SEC+4(%r5)
|
||||||
al %r2,__VDSO_WTOM_SEC+4(%r5)
|
|
||||||
cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */
|
cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */
|
||||||
jne 1b
|
jne 1b
|
||||||
basr %r5,0
|
basr %r5,0
|
||||||
|
@ -23,7 +23,9 @@ __kernel_clock_getres:
|
|||||||
je 0f
|
je 0f
|
||||||
cghi %r2,__CLOCK_MONOTONIC
|
cghi %r2,__CLOCK_MONOTONIC
|
||||||
je 0f
|
je 0f
|
||||||
cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */
|
cghi %r2,__CLOCK_THREAD_CPUTIME_ID
|
||||||
|
je 0f
|
||||||
|
cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */
|
||||||
jne 2f
|
jne 2f
|
||||||
larl %r5,_vdso_data
|
larl %r5,_vdso_data
|
||||||
icm %r0,15,__LC_ECTG_OK(%r5)
|
icm %r0,15,__LC_ECTG_OK(%r5)
|
||||||
|
@ -22,7 +22,9 @@ __kernel_clock_gettime:
|
|||||||
larl %r5,_vdso_data
|
larl %r5,_vdso_data
|
||||||
cghi %r2,__CLOCK_REALTIME
|
cghi %r2,__CLOCK_REALTIME
|
||||||
je 4f
|
je 4f
|
||||||
cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */
|
cghi %r2,__CLOCK_THREAD_CPUTIME_ID
|
||||||
|
je 9f
|
||||||
|
cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */
|
||||||
je 9f
|
je 9f
|
||||||
cghi %r2,__CLOCK_MONOTONIC
|
cghi %r2,__CLOCK_MONOTONIC
|
||||||
jne 12f
|
jne 12f
|
||||||
@ -35,13 +37,11 @@ __kernel_clock_gettime:
|
|||||||
jnz 0b
|
jnz 0b
|
||||||
stck 48(%r15) /* Store TOD clock */
|
stck 48(%r15) /* Store TOD clock */
|
||||||
lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */
|
lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */
|
||||||
lg %r0,__VDSO_XTIME_SEC(%r5) /* tk->xtime_sec */
|
lg %r0,__VDSO_WTOM_SEC(%r5)
|
||||||
alg %r0,__VDSO_WTOM_SEC(%r5) /* + wall_to_monotonic.sec */
|
|
||||||
lg %r1,48(%r15)
|
lg %r1,48(%r15)
|
||||||
sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */
|
sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */
|
||||||
msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */
|
msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */
|
||||||
alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */
|
alg %r1,__VDSO_WTOM_NSEC(%r5)
|
||||||
alg %r1,__VDSO_WTOM_NSEC(%r5) /* + wall_to_monotonic.nsec */
|
|
||||||
srlg %r1,%r1,0(%r2) /* >> tk->shift */
|
srlg %r1,%r1,0(%r2) /* >> tk->shift */
|
||||||
clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */
|
clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */
|
||||||
jne 0b
|
jne 0b
|
||||||
|
@ -87,7 +87,6 @@ void dasd_gendisk_free(struct dasd_block *block)
|
|||||||
{
|
{
|
||||||
if (block->gdp) {
|
if (block->gdp) {
|
||||||
del_gendisk(block->gdp);
|
del_gendisk(block->gdp);
|
||||||
block->gdp->queue = NULL;
|
|
||||||
block->gdp->private_data = NULL;
|
block->gdp->private_data = NULL;
|
||||||
put_disk(block->gdp);
|
put_disk(block->gdp);
|
||||||
block->gdp = NULL;
|
block->gdp = NULL;
|
||||||
|
@ -35,7 +35,6 @@ struct read_info_sccb {
|
|||||||
u8 _reserved5[4096 - 112]; /* 112-4095 */
|
u8 _reserved5[4096 - 112]; /* 112-4095 */
|
||||||
} __packed __aligned(PAGE_SIZE);
|
} __packed __aligned(PAGE_SIZE);
|
||||||
|
|
||||||
static __initdata struct init_sccb early_event_mask_sccb __aligned(PAGE_SIZE);
|
|
||||||
static __initdata struct read_info_sccb early_read_info_sccb;
|
static __initdata struct read_info_sccb early_read_info_sccb;
|
||||||
static __initdata char sccb_early[PAGE_SIZE] __aligned(PAGE_SIZE);
|
static __initdata char sccb_early[PAGE_SIZE] __aligned(PAGE_SIZE);
|
||||||
static unsigned long sclp_hsa_size;
|
static unsigned long sclp_hsa_size;
|
||||||
@ -113,7 +112,7 @@ static void __init sclp_facilities_detect(void)
|
|||||||
|
|
||||||
bool __init sclp_has_linemode(void)
|
bool __init sclp_has_linemode(void)
|
||||||
{
|
{
|
||||||
struct init_sccb *sccb = &early_event_mask_sccb;
|
struct init_sccb *sccb = (void *) &sccb_early;
|
||||||
|
|
||||||
if (sccb->header.response_code != 0x20)
|
if (sccb->header.response_code != 0x20)
|
||||||
return 0;
|
return 0;
|
||||||
@ -126,7 +125,7 @@ bool __init sclp_has_linemode(void)
|
|||||||
|
|
||||||
bool __init sclp_has_vt220(void)
|
bool __init sclp_has_vt220(void)
|
||||||
{
|
{
|
||||||
struct init_sccb *sccb = &early_event_mask_sccb;
|
struct init_sccb *sccb = (void *) &sccb_early;
|
||||||
|
|
||||||
if (sccb->header.response_code != 0x20)
|
if (sccb->header.response_code != 0x20)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user