From patchwork Wed May 31 11:06:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 769070 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wd74x4NP7z9s7h for ; Wed, 31 May 2017 21:08:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="A3Ht59QF"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wd74x3FvbzDqLZ for ; Wed, 31 May 2017 21:08:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="A3Ht59QF"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wd72d3r2PzDqJ6 for ; Wed, 31 May 2017 21:06:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="A3Ht59QF"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3wd72d0YYtz9s7h; Wed, 31 May 2017 21:06:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1496228793; bh=KN4FWLDkAoMGJRQCnutqmiuOL9lJ9/q00Xa0G+QOuh8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A3Ht59QF+LvYvUF38yWuLl7Xeoj4KmVY+fIaObWGNXeBor5xWLclukv6XopwwcxED /eegUn0I8chOj6Wmr62yIy5lE5euaZtfxa76Zs5+1og5hHNRpumeqsc+3SgPbcgX7x 6giB8ccTvFG60O4IRG9OKvxT161l4Vt2AQ9xhg6XioWixnRvWccPRdXLBNgI+fe0uV IjST9MEsxYFEj/qTatpGJokBFCCxfT5Y7w9Ot63CHU+A09FYNFC/65x8PkP6t7WBMz SH5gXKfGhcZ7+oy0xe61eOnJY/IzFnxvyhgfBlE8KADXW4Pipw1udiroBgSDDoK34J 6sP0ge/1uxqeg== Date: Wed, 31 May 2017 21:06:32 +1000 From: Stephen Rothwell To: Michael Ellerman Subject: Re: [PATCH net-next] powerpc: use asm-generic/socket.h as much as possible Message-ID: <20170531210632.251822b4@canb.auug.org.au> In-Reply-To: <878tld49ic.fsf@concordia.ellerman.id.au> References: <20170531154337.04ebcb75@canb.auug.org.au> <878tld49ic.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Networking , PowerPC , David Miller , Arnd Bergmann Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi Michael, On Wed, 31 May 2017 20:15:55 +1000 Michael Ellerman wrote: > > Stephen Rothwell writes: > > > asm-generic/socket.h already has an exception for the differences that > > powerpc needs, so just include it after defining the differences. > > > > Signed-off-by: Stephen Rothwell > > --- > > arch/powerpc/include/uapi/asm/socket.h | 92 +--------------------------------- > > 1 file changed, 1 insertion(+), 91 deletions(-) > > > > Build tested using powerpc allyesconfig, pseries_le_defconfig, 32 bit > > and 64 bit allnoconfig and ppc44x_defconfig builds. > > Did you boot it and test that userspace was happy doing sockety things? No, sorry. The patch was done by inspection, but it is pretty obvious ... here is the diff between arch/powerpc/include/uapi/asm/socket.h and include/uapi/asm-generic/socket.h before the patch: --- arch/powerpc/include/uapi/asm/socket.h 2017-05-31 20:56:54.940473709 +1000 +++ include/uapi/asm-generic/socket.h 2017-05-31 10:04:16.716445463 +1000 @@ -1,12 +1,5 @@ -#ifndef _ASM_POWERPC_SOCKET_H -#define _ASM_POWERPC_SOCKET_H - -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ +#ifndef __ASM_GENERIC_SOCKET_H +#define __ASM_GENERIC_SOCKET_H #include @@ -30,12 +23,14 @@ #define SO_LINGER 13 #define SO_BSDCOMPAT 14 #define SO_REUSEPORT 15 -#define SO_RCVLOWAT 16 -#define SO_SNDLOWAT 17 -#define SO_RCVTIMEO 18 -#define SO_SNDTIMEO 19 -#define SO_PASSCRED 20 -#define SO_PEERCRED 21 +#ifndef SO_PASSCRED /* powerpc only differs in these */ +#define SO_PASSCRED 16 +#define SO_PEERCRED 17 +#define SO_RCVLOWAT 18 +#define SO_SNDLOWAT 19 +#define SO_RCVTIMEO 20 +#define SO_SNDTIMEO 21 +#endif /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 22 @@ -71,7 +66,7 @@ #define SO_RXQ_OVFL 40 #define SO_WIFI_STATUS 41 -#define SCM_WIFI_STATUS SO_WIFI_STATUS +#define SCM_WIFI_STATUS SO_WIFI_STATUS #define SO_PEEK_OFF 42 /* Instruct lower device to use last 4-bytes of skb data as FCS */ @@ -107,4 +102,4 @@ #define SCM_TIMESTAMPING_PKTINFO 58 -#endif /* _ASM_POWERPC_SOCKET_H */ +#endif /* __ASM_GENERIC_SOCKET_H */