~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/kernel/lparcfg.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
/*
133
133
 * Methods used to fetch LPAR data when running on a pSeries platform.
134
134
 */
135
 
/**
136
 
 * h_get_mpp
137
 
 * H_GET_MPP hcall returns info in 7 parms
138
 
 */
139
 
int h_get_mpp(struct hvcall_mpp_data *mpp_data)
140
 
{
141
 
        int rc;
142
 
        unsigned long retbuf[PLPAR_HCALL9_BUFSIZE];
143
 
 
144
 
        rc = plpar_hcall9(H_GET_MPP, retbuf);
145
 
 
146
 
        mpp_data->entitled_mem = retbuf[0];
147
 
        mpp_data->mapped_mem = retbuf[1];
148
 
 
149
 
        mpp_data->group_num = (retbuf[2] >> 2 * 8) & 0xffff;
150
 
        mpp_data->pool_num = retbuf[2] & 0xffff;
151
 
 
152
 
        mpp_data->mem_weight = (retbuf[3] >> 7 * 8) & 0xff;
153
 
        mpp_data->unallocated_mem_weight = (retbuf[3] >> 6 * 8) & 0xff;
154
 
        mpp_data->unallocated_entitlement = retbuf[3] & 0xffffffffffff;
155
 
 
156
 
        mpp_data->pool_size = retbuf[4];
157
 
        mpp_data->loan_request = retbuf[5];
158
 
        mpp_data->backing_mem = retbuf[6];
159
 
 
160
 
        return rc;
161
 
}
162
 
EXPORT_SYMBOL(h_get_mpp);
163
135
 
164
136
struct hvcall_ppp_data {
165
137
        u64     entitlement;
262
234
        seq_printf(m, "system_active_processors=%d\n",
263
235
                   ppp_data.active_system_procs);
264
236
 
265
 
        /* pool related entries are apropriate for shared configs */
 
237
        /* pool related entries are appropriate for shared configs */
266
238
        if (lppaca_of(0).shared_proc) {
267
239
                unsigned long pool_idle_time, pool_procs;
268
240
 
345
317
        seq_printf(m, "backing_memory=%ld bytes\n", mpp_data.backing_mem);
346
318
}
347
319
 
 
320
/**
 
321
 * parse_mpp_x_data
 
322
 * Parse out data returned from h_get_mpp_x
 
323
 */
 
324
static void parse_mpp_x_data(struct seq_file *m)
 
325
{
 
326
        struct hvcall_mpp_x_data mpp_x_data;
 
327
 
 
328
        if (!firmware_has_feature(FW_FEATURE_XCMO))
 
329
                return;
 
330
        if (h_get_mpp_x(&mpp_x_data))
 
331
                return;
 
332
 
 
333
        seq_printf(m, "coalesced_bytes=%ld\n", mpp_x_data.coalesced_bytes);
 
334
 
 
335
        if (mpp_x_data.pool_coalesced_bytes)
 
336
                seq_printf(m, "pool_coalesced_bytes=%ld\n",
 
337
                           mpp_x_data.pool_coalesced_bytes);
 
338
        if (mpp_x_data.pool_purr_cycles)
 
339
                seq_printf(m, "coalesce_pool_purr=%ld\n", mpp_x_data.pool_purr_cycles);
 
340
        if (mpp_x_data.pool_spurr_cycles)
 
341
                seq_printf(m, "coalesce_pool_spurr=%ld\n", mpp_x_data.pool_spurr_cycles);
 
342
}
 
343
 
348
344
#define SPLPAR_CHARACTERISTICS_TOKEN 20
349
345
#define SPLPAR_MAXLENGTH 1026*(sizeof(char))
350
346
 
520
516
                parse_system_parameter_string(m);
521
517
                parse_ppp_data(m);
522
518
                parse_mpp_data(m);
 
519
                parse_mpp_x_data(m);
523
520
                pseries_cmo_data(m);
524
521
                splpar_dispatch_data(m);
525
522