git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull kmalloc into release branch
[pandora-kernel.git]
/
arch
/
powerpc
/
platforms
/
pseries
/
lpar.c
diff --git
a/arch/powerpc/platforms/pseries/lpar.c
b/arch/powerpc/platforms/pseries/lpar.c
index
8952528
..
3aeb406
100644
(file)
--- a/
arch/powerpc/platforms/pseries/lpar.c
+++ b/
arch/powerpc/platforms/pseries/lpar.c
@@
-21,7
+21,6
@@
#undef DEBUG_LOW
#undef DEBUG_LOW
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/dma-mapping.h>
#include <linux/console.h>
#include <linux/kernel.h>
#include <linux/dma-mapping.h>
#include <linux/console.h>
@@
-54,7
+53,8
@@
EXPORT_SYMBOL(plpar_hcall);
EXPORT_SYMBOL(plpar_hcall_4out);
EXPORT_SYMBOL(plpar_hcall_norets);
EXPORT_SYMBOL(plpar_hcall_8arg_2ret);
EXPORT_SYMBOL(plpar_hcall_4out);
EXPORT_SYMBOL(plpar_hcall_norets);
EXPORT_SYMBOL(plpar_hcall_8arg_2ret);
-
+EXPORT_SYMBOL(plpar_hcall_7arg_7ret);
+EXPORT_SYMBOL(plpar_hcall_9arg_9ret);
extern void pSeries_find_serial_port(void);
extern void pSeries_find_serial_port(void);
@@
-72,7
+72,7
@@
static void udbg_hvsi_putc(char c)
do {
rc = plpar_put_term_char(vtermno, sizeof(packet), packet);
do {
rc = plpar_put_term_char(vtermno, sizeof(packet), packet);
- } while (rc == H_B
usy
);
+ } while (rc == H_B
USY
);
}
static long hvsi_udbg_buf_len;
}
static long hvsi_udbg_buf_len;
@@
-85,7
+85,7
@@
static int udbg_hvsi_getc_poll(void)
if (hvsi_udbg_buf_len == 0) {
rc = plpar_get_term_char(vtermno, &hvsi_udbg_buf_len, hvsi_udbg_buf);
if (hvsi_udbg_buf_len == 0) {
rc = plpar_get_term_char(vtermno, &hvsi_udbg_buf_len, hvsi_udbg_buf);
- if (rc != H_S
uccess
|| hvsi_udbg_buf[0] != 0xff) {
+ if (rc != H_S
UCCESS
|| hvsi_udbg_buf[0] != 0xff) {
/* bad read or non-data packet */
hvsi_udbg_buf_len = 0;
} else {
/* bad read or non-data packet */
hvsi_udbg_buf_len = 0;
} else {
@@
-139,7
+139,7
@@
static void udbg_putcLP(char c)
buf[0] = c;
do {
rc = plpar_put_term_char(vtermno, 1, buf);
buf[0] = c;
do {
rc = plpar_put_term_char(vtermno, 1, buf);
- } while(rc == H_B
usy
);
+ } while(rc == H_B
USY
);
}
/* Buffered chars getc */
}
/* Buffered chars getc */
@@
-158,7
+158,7
@@
static int udbg_getc_pollLP(void)
/* get some more chars. */
inbuflen = 0;
rc = plpar_get_term_char(vtermno, &inbuflen, buf);
/* get some more chars. */
inbuflen = 0;
rc = plpar_get_term_char(vtermno, &inbuflen, buf);
- if (rc != H_S
uccess
)
+ if (rc != H_S
UCCESS
)
inbuflen = 0; /* otherwise inbuflen is garbage */
}
if (inbuflen <= 0 || inbuflen > 16) {
inbuflen = 0; /* otherwise inbuflen is garbage */
}
if (inbuflen <= 0 || inbuflen > 16) {
@@
-304,7
+304,7
@@
long pSeries_lpar_hpte_insert(unsigned long hpte_group,
lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v,
hpte_r, &slot, &dummy0, &dummy1);
lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v,
hpte_r, &slot, &dummy0, &dummy1);
- if (unlikely(lpar_rc == H_PTEG_F
ull
)) {
+ if (unlikely(lpar_rc == H_PTEG_F
ULL
)) {
if (!(vflags & HPTE_V_BOLTED))
DBG_LOW(" full\n");
return -1;
if (!(vflags & HPTE_V_BOLTED))
DBG_LOW(" full\n");
return -1;
@@
-315,7
+315,7
@@
long pSeries_lpar_hpte_insert(unsigned long hpte_group,
* will fail. However we must catch the failure in hash_page
* or we will loop forever, so return -2 in this case.
*/
* will fail. However we must catch the failure in hash_page
* or we will loop forever, so return -2 in this case.
*/
- if (unlikely(lpar_rc != H_S
uccess
)) {
+ if (unlikely(lpar_rc != H_S
UCCESS
)) {
if (!(vflags & HPTE_V_BOLTED))
DBG_LOW(" lpar err %d\n", lpar_rc);
return -2;
if (!(vflags & HPTE_V_BOLTED))
DBG_LOW(" lpar err %d\n", lpar_rc);
return -2;
@@
-346,9
+346,9
@@
static long pSeries_lpar_hpte_remove(unsigned long hpte_group)
/* don't remove a bolted entry */
lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset,
(0x1UL << 4), &dummy1, &dummy2);
/* don't remove a bolted entry */
lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset,
(0x1UL << 4), &dummy1, &dummy2);
- if (lpar_rc == H_S
uccess
)
+ if (lpar_rc == H_S
UCCESS
)
return i;
return i;
- BUG_ON(lpar_rc != H_N
ot_Found
);
+ BUG_ON(lpar_rc != H_N
OT_FOUND
);
slot_offset++;
slot_offset &= 0x7;
slot_offset++;
slot_offset &= 0x7;
@@
-391,14
+391,14
@@
static long pSeries_lpar_hpte_updatepp(unsigned long slot,
lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN);
lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN);
- if (lpar_rc == H_N
ot_Found
) {
+ if (lpar_rc == H_N
OT_FOUND
) {
DBG_LOW("not found !\n");
return -1;
}
DBG_LOW("ok\n");
DBG_LOW("not found !\n");
return -1;
}
DBG_LOW("ok\n");
- BUG_ON(lpar_rc != H_S
uccess
);
+ BUG_ON(lpar_rc != H_S
UCCESS
);
return 0;
}
return 0;
}
@@
-417,7
+417,7
@@
static unsigned long pSeries_lpar_hpte_getword0(unsigned long slot)
lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1);
lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1);
- BUG_ON(lpar_rc != H_S
uccess
);
+ BUG_ON(lpar_rc != H_S
UCCESS
);
return dword0;
}
return dword0;
}
@@
-468,7
+468,7
@@
static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp,
flags = newpp & 7;
lpar_rc = plpar_pte_protect(flags, slot, 0);
flags = newpp & 7;
lpar_rc = plpar_pte_protect(flags, slot, 0);
- BUG_ON(lpar_rc != H_S
uccess
);
+ BUG_ON(lpar_rc != H_S
UCCESS
);
}
static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
}
static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
@@
-484,10
+484,10
@@
static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
want_v = hpte_encode_v(va, psize);
lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v & HPTE_V_AVPN,
&dummy1, &dummy2);
want_v = hpte_encode_v(va, psize);
lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v & HPTE_V_AVPN,
&dummy1, &dummy2);
- if (lpar_rc == H_N
ot_Found
)
+ if (lpar_rc == H_N
OT_FOUND
)
return;
return;
- BUG_ON(lpar_rc != H_S
uccess
);
+ BUG_ON(lpar_rc != H_S
UCCESS
);
}
/*
}
/*
@@
-512,7
+512,7
@@
void pSeries_lpar_flush_hash_range(unsigned long number, int local)
spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
}
spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
}
-void hpte_init_lpar(void)
+void
__init
hpte_init_lpar(void)
{
ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate;
ppc_md.hpte_updatepp = pSeries_lpar_hpte_updatepp;
{
ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate;
ppc_md.hpte_updatepp = pSeries_lpar_hpte_updatepp;
@@
-521,6
+521,4
@@
void hpte_init_lpar(void)
ppc_md.hpte_remove = pSeries_lpar_hpte_remove;
ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear;
ppc_md.hpte_remove = pSeries_lpar_hpte_remove;
ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear;
-
- htab_finish_init();
}
}