Linux Audio

Check our new training course

Loading...
v6.2
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2#ifndef _PPC_BOOT_REG_H
 3#define _PPC_BOOT_REG_H
 4/*
 5 * Copyright 2007 Davud Gibson, IBM Corporation.
 
 
 
 
 
 6 */
 7
 8static inline u32 mfpvr(void)
 9{
10	u32 pvr;
11	asm volatile ("mfpvr	%0" : "=r"(pvr));
12	return pvr;
13}
14
15#define __stringify_1(x)	#x
16#define __stringify(x)		__stringify_1(x)
17
18#define mfspr(rn)	({unsigned long rval; \
19			asm volatile("mfspr %0," __stringify(rn) \
20				: "=r" (rval)); rval; })
21#define mtspr(rn, v)	asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
22
23register void *__stack_pointer asm("r1");
24#define get_sp()	(__stack_pointer)
25
26#endif	/* _PPC_BOOT_REG_H */
v3.1
 
 1#ifndef _PPC_BOOT_REG_H
 2#define _PPC_BOOT_REG_H
 3/*
 4 * Copyright 2007 Davud Gibson, IBM Corporation.
 5 *
 6 * This program is free software; you can redistribute it and/or
 7 * modify it under the terms of the GNU General Public License
 8 * as published by the Free Software Foundation; either version
 9 * 2 of the License, or (at your option) any later version.
10 */
11
12static inline u32 mfpvr(void)
13{
14	u32 pvr;
15	asm volatile ("mfpvr	%0" : "=r"(pvr));
16	return pvr;
17}
18
19#define __stringify_1(x)	#x
20#define __stringify(x)		__stringify_1(x)
21
22#define mfspr(rn)	({unsigned long rval; \
23			asm volatile("mfspr %0," __stringify(rn) \
24				: "=r" (rval)); rval; })
25#define mtspr(rn, v)	asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
26
27register void *__stack_pointer asm("r1");
28#define get_sp()	(__stack_pointer)
29
30#endif	/* _PPC_BOOT_REG_H */