Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751201AbYGaMjq (ORCPT ); Thu, 31 Jul 2008 08:39:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751464AbYGaMjg (ORCPT ); Thu, 31 Jul 2008 08:39:36 -0400 Received: from mtagate5.de.ibm.com ([195.212.29.154]:48855 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbYGaMjf (ORCPT ); Thu, 31 Jul 2008 08:39:35 -0400 Message-Id: <20080731123932.093946726@de.ibm.com> References: <20080731123004.868574766@de.ibm.com> User-Agent: quilt/0.46-1 Date: Thu, 31 Jul 2008 14:30:05 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Heiko Carstens , Martin Schwidefsky Subject: [patch 1/6] Remove diag 0x260 call from memory detection. Content-Disposition: inline; filename=100-rm-diag260.diff Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1817 Lines: 65 From: Heiko Carstens The result of the diag 0x260 call is not always what one would expect. So just remove it. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/mem_detect.c | 23 ----------------------- 1 file changed, 23 deletions(-) Index: quilt-2.6/arch/s390/kernel/mem_detect.c =================================================================== --- quilt-2.6.orig/arch/s390/kernel/mem_detect.c +++ quilt-2.6/arch/s390/kernel/mem_detect.c @@ -9,27 +9,6 @@ #include #include -static int memory_fast_detect(struct mem_chunk *chunk) -{ - unsigned long val0 = 0; - unsigned long val1 = 0xc; - int rc = -EOPNOTSUPP; - - if (ipl_flags & IPL_NSS_VALID) - return -EOPNOTSUPP; - asm volatile( - " diag %1,%2,0x260\n" - "0: lhi %0,0\n" - "1:\n" - EX_TABLE(0b,1b) - : "+d" (rc), "+d" (val0), "+d" (val1) : : "cc"); - - if (rc || val0 != val1) - return -EOPNOTSUPP; - chunk->size = val0 + 1; - return 0; -} - static inline int tprot(unsigned long addr) { int rc = -EFAULT; @@ -84,8 +63,6 @@ void detect_memory_layout(struct mem_chu unsigned long flags, cr0; memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk)); - if (memory_fast_detect(&chunk[0]) == 0) - return; /* Disable IRQs, DAT and low address protection so tprot does the * right thing and we don't get scheduled away with low address * protection disabled. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/