From owner-svn-soc-all@FreeBSD.ORG Mon Jun 16 22:42:46 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66ABE274 for ; Mon, 16 Jun 2014 22:42:46 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5360426AC for ; Mon, 16 Jun 2014 22:42:46 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5GMgkPu027149 for ; Mon, 16 Jun 2014 22:42:46 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s5GMgjKL027129 for svn-soc-all@FreeBSD.org; Mon, 16 Jun 2014 22:42:45 GMT (envelope-from op@FreeBSD.org) Date: Mon, 16 Jun 2014 22:42:45 GMT Message-Id: <201406162242.s5GMgjKL027129@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r269655 - in soc2014/op/freebsd-base/sys/i386: i386 include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 22:42:46 -0000 Author: op Date: Mon Jun 16 22:42:45 2014 New Revision: 269655 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269655 Log: SMAP i386: added IS_BSP() macro to i386/include/pcpu.h git: https://github.com/opntr/opBSD/commits/op/gsoc2014/smap Signed-off-by: Oliver Pinter Modified: soc2014/op/freebsd-base/sys/i386/i386/initcpu.c soc2014/op/freebsd-base/sys/i386/include/pcpu.h Modified: soc2014/op/freebsd-base/sys/i386/i386/initcpu.c ============================================================================== --- soc2014/op/freebsd-base/sys/i386/i386/initcpu.c Mon Jun 16 22:41:00 2014 (r269654) +++ soc2014/op/freebsd-base/sys/i386/i386/initcpu.c Mon Jun 16 22:42:45 2014 (r269655) @@ -34,6 +34,7 @@ #include #include +#include #include #include Modified: soc2014/op/freebsd-base/sys/i386/include/pcpu.h ============================================================================== --- soc2014/op/freebsd-base/sys/i386/include/pcpu.h Mon Jun 16 22:41:00 2014 (r269654) +++ soc2014/op/freebsd-base/sys/i386/include/pcpu.h Mon Jun 16 22:42:45 2014 (r269655) @@ -250,6 +250,8 @@ } #define curpcb (__curpcb()) +#define IS_BSP() (PCPU_GET(cpuid) == 0) + #else /* !lint || defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) */ #error "this file needs to be ported to your compiler"