1
0
Fork 0

[PATCH] ppc64 iSeries: more header file white space cleanups

This patch just contains white space and comment cleanups in the iSeries
headers files.  There are no semantic changes.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
hifive-unleashed-5.1
Stephen Rothwell 2005-06-21 17:15:34 -07:00 committed by Linus Torvalds
parent 45dc76aaf6
commit fcee389526
16 changed files with 395 additions and 437 deletions

View File

@ -161,7 +161,4 @@ struct IoHriMainStoreSegment5 {
u64 reserved3;
};
#endif // _IOHRIMAINSTORE_H
#endif /* _IOHRIMAINSTORE_H */

View File

@ -19,16 +19,12 @@
#ifndef _IOHRIPROCESSORVPD_H
#define _IOHRIPROCESSORVPD_H
//===================================================================
//
// This struct maps Processor Vpd that is DMAd to SLIC by CSP
//
#include <asm/types.h>
struct IoHriProcessorVpd
{
/*
* This struct maps Processor Vpd that is DMAd to SLIC by CSP
*/
struct IoHriProcessorVpd {
u8 xFormat; // VPD format indicator x00-x00
u8 xProcStatus:8; // Processor State x01-x01
u8 xSecondaryThreadCount; // Secondary thread cnt x02-x02

View File

@ -20,24 +20,16 @@
#define _ITEXTVPDPANEL_H
/*
*
* This struct maps the panel information
*
* Warning:
* This data must match the architecture for the panel information
*
*/
/*-------------------------------------------------------------------
* Standard Includes
*-------------------------------------------------------------------
*/
#include <asm/types.h>
struct ItExtVpdPanel
{
// Definition of the Extended Vpd On Panel Data Area
struct ItExtVpdPanel {
/* Definition of the Extended Vpd On Panel Data Area */
char systemSerial[8];
char mfgID[4];
char reserved1[24];

View File

@ -19,24 +19,17 @@
#ifndef _ITIPLPARMSREAL_H
#define _ITIPLPARMSREAL_H
//==============================================================================
//
// This struct maps the IPL Parameters DMA'd from the SP.
//
// Warning:
// This data must map in exactly 64 bytes and match the architecture for
// the IPL parms
//
//=============================================================================
/*
* This struct maps the IPL Parameters DMA'd from the SP.
*
* Warning:
* This data must map in exactly 64 bytes and match the architecture for
* the IPL parms
*/
//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/types.h>
struct ItIplParmsReal
{
struct ItIplParmsReal {
u8 xFormat; // Defines format of IplParms x00-x00
u8 xRsvd01:6; // Reserved x01-x01
u8 xAlternateSearch:1; // Alternate search indicator ...

View File

@ -19,18 +19,13 @@
#ifndef _ITLPNACA_H
#define _ITLPNACA_H
//=============================================================================
//
// This control block contains the data that is shared between the
// hypervisor (PLIC) and the OS.
//
//=============================================================================
/*
* This control block contains the data that is shared between the
* hypervisor (PLIC) and the OS.
*/
struct ItLpNaca
{
//=============================================================================
struct ItLpNaca {
// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
//=============================================================================
u32 xDesc; // Eye catcher x00-x03
u16 xSize; // Size of this class x04-x05
u16 xIntHdlrOffset; // Offset to IntHdlr array x06-x07
@ -64,25 +59,18 @@ struct ItLpNaca
u64 xSlicSegmentTablePtr; // Pointer to Slic seg table. x38-x3f
u8 xRsvd1_4[64]; // x40-x7F
//=============================================================================
// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
//=============================================================================
u8 xRsvd2_0[128]; // Reserved x00-x7F
//=============================================================================
// CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators
// NB: Padding required to keep xInterrruptHdlr at x300 which is required
// for v4r4 PLIC.
//=============================================================================
u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F
u8 xRsvd3_0[384]; // Reserved 180-2FF
//=============================================================================
// CACHE_LINE_7-8 0x0300 - 0x03FF Contains the address of the OS interrupt
// handlers
//=============================================================================
u64 xInterruptHdlr[32]; // Interrupt handlers 300-x3FF
};
//=============================================================================
#endif /* _ITLPNACA_H */

View File

@ -19,12 +19,11 @@
#ifndef _ITLPQUEUE_H
#define _ITLPQUEUE_H
//=============================================================================
//
// This control block defines the simple LP queue structure that is
// shared between the hypervisor (PLIC) and the OS in order to send
// events to an LP.
//
/*
* This control block defines the simple LP queue structure that is
* shared between the hypervisor (PLIC) and the OS in order to send
* events to an LP.
*/
#include <asm/types.h>
#include <asm/ptrace.h>
@ -42,24 +41,25 @@ struct HvLpEvent;
#define LpEventMaxSize 256
#define LpEventAlign 64
struct ItLpQueue
{
//
// The xSlicCurEventPtr is the pointer to the next event stack entry that will
// become valid. The OS must peek at this entry to determine if it is valid.
// PLIC will set the valid indicator as the very last store into that entry.
//
// When the OS has completed processing of the event then it will mark the event
// as invalid so that PLIC knows it can store into that event location again.
//
// If the event stack fills and there are overflow events, then PLIC will set
// the xPlicOverflowIntPending flag in which case the OS will have to fetch the
// additional LP events once they have drained the event stack.
//
// The first 16-bytes are known by both the OS and PLIC. The remainder of the
// cache line is for use by the OS.
//
//=============================================================================
struct ItLpQueue {
/*
* The xSlicCurEventPtr is the pointer to the next event stack entry
* that will become valid. The OS must peek at this entry to determine
* if it is valid. PLIC will set the valid indicator as the very last
* store into that entry.
*
* When the OS has completed processing of the event then it will mark
* the event as invalid so that PLIC knows it can store into that event
* location again.
*
* If the event stack fills and there are overflow events, then PLIC
* will set the xPlicOverflowIntPending flag in which case the OS will
* have to fetch the additional LP events once they have drained the
* event stack.
*
* The first 16-bytes are known by both the OS and PLIC. The remainder
* of the cache line is for use by the OS.
*/
u8 xPlicOverflowIntPending;// 0x00 Overflow events are pending
u8 xPlicStatus; // 0x01 DedicatedIo or DedicatedLp or NotUsed
u16 xSlicLogicalProcIndex; // 0x02 Logical Proc Index for correlation

View File

@ -19,15 +19,12 @@
#ifndef _ITLPREGSAVE_H
#define _ITLPREGSAVE_H
//=====================================================================================
//
// This control block contains the data that is shared between PLIC
// and the OS
//
//
/*
* This control block contains the data that is shared between PLIC
* and the OS
*/
struct ItLpRegSave
{
struct ItLpRegSave {
u32 xDesc; // Eye catcher "LpRS" ebcdic 000-003
u16 xSize; // Size of this class 004-005
u8 xInUse; // Area is live 006-007

View File

@ -17,13 +17,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _ITSPCOMMAREA_H
#define _ITSPCOMMAREA_H
struct SpCommArea
{
struct SpCommArea {
u32 xDesc; // Descriptor (only in new formats) 000-003
u8 xFormat; // Format (only in new formats) 004-004
u8 xRsvd1[11]; // Reserved 005-00F

View File

@ -19,15 +19,14 @@
#ifndef _ITVPDAREAS_H
#define _ITVPDAREAS_H
//=====================================================================================
//
// This file defines the address and length of all of the VPD area passed to
// the OS from PLIC (most of which start from the SP).
//
/*
* This file defines the address and length of all of the VPD area passed to
* the OS from PLIC (most of which start from the SP).
*/
#include <asm/types.h>
// VPD Entry index is carved in stone - cannot be changed (easily).
/* VPD Entry index is carved in stone - cannot be changed (easily). */
#define ItVpdCecVpd 0
#define ItVpdDynamicSpace 1
#define ItVpdExtVpd 2
@ -57,7 +56,6 @@
#define ItVpdMaxEntries 26
#define ItDmaMaxEntries 10
#define ItVpdAreasMaxSlotLabels 192
@ -69,8 +67,7 @@ struct SlicVpdAdrs {
};
struct ItVpdAreas
{
struct ItVpdAreas {
u32 xSlicDesc; // Descriptor 000-003
u16 xSlicSize; // Size of this control block 004-005
u16 xPlicAdjustVpdLens:1; // Flag to indicate new interface006-007

View File

@ -45,5 +45,4 @@ extern struct ItVpdAreas itVpdAreas;
extern u64 xMsVpd[];
extern struct msChunks msChunks;
#endif /* _LPARDATA_H */

View File

@ -21,7 +21,8 @@
#include <asm/types.h>
/* The iSeries hypervisor will set up mapping for one or more
/*
* The iSeries hypervisor will set up mapping for one or more
* ESID/VSID pairs (in SLB/segment registers) and will set up
* mappings of one or more ranges of pages to VAs.
* We will have the hypervisor set up the ESID->VSID mapping
@ -48,15 +49,14 @@
* entry to map the Esid to the Vsid.
*/
// Hypervisor initially maps 32MB of the load area
/* Hypervisor initially maps 32MB of the load area */
#define HvPagesToMap 8192
struct LparMap
{
struct LparMap {
u64 xNumberEsids; // Number of ESID/VSID pairs (1)
u64 xNumberRanges; // Number of VA ranges to map (1)
u64 xSegmentTableOffs; // Page number within load area of seg table (0)
u64 xRsvd[5]; // Reserved (0)
u64 xRsvd[5];
u64 xKernelEsid; // Esid used to map kernel load (0x0C00000000)
u64 xKernelVsid; // Vsid used to map kernel load (0x0C00000000)
u64 xPages; // Number of pages to be mapped (8192)

View File

@ -1,8 +1,6 @@
#ifndef __XMPCILPEVENT_H__
#define __XMPCILPEVENT_H__
#ifdef __cplusplus
extern "C" {
#endif
@ -10,7 +8,6 @@ extern "C" {
int XmPciLpEvent_init(void);
void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
#ifdef __cplusplus
}
#endif

View File

@ -5,32 +5,33 @@
#ifdef CONFIG_PPC_ISERIES
#include <linux/types.h>
/************************************************************************/
/* File iSeries_io.h created by Allan Trautman on Thu Dec 28 2000. */
/************************************************************************/
/* Remaps the io.h for the iSeries Io */
/* Copyright (C) 20yy Allan H Trautman, IBM Corporation */
/* */
/* 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. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program; if not, write to the: */
/* Free Software Foundation, Inc., */
/* 59 Temple Place, Suite 330, */
/* Boston, MA 02111-1307 USA */
/************************************************************************/
/* Change Activity: */
/* Created December 28, 2000 */
/* End Change Activity */
/************************************************************************/
/*
* File iSeries_io.h created by Allan Trautman on Thu Dec 28 2000.
*
* Remaps the io.h for the iSeries Io
* Copyright (C) 2000 Allan H Trautman, IBM Corporation
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the:
* Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* Change Activity:
* Created December 28, 2000
* End Change Activity
*/
extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress);
extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress);
extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress);
@ -39,8 +40,10 @@ extern void iSeries_Write_Word(u16 IoData, volatile void __iomem * IoAddress);
extern void iSeries_Write_Long(u32 IoData, volatile void __iomem * IoAddress);
extern void iSeries_memset_io(volatile void __iomem *dest, char x, size_t n);
extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source, size_t n);
extern void iSeries_memcpy_fromio(void *dest, const volatile void __iomem *source, size_t n);
extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source,
size_t n);
extern void iSeries_memcpy_fromio(void *dest,
const volatile void __iomem *source, size_t n);
#endif /* CONFIG_PPC_ISERIES */
#endif /* _ISERIES_IO_H */

View File

@ -1,34 +1,34 @@
#ifndef _ISERIES_64_PCI_H
#define _ISERIES_64_PCI_H
/************************************************************************/
/* File iSeries_pci.h created by Allan Trautman on Tue Feb 20, 2001. */
/************************************************************************/
/* Define some useful macros for the iSeries pci routines. */
/* Copyright (C) 2001 Allan H Trautman, IBM Corporation */
/* */
/* 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. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program; if not, write to the: */
/* Free Software Foundation, Inc., */
/* 59 Temple Place, Suite 330, */
/* Boston, MA 02111-1307 USA */
/************************************************************************/
/* Change Activity: */
/* Created Feb 20, 2001 */
/* Added device reset, March 22, 2001 */
/* Ported to ppc64, May 25, 2001 */
/* End Change Activity */
/************************************************************************/
/*
* File iSeries_pci.h created by Allan Trautman on Tue Feb 20, 2001.
*
* Define some useful macros for the iSeries pci routines.
* Copyright (C) 2001 Allan H Trautman, IBM Corporation
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the:
* Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* Change Activity:
* Created Feb 20, 2001
* Added device reset, March 22, 2001
* Ported to ppc64, May 25, 2001
* End Change Activity
*/
#include <asm/iSeries/HvCallPci.h>
#include <asm/abs_addr.h>
@ -36,9 +36,9 @@
struct pci_dev; /* For Forward Reference */
struct iSeries_Device_Node;
/************************************************************************/
/* Gets iSeries Bus, SubBus, DevFn using iSeries_Device_Node structure */
/************************************************************************/
/*
* Gets iSeries Bus, SubBus, DevFn using iSeries_Device_Node structure
*/
#define ISERIES_BUS(DevPtr) DevPtr->DsaAddr.Dsa.busNumber
#define ISERIES_SUBBUS(DevPtr) DevPtr->DsaAddr.Dsa.subBusNumber
@ -49,13 +49,15 @@ struct iSeries_Device_Node;
#define EADsMaxAgents 7
/************************************************************************/
/* Decodes Linux DevFn to iSeries DevFn, bridge device, or function. */
/* For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h */
/************************************************************************/
/*
* Decodes Linux DevFn to iSeries DevFn, bridge device, or function.
* For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h
*/
#define ISERIES_PCI_AGENTID(idsel,func) ((idsel & 0x0F) << 4) | (func & 0x07)
#define ISERIES_ENCODE_DEVICE(agentid) ((0x10) | ((agentid&0x20)>>2) | (agentid&07))
#define ISERIES_PCI_AGENTID(idsel, func) \
((idsel & 0x0F) << 4) | (func & 0x07)
#define ISERIES_ENCODE_DEVICE(agentid) \
((0x10) | ((agentid & 0x20) >> 2) | (agentid & 0x07))
#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7)
#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
@ -64,23 +66,25 @@ struct iSeries_Device_Node;
* N.B. the ISERIES_DECODE_* macros are not used anywhere, and I think
* the 0x71 (at least) must be wrong - 0x78 maybe? -- paulus.
*/
#define ISERIES_DECODE_DEVFN(linuxdevfn) (((linuxdevfn & 0x71) << 1) | (linuxdevfn & 0x07))
#define ISERIES_DECODE_DEVICE(linuxdevfn) (((linuxdevfn & 0x38) >> 3) |(((linuxdevfn & 0x40) >> 2) + 0x10))
#define ISERIES_DECODE_FUNCTION(linuxdevfn) (linuxdevfn & 0x07)
#define ISERIES_DECODE_DEVFN(linuxdevfn) \
(((linuxdevfn & 0x71) << 1) | (linuxdevfn & 0x07))
#define ISERIES_DECODE_DEVICE(linuxdevfn) \
(((linuxdevfn & 0x38) >> 3) | (((linuxdevfn & 0x40) >> 2) + 0x10))
#define ISERIES_DECODE_FUNCTION(linuxdevfn) \
(linuxdevfn & 0x07)
/************************************************************************/
/* Converts Virtual Address to Real Address for Hypervisor calls */
/************************************************************************/
#define ISERIES_HV_ADDR(virtaddr) (0x8000000000000000 | virt_to_abs(virtaddr))
/************************************************************************/
/* iSeries Device Information */
/************************************************************************/
/*
* Converts Virtual Address to Real Address for Hypervisor calls
*/
#define ISERIES_HV_ADDR(virtaddr) \
(0x8000000000000000 | virt_to_abs(virtaddr))
/*
* iSeries Device Information
*/
struct iSeries_Device_Node {
struct list_head Device_List;
struct pci_dev* PciDev; /* Pointer to pci_dev structure*/
struct pci_dev *PciDev;
union HvDsaMap DsaAddr; /* Direct Select Address */
/* busNumber, subBusNumber, */
/* deviceId, barNumber */
@ -101,12 +105,9 @@ struct iSeries_Device_Node {
char Location[20]; /* Frame 1, Card C10 */
};
/************************************************************************/
/* Functions */
/************************************************************************/
extern int iSeries_Device_Information(struct pci_dev*, char*, int);
extern void iSeries_Get_Location_Code(struct iSeries_Device_Node*);
extern int iSeries_Device_ToggleReset(struct pci_dev* PciDev, int AssertTime, int DelayTime);
extern int iSeries_Device_ToggleReset(struct pci_dev* PciDev,
int AssertTime, int DelayTime);
#endif /* _ISERIES_64_PCI_H */

View File

@ -9,7 +9,6 @@
* all partitions in the iSeries. It also provides miscellaneous low-level
* machine facility type operations.
*
*
* 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

View File

@ -44,14 +44,16 @@
#include <asm/iSeries/HvTypes.h>
#include <asm/iSeries/HvLpEvent.h>
/* iSeries virtual I/O events use the subtype field in
/*
* iSeries virtual I/O events use the subtype field in
* HvLpEvent to figure out what kind of vio event is coming
* in. We use a table to route these, and this defines
* the maximum number of distinct subtypes
*/
#define VIO_MAX_SUBTYPES 8
/* Each subtype can register a handler to process their events.
/*
* Each subtype can register a handler to process their events.
* The handler must have this interface.
*/
typedef void (vio_event_handler_t) (struct HvLpEvent * event);
@ -89,8 +91,8 @@ struct vio_error_entry {
int errno;
const char *msg;
};
const struct vio_error_entry *vio_lookup_rc(const struct vio_error_entry
*local_table, u16 rc);
extern const struct vio_error_entry *vio_lookup_rc(
const struct vio_error_entry *local_table, u16 rc);
enum viosubtypes {
viomajorsubtype_monitor = 0x0100,
@ -102,7 +104,6 @@ enum viosubtypes {
viomajorsubtype_scsi = 0x0700
};
enum vioconfigsubtype {
vioconfigget = 0x0001,
};