sparc: copy exported sparc64 specific header files to asm-sparc
PATCH 1/21 sparc: copy exported sparc64 specific header files to asm-sparc
To get rid of ALTARCH in Kbuild copy remaining exported header files that are sparc64 specific to asm-sparc.
Copy was done using the following simple script:
set -e
SPARC64="apb.h bbc.h display7seg.h envctrl.h psrcompat.h pstate.h uctx.h utrap.h watchdog.h" for FILE in ${SPARC64}; do
if [ -f asm-sparc/$FILE ]; then
echo $FILE exist in asm-sparc
fi
cat asm-sparc64/$FILE > asm-sparc/$FILE
printf "#include <asm-sparc/$FILE>\n" > asm-sparc64/$FILE
done
--- include/asm-sparc/apb.h | 36 ++++++ include/asm-sparc/bbc.h | 225 ++++++++++++++++++++++++++++++++++++ include/asm-sparc/display7seg.h | 79 +++++++++++++ include/asm-sparc/envctrl.h | 103 +++++++++++++++++ include/asm-sparc/psrcompat.h | 45 ++++++++ include/asm-sparc/pstate.h | 91 +++++++++++++++ include/asm-sparc/uctx.h | 71 ++++++++++++ include/asm-sparc/utrap.h | 51 +++++++++ include/asm-sparc/watchdog.h | 31 +++++ include/asm-sparc64/apb.h | 37 +------ include/asm-sparc64/bbc.h | 226 +------------------------------------ include/asm-sparc64/display7seg.h | 80 +------------- include/asm-sparc64/envctrl.h | 104 +----------------- include/asm-sparc64/psrcompat.h | 46 +-------- include/asm-sparc64/pstate.h | 92 +--------------- include/asm-sparc64/uctx.h | 72 +------------ include/asm-sparc64/utrap.h | 52 +--------- include/asm-sparc64/watchdog.h | 32 +----- 18 files changed, 741 insertions(+), 732 deletions(-) create mode 100644 include/asm-sparc/apb.h create mode 100644 include/asm-sparc/bbc.h create mode 100644 include/asm-sparc/display7seg.h create mode 100644 include/asm-sparc/envctrl.h create mode 100644 include/asm-sparc/psrcompat.h create mode 100644 include/asm-sparc/pstate.h create mode 100644 include/asm-sparc/uctx.h create mode 100644 include/asm-sparc/utrap.h create mode 100644 include/asm-sparc/watchdog.h
include/asm-sparc/apb.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* apb.h: Advanced PCI Bridge Configuration Registers and Bits +* +* Copyright (C) 1998 Eddie C. Dost ([email protected]) +*/ + +#ifndef _SPARC64_APB_H +#define _SPARC64_APB_H + +#define APB_TICK_REGISTER 0xb0 +#define APB_INT_ACK 0xb8 +#define APB_PRIMARY_MASTER_RETRY_LIMIT 0xc0 +#define APB_DMA_ASFR 0xc8 +#define APB_DMA_AFAR 0xd0 +#define APB_PIO_TARGET_RETRY_LIMIT 0xd8 +#define APB_PIO_TARGET_LATENCY_TIMER 0xd9 +#define APB_DMA_TARGET_RETRY_LIMIT 0xda +#define APB_DMA_TARGET_LATENCY_TIMER 0xdb +#define APB_SECONDARY_MASTER_RETRY_LIMIT 0xdc +#define APB_SECONDARY_CONTROL 0xdd +#define APB_IO_ADDRESS_MAP 0xde +#define APB_MEM_ADDRESS_MAP 0xdf + +#define APB_PCI_CONTROL_LOW 0xe0 +# define APB_PCI_CTL_LOW_ARB_PARK (1 << 21) +# define APB_PCI_CTL_LOW_ERRINT_EN (1 << 8) + +#define APB_PCI_CONTROL_HIGH 0xe4 +# define APB_PCI_CTL_HIGH_SERR (1 << 2) +# define APB_PCI_CTL_HIGH_ARBITER_EN (1 << 0) + +#define APB_PIO_ASFR 0xe8 +#define APB_PIO_AFAR 0xf0 +#define APB_DIAG_REGISTER 0xf8 + +#endif /* !(_SPARC64_APB_H) */
include/asm-sparc/bbc.h new file +225 -0
225 lines not on this page · raw message
include/asm-sparc/display7seg.h new file +79 -0
79 lines not on this page · raw message
include/asm-sparc/envctrl.h new file +103 -0
103 lines not on this page · raw message
include/asm-sparc/psrcompat.h new file +45 -0
45 lines not on this page · raw message
include/asm-sparc/pstate.h new file +91 -0
91 lines not on this page · raw message
include/asm-sparc/uctx.h new file +71 -0
71 lines not on this page · raw message
include/asm-sparc/utrap.h new file +51 -0
51 lines not on this page · raw message
include/asm-sparc/watchdog.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* +* watchdog - Driver interface for the hardware watchdog timers +* present on Sun Microsystems boardsets +* +* Copyright (c) 2000 Eric Brower <[email protected]> +* +*/ + +#ifndef _SPARC64_WATCHDOG_H +#define _SPARC64_WATCHDOG_H + +#include <linux/watchdog.h> + +/* Solaris compatibility ioctls-- +* Ref. <linux/watchdog.h> for standard linux watchdog ioctls +*/ +#define WIOCSTART _IO (WATCHDOG_IOCTL_BASE, 10)/* Start Timer */ +#define WIOCSTOP _IO (WATCHDOG_IOCTL_BASE, 11)/* Stop Timer */ +#define WIOCGSTAT _IOR(WATCHDOG_IOCTL_BASE, 12, int)/* Get Timer Status */ + +/* Status flags from WIOCGSTAT ioctl +*/ +#define WD_FREERUN 0x01/* timer is running, interrupts disabled */ +#define WD_EXPIRED 0x02/* timer has expired */ +#define WD_RUNNING 0x04/* timer is running, interrupts enabled */ +#define WD_STOPPED 0x08/* timer has not been started */ +#define WD_SERVICED 0x10/* timer interrupt was serviced */ + +#endif /* ifndef _SPARC64_WATCHDOG_H */ +
include/asm-sparc64/apb.h +1 -36
@@ -1,36 +1 @@ -/* -* apb.h: Advanced PCI Bridge Configuration Registers and Bits -* -* Copyright (C) 1998 Eddie C. Dost ([email protected]) -*/ - -#ifndef _SPARC64_APB_H -#define _SPARC64_APB_H - -#define APB_TICK_REGISTER 0xb0 -#define APB_INT_ACK 0xb8 -#define APB_PRIMARY_MASTER_RETRY_LIMIT 0xc0 -#define APB_DMA_ASFR 0xc8 -#define APB_DMA_AFAR 0xd0 -#define APB_PIO_TARGET_RETRY_LIMIT 0xd8 -#define APB_PIO_TARGET_LATENCY_TIMER 0xd9 -#define APB_DMA_TARGET_RETRY_LIMIT 0xda -#define APB_DMA_TARGET_LATENCY_TIMER 0xdb -#define APB_SECONDARY_MASTER_RETRY_LIMIT 0xdc -#define APB_SECONDARY_CONTROL 0xdd -#define APB_IO_ADDRESS_MAP 0xde -#define APB_MEM_ADDRESS_MAP 0xdf - -#define APB_PCI_CONTROL_LOW 0xe0 -# define APB_PCI_CTL_LOW_ARB_PARK (1 << 21) -# define APB_PCI_CTL_LOW_ERRINT_EN (1 << 8) - -#define APB_PCI_CONTROL_HIGH 0xe4 -# define APB_PCI_CTL_HIGH_SERR (1 << 2) -# define APB_PCI_CTL_HIGH_ARBITER_EN (1 << 0) - -#define APB_PIO_ASFR 0xe8 -#define APB_PIO_AFAR 0xf0 -#define APB_DIAG_REGISTER 0xf8 - -#endif /* !(_SPARC64_APB_H) */ +#include <asm-sparc/apb.h>
include/asm-sparc64/bbc.h +1 -225
226 lines not on this page · raw message
include/asm-sparc64/display7seg.h +1 -79
80 lines not on this page · raw message
include/asm-sparc64/envctrl.h +1 -103
104 lines not on this page · raw message
include/asm-sparc64/psrcompat.h +1 -45
46 lines not on this page · raw message
include/asm-sparc64/pstate.h +1 -91
92 lines not on this page · raw message
include/asm-sparc64/uctx.h +1 -71
72 lines not on this page · raw message
include/asm-sparc64/utrap.h +1 -51
52 lines not on this page · raw message
include/asm-sparc64/watchdog.h +1 -31
@@ -1,31 +1 @@ -/* -* -* watchdog - Driver interface for the hardware watchdog timers -* present on Sun Microsystems boardsets -* -* Copyright (c) 2000 Eric Brower <[email protected]> -* -*/ - -#ifndef _SPARC64_WATCHDOG_H -#define _SPARC64_WATCHDOG_H - -#include <linux/watchdog.h> - -/* Solaris compatibility ioctls-- -* Ref. <linux/watchdog.h> for standard linux watchdog ioctls -*/ -#define WIOCSTART _IO (WATCHDOG_IOCTL_BASE, 10)/* Start Timer */ -#define WIOCSTOP _IO (WATCHDOG_IOCTL_BASE, 11)/* Stop Timer */ -#define WIOCGSTAT _IOR(WATCHDOG_IOCTL_BASE, 12, int)/* Get Timer Status */ - -/* Status flags from WIOCGSTAT ioctl -*/ -#define WD_FREERUN 0x01/* timer is running, interrupts disabled */ -#define WD_EXPIRED 0x02/* timer has expired */ -#define WD_RUNNING 0x04/* timer is running, interrupts enabled */ -#define WD_STOPPED 0x08/* timer has not been started */ -#define WD_SERVICED 0x10/* timer interrupt was serviced */ - -#endif /* ifndef _SPARC64_WATCHDOG_H */ - +#include <asm-sparc/watchdog.h>
Signature · 1 line
1.5.4.1.143.ge7e51
Re: [PATCH 01/21] sparc: copy exported sparc64 specific header
From: Sam Ravnborg <[email protected]>
Date: Fri, 6 Jun 2008 23:00:13 +0200
Quoted 15 lines
To get rid of ALTARCH in
Kbuildcopy remaining exported header files that are sparc64 specific to asm-sparc.Copy was done using the following simple script:
set -e
SPARC64="apb.hbbc.hdisplay7seg.henvctrl.hpsrcompat.hpstate.huctx.hutrap.hwatchdog.h" for FILE in ${SPARC64}; do
if [ -f asm-sparc/$FILE ]; then
echo $FILE exist in asm-sparc
fi
cat asm-sparc64/$FILE > asm-sparc/$FILE
printf "#include <asm-sparc/$FILE>\n" > asm-sparc64/$FILE
done
Quoted 1 line
Signed-off-by Sam Ravnborg <[email protected]>
Thanks for doing this work Sam.
Looking over this particular patch made me notice that asm/apb.h and asm/bbc.h should not be exported to userspace at all. And with some searching I verified that no userland source bases include these files.
They are simply definitions of chip registers and do not describe a userland interface of any kind, so this seems about right.
psrcompat.h and pstate.h fall roughly into the same category, but unfortunately things like strace include these files (even though they really don't use the defines) so we have to keep exporting them in order to not break userspace.
So what I'm going to do is apply the patch below first to sparc-next-2.6, then apply this patch with the apb.h and bbc.h parts removed.
Thanks!
sparc64 Kbuild: apb.h and bbc.h should not be exported to userspace
--- include/asm-sparc64/Kbuild | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
include/asm-sparc64/Kbuild +0 -2
@@ -4,9 +4,7 @@ ALTARCH := sparc ARCHDEF := defined __sparc__ && defined __arch64__ ALTARCHDEF := defined __sparc__ && !defined __arch64__ -header-y += apb.h header-y += asi.h -header-y += bbc.h header-y += bpp.h header-y += display7seg.h header-y += envctrl.h
Signature · 1 line
1.5.5.1.308.g1fbb5
Quoted 18 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Fri, 6 Jun 2008 23:00:13 +0200Quoted 15 lines
To get rid of ALTARCH in
Kbuildcopy remaining exported header files that are sparc64 specific to asm-sparc.Copy was done using the following simple script:
set -e
SPARC64="apb.hbbc.hdisplay7seg.henvctrl.hpsrcompat.hpstate.huctx.hutrap.hwatchdog.h" for FILE in ${SPARC64}; do
if [ -f asm-sparc/$FILE ]; then
echo $FILE exist in asm-sparc
fi
cat asm-sparc64/$FILE > asm-sparc/$FILE
printf "#include <asm-sparc/$FILE>\n" > asm-sparc64/$FILE
done
Quoted 8 lines
Quoted 1 line
Signed-off-by Sam Ravnborg <[email protected]>Thanks for doing this work Sam.
Looking over this particular patch made me notice that
asm/apb.handasm/bbc.hshould not be exported to userspace at all. And with some searching I verified that no userland source bases include these files.
Good catch - this is the problem with these mechancal patches that they are maybe correct but useless.
Quoted 5 lines
They are simply definitions of chip registers and do not describe a userland interface of any kind, so this seems about right.
Quoted 8 lines
psrcompat.handpstate.hfall roughly into the same category, but unfortunately things like strace include these files (even though they really don't use the defines) so we have to keep exporting them in order to not break userspace.So what I'm going to do is apply the patch below first to sparc-next-2.6, then apply this patch with the
apb.handbbc.hparts removed.
Notice that I screwed up the changelog/diff in the last two patches in the series. I can do a repost when you push your current sparc tree.
But only tomorrow - too late here.
Sam
Re: [PATCH 01/21] sparc: copy exported sparc64 specific header
In reply to Sam RavnborgFrom: Sam Ravnborg <[email protected]>
Date: Tue, 10 Jun 2008 22:45:33 +0200
Quoted 2 lines
Notice that I screwed up the changelog/diff in the last two patches in the series. I can do a repost when you push your current sparc tree.
After test building I hit another problem. If I apply your first patch, the header checks fail with things like:
/home/davem/src/GIT/sparc-next-2.6/usr/include/asm-sparc64/display7seg.h requires asm-sparc/display7seg.h, which does not exist in exported headers
Is there any way to avoid this so that the tree is bisectable during your changes?
I won't push my tree anywhere until we resolve this.
Quoted 6 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Tue, 10 Jun 2008 22:45:33 +0200Quoted 2 lines
Notice that I screwed up the changelog/diff in the last two patches in the series. I can do a repost when you push your current sparc tree.
Quoted 7 lines
After test building I hit another problem. If I apply your first patch, the header checks fail with things like:
/home/davem/src/GIT/sparc-next-2.6/usr/include/asm-sparc64/display7seg.hrequiresasm-sparc/display7seg.h, which does not exist in exported headersIs there any way to avoid this so that the tree is bisectable during your changes?
Yes - I will then have to add all the moved headers to include/asm-sparc/Kbuild.
I will do so and post an updated patch serie.
Sam
Quoted 10 lines · Sam Ravnborg
Quoted 9 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Tue, 10 Jun 2008 22:45:33 +0200Quoted 2 lines
Notice that I screwed up the changelog/diff in the last two patches in the series. I can do a repost when you push your current sparc tree.
After test building I hit another problem. If I apply your first patch, the header checks fail with things like:
Quoted 6 lines
Quoted 4 lines
/home/davem/src/GIT/sparc-next-2.6/usr/include/asm-sparc64/display7seg.hrequiresasm-sparc/display7seg.h, which does not exist in exported headersIs there any way to avoid this so that the tree is bisectable during your changes?
Yes - I will then have to add all the moved headers to
include/asm-sparc/Kbuild.
I was trying to say that all the files copied to asm-sparc had to be listed in asm-sparc/Kbuild to get exported.
And we need to keep them in asm-sparc64 to be exported there.
Sam
Re: [PATCH 01/21] sparc: copy exported sparc64 specific header
In reply to Sam RavnborgFrom: Sam Ravnborg <[email protected]>
Date: Tue, 10 Jun 2008 23:00:03 +0200
Quoted 7 lines · David Miller
Quoted 2 lines
Is there any way to avoid this so that the tree is bisectable during your changes?
Yes - I will then have to add all the moved headers to
include/asm-sparc/Kbuild.I will do so and post an updated patch serie.
Thanks a lot Sam.
Meanwhile, I'll push to sparc-next-2.6 just my changeset to eliminate apb.h and bbc.h from include/asm-sparc64/Kbuild