Am Montag, 23. September 2013, 20:14:32 schrieb Jason Gunthorpe:

> Commit e0dd03caf20d040a0a86b6bd74028ec9bda545f5

> changed the code path here so that ateml_get_base_addr

> no longer directly altered the tpm_vendor_specific

> structure, and instead placed the base address on the stack.


> The commit missed updating the request_region call, which

> would have resulted in request_region being called with 0

> as the base address.


> I don't know if request_region(0, ..) will fail, if so the

> driver has been broken since 2006 and we should remove it

> from the tree as it has no users.


The Atmel TPM depends on PPC64 || HAS_IOPORT


So request_region is defined as

#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0)


with the final check in

__request_resource(struct resource *root, struct resource *new)


204 if (end < start)

205 return root;

206 if (start < root->start)

207 return root;

208 if (end > root->end)

209 return root;



with root being ioport_resource, ioport_resource->start = 0 and new->start being 0

so at least the basic check should work.


Nevertheless it most probably does request and reserve the wrong region and if anything else has or wants to request the region it might cause a problem.


Does anyone (Ashley? IBM Fellows? Ted?) have access to one of those ancient tpms and maybe a machine to use test them?




I somewhat have the feeling that we should maybe begin to deprecate the vendor specific 1.1 tpms...




Reviewed-by: Peter Huewe <>

Signed-off-by: Peter Huewe <>


Staged here for-james