mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
22a9835c35
Just about every architecture defines some macros to do operations on pfns. They're all virtually identical. This patch consolidates all of them. One minor glitch is that at least i386 uses them in a very skeletal header file. To keep away from #include dependency hell, I stuck the new definitions in a new, isolated header. Of all of the implementations, sh64 is the only one that varied by a bit. It used some masks to ensure that any sign-extension got ripped away before the arithmetic is done. This has been posted to that sh64 maintainers and the development list. Compiles on x86, x86_64, ia64 and ppc64. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
65 lines
1.8 KiB
C
65 lines
1.8 KiB
C
#ifndef __ASM_SH64_PLATFORM_H
|
|
#define __ASM_SH64_PLATFORM_H
|
|
|
|
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* include/asm-sh64/platform.h
|
|
*
|
|
* Copyright (C) 2000, 2001 Paolo Alberelli
|
|
*
|
|
* benedict.gaster@superh.com: 3rd May 2002
|
|
* Added support for ramdisk, removing statically linked romfs at the same time.
|
|
*/
|
|
|
|
#include <linux/ioport.h>
|
|
#include <asm/irq.h>
|
|
|
|
|
|
/*
|
|
* Platform definition structure.
|
|
*/
|
|
struct sh64_platform {
|
|
unsigned int readonly_rootfs;
|
|
unsigned int ramdisk_flags;
|
|
unsigned int initial_root_dev;
|
|
unsigned int loader_type;
|
|
unsigned int initrd_start;
|
|
unsigned int initrd_size;
|
|
unsigned int fpu_flags;
|
|
unsigned int io_res_count;
|
|
unsigned int kram_res_count;
|
|
unsigned int xram_res_count;
|
|
unsigned int rom_res_count;
|
|
struct resource *io_res_p;
|
|
struct resource *kram_res_p;
|
|
struct resource *xram_res_p;
|
|
struct resource *rom_res_p;
|
|
};
|
|
|
|
extern struct sh64_platform platform_parms;
|
|
|
|
extern unsigned long long memory_start, memory_end;
|
|
|
|
extern unsigned long long fpu_in_use;
|
|
|
|
extern int platform_int_priority[NR_INTC_IRQS];
|
|
|
|
#define FPU_FLAGS (platform_parms.fpu_flags)
|
|
#define STANDARD_IO_RESOURCES (platform_parms.io_res_count)
|
|
#define STANDARD_KRAM_RESOURCES (platform_parms.kram_res_count)
|
|
#define STANDARD_XRAM_RESOURCES (platform_parms.xram_res_count)
|
|
#define STANDARD_ROM_RESOURCES (platform_parms.rom_res_count)
|
|
|
|
/*
|
|
* Kernel Memory description, Respectively:
|
|
* code = last but one memory descriptor
|
|
* data = last memory descriptor
|
|
*/
|
|
#define code_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 2])
|
|
#define data_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 1])
|
|
|
|
#endif /* __ASM_SH64_PLATFORM_H */
|