[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201112091445.56224.arnd@arndb.de>
Date: Fri, 9 Dec 2011 14:45:56 +0000
From: Arnd Bergmann <arnd@...db.de>
To: Sjur Brændeland <sjur.brandeland@...ricsson.com>
Cc: linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Paul Bolle <pebolle@...cali.nl>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCHv2 01/10] xshm: Shared Memory layout for ST-E M7400 driver.
On Friday 09 December 2011, Sjur Brændeland wrote:
> Add structures defining the channel configuration and the
> shared memory layout used for ST-Ericsson M7400.
>
> These data structures are shared between the Linux host and the
> M7400 modem.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@...ricsson.com>
> ---
> include/linux/xshm/xshm_ipctoc.h | 160 ++++++++++++++++++++++++++++++++++++++
> 1 files changed, 160 insertions(+), 0 deletions(-)
> create mode 100644 include/linux/xshm/xshm_ipctoc.h
Generally, the include/linux path is for interfaces between modules, while
hardware data structures should be in the same directory as the driver using
them to provide an abstract interface.
> diff --git a/include/linux/xshm/xshm_ipctoc.h b/include/linux/xshm/xshm_ipctoc.h
> new file mode 100644
> index 0000000..b008c23
> --- /dev/null
> +++ b/include/linux/xshm/xshm_ipctoc.h
> @@ -0,0 +1,160 @@
> +/*
> + * Copyright (C) ST-Ericsson AB 2011
> + * Author: Sjur Brendeland / sjur.brandeland@...ricsson.com
> + * License terms: GNU General Public License (GPL) version 2
> + */
> +
> +#ifndef XSHM_TOC
> +#define XSHM_TOC
> +
> +/**
> + * DOC: XSHM Shared Memory Layout
> + *
> + * XSHM defines a set of structures describing the memory layout used
> + * for the Shared Memory IPC. In short &toc_entry points out &ipc_toc,
> + * which points out the &xshm_ipctoc_channel. &xshm_ipctoc_channel defines
> + * the channels used to communicate between host and external device (modem).
> + *
> + * &xshm_ipctoc_channel can be used in packet-mode or stream-mode,
> + * and points out &xshm_bufidx holding information about cirular
> + * buffers, andtheir read/write indices etc.
> + */
> +
> +#pragma pack(1)
Better remove the #pragma. Marking data structures as packed when they
are already packed to start with only leads to worse optimizations in the
compiler, but does not have a functional impact.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists